CLASSES
TagsA - Z

VideoTexture

BaseTextureTexture

Description

class VideoTexture extends Texture

Constructor

new VideoTexture(name, urlsOrVideo, HTMLVideoElement, scene, generateMipMaps, invertY, samplingMode)

Creates a video texture.

Sample : https://doc.babylonjs.com/tutorials/01._Advanced_Texturing

Parameters

Name Type Description
name string Name of the texture
urlsOrVideo string[] or HTMLVideoElement
scene Scene Scene which contain the texture
optional generateMipMaps boolean True to generate a mipmaps
optional invertY boolean True to invert on Y axis

Members

video : HTMLVideoElement

The video element

Methods

update() boolean

dispose() void

static CreateFromWebCam(scene, onReady, constraints) void

Parameters

Name Type Description
scene Scene Scene which contain the texture
onReady (videoTexture: VideoTexture) => void
constraints { minWidth: number, maxWidth: number, minHeight: number, maxHeight: number, deviceId: string }