WebcamTexture Class

Extends Texture
Module: Textures

Webcam texture is used to capture and display video from a webcam in real-time.

It uses WebRTC, the host must support it, otherwise WebcamTexture will display a black image.

Constructor

WebcamTexture

(
  • mapping
  • wrapS
  • wrapT
  • type
  • anisotropy
)

Parameters:

  • mapping Number
  • wrapS Number
  • wrapT Number
  • type Number
  • anisotropy Number

Item Index

Properties

Methods

connect

()

Connect to camera.

disconnect

()

Disconnect from camera.

dispose

()

Dispose webcam texture.

toJSON

(
  • meta
)

Serialize webcam texture to JSON.

Parameters:

  • meta Object

    Metadata.

Properties

image

DOM

Image is used to store a DOM video element