dreiDrei.docs

WebcamVideoTexture

Summary

Create a video texture from getUserMedia
export type WebcamVideoTextureProps = Omit<VideoTextureProps, 'src'> & {
  constraints?: MediaStreamConstraints
}
<WebcamVideoTexture>
  {(texture) => <meshBasicMaterial map={texture} />}

or exposed via ref:

const textureRef = useRef()
<WebcamVideoTexture ref={textureRef} />

src/web/WebcamVideoTexture.tsx

Edit this page

VideoTexture / useVideoTexture
CubeCamera / useCubeCamera
  • getting started
  • abstractions
  • cameras
  • controls
  • gizmos
  • loaders
    • CubeTexture / useCubeTexture
    • Fbx / useFBX
    • Gltf / useGLTF
    • Ktx2 / useKTX2
    • Loader
    • Progress / useProgress
    • ScreenVideoTexture
    • Texture / useTexture
    • TrailTexture / useTrailTexture
    • useFont
    • useSpriteLoader
    • VideoTexture / useVideoTexture
    • WebcamVideoTexture
  • misc
  • modifiers
  • performances
  • portals
  • shaders
  • shapes
  • staging

On This Page