Skip to content

Instantly share code, notes, and snippets.

View dynamite-bud's full-sized avatar
🎯
Focusing

Rudra dynamite-bud

🎯
Focusing
  • Trinity College Dublin
  • Dublin, Ireland
  • 22:55 (UTC)
View GitHub Profile
@dynamite-bud
dynamite-bud / mapbox-3d.tsx
Created May 17, 2022 10:23 — forked from sknightq/mapbox-3d.tsx
Mapbox custom layer which renders multiple models in a THREE.js scene
import * as THREE from 'three'
import { GLTF, GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader'
import { setPosition } from '@/components/Mapbox/utils'
import MapboxGL, { LngLatLike, MercatorCoordinate } from 'mapbox-gl'
import { LayerConfig, ModelTransform } from './types'
import { FeatureCollection } from 'geojson'
import { Object3D } from 'three'
function transform(layerConfig: LayerConfig, modelConfig: { position: LngLatLike; altitude: number }, center: mapboxgl.MercatorCoordinate): THREE.Matrix4 {
const { modelScale, modelRotate } = layerConfig
@dynamite-bud
dynamite-bud / sprite-custom-layer.tsx
Created May 12, 2022 12:09 — forked from danvk/sprite-custom-layer.tsx
Mapbox custom layer which renders multiple models in a THREE.js scene
import MapboxGL, {LngLatLike, MercatorCoordinate} from 'mapbox-gl';
import React, {useEffect, useState} from 'react';
import {withMap} from 'react-mapbox-gl/lib-esm/context';
import {FeatureCollection} from 'geojson';
import * as THREE from 'three';
import {GLTFLoader} from 'three/examples/jsm/loaders/GLTFLoader';
export interface SpritePaint {
gltfPath: string;
@dynamite-bud
dynamite-bud / stream_example.md
Created January 28, 2022 06:28 — forked from reinzor/stream_example.md
GStreamer UDP stream examples

MJPEG

Server (Ubuntu 16.04)

gst-launch-1.0 -v filesrc location= /home/rein/Videos/big_buck_bunny_720p_30mb_0_0.mp4 ! decodebin ! videoconvert ! jpegenc ! rtpjpegpay ! udpsink host=localhost port=5000

Client (Ubuntu 16.04)