VideoTexture

Hierarchy

Index

Constructors

Properties

Methods

Constructors

constructor

  • Creates a video texture. Sample : https://doc.babylonjs.com/how_to/video_texture

    Parameters

    • name: Nullable<string>

      optional name, will detect from video source, if not defined

    • src: string | string[] | HTMLVideoElement

      can be used to provide an url, array of urls or an already setup HTML video element.

    • scene: Nullable<Scene>

      is obviously the current scene.

    • Optional generateMipMaps: boolean

      can be used to turn on mipmaps (Can be expensive for videoTextures because they are often updated).

    • Optional invertY: boolean

      is false by default but can be used to invert video on Y axis

    • Optional samplingMode: number

      controls the sampling method and is set to TRILINEAR_SAMPLINGMODE by default

    • Optional settings: VideoTextureSettings

    Returns VideoTexture

Properties

animations

animations: Animation[]

anisotropicFilteringLevel

anisotropicFilteringLevel: number

autoUpdateTexture

autoUpdateTexture: boolean

Tells whether textures will be updated automatically or user is required to call updateTexture manually

canRescale

canRescale: boolean

coordinatesIndex

coordinatesIndex: number

coordinatesMode

coordinatesMode: number

How a texture is mapped.

Value Type Description
0 EXPLICIT_MODE
1 SPHERICAL_MODE
2 PLANAR_MODE
3 CUBIC_MODE
4 PROJECTION_MODE
5 SKYBOX_MODE
6 INVCUBIC_MODE
7 EQUIRECTANGULAR_MODE
8 FIXED_EQUIRECTANGULAR_MODE
9 FIXED_EQUIRECTANGULAR_MIRRORED_MODE

delayLoadState

delayLoadState: number

gammaSpace

gammaSpace: boolean

getAlphaFromRGB

getAlphaFromRGB: boolean

hasAlpha

hasAlpha: boolean

invertZ

invertZ: boolean

is3D

is3D: boolean

isBlocking

isBlocking: boolean

isCube

isCube: boolean

isRenderTarget

isRenderTarget: boolean

level

level: number

lodGenerationOffset

lodGenerationOffset: number

lodGenerationScale

lodGenerationScale: number

lodLevelInAlpha

lodLevelInAlpha: boolean

name

name: string

noMipmap

noMipmap: boolean

onDispose

onDispose: function

Type declaration

    • (): void
    • Returns void

onDisposeObservable

onDisposeObservable: Observable<BaseTexture>

An event triggered when the texture is disposed.

onLoadObservable

onLoadObservable: Observable<Texture>

samplingMode

samplingMode: number

sphericalPolynomial

sphericalPolynomial: Nullable<SphericalPolynomial>

textureFormat

textureFormat: number

textureType

textureType: number

uAng

uAng: number

uOffset

uOffset: number

uRotationCenter

uRotationCenter: number

Defines the center of rotation (U)

uScale

uScale: number

uid

uid: string

url

url: Nullable<string>

vAng

vAng: number

vOffset

vOffset: number

vRotationCenter

vRotationCenter: number

Defines the center of rotation (V)

vScale

vScale: number

video

video: HTMLVideoElement

The video instance used by the texture internally

wAng

wAng: number

wRotationCenter

wRotationCenter: number

Defines the center of rotation (W)

wrapR

wrapR: number
Value Type Description
0 CLAMP_ADDRESSMODE
1 WRAP_ADDRESSMODE
2 MIRROR_ADDRESSMODE

wrapU

wrapU: number
Value Type Description
0 CLAMP_ADDRESSMODE
1 WRAP_ADDRESSMODE
2 MIRROR_ADDRESSMODE

wrapV

wrapV: number
Value Type Description
0 CLAMP_ADDRESSMODE
1 WRAP_ADDRESSMODE
2 MIRROR_ADDRESSMODE

Static BILINEAR_SAMPLINGMODE

BILINEAR_SAMPLINGMODE: number

Static CLAMP_ADDRESSMODE

CLAMP_ADDRESSMODE: number

Static CUBIC_MODE

CUBIC_MODE: number

Static DEFAULT_ANISOTROPIC_FILTERING_LEVEL

DEFAULT_ANISOTROPIC_FILTERING_LEVEL: number

Static EQUIRECTANGULAR_MODE

EQUIRECTANGULAR_MODE: number

Static EXPLICIT_MODE

EXPLICIT_MODE: number

Static FIXED_EQUIRECTANGULAR_MIRRORED_MODE

FIXED_EQUIRECTANGULAR_MIRRORED_MODE: number

Static FIXED_EQUIRECTANGULAR_MODE

FIXED_EQUIRECTANGULAR_MODE: number

Static INVCUBIC_MODE

INVCUBIC_MODE: number

Static LINEAR_LINEAR

LINEAR_LINEAR: number

Static LINEAR_LINEAR_MIPLINEAR

LINEAR_LINEAR_MIPLINEAR: number

Static LINEAR_LINEAR_MIPNEAREST

LINEAR_LINEAR_MIPNEAREST: number

Static LINEAR_NEAREST

LINEAR_NEAREST: number

Static LINEAR_NEAREST_MIPLINEAR

LINEAR_NEAREST_MIPLINEAR: number

Static LINEAR_NEAREST_MIPNEAREST

LINEAR_NEAREST_MIPNEAREST: number

Static MIRROR_ADDRESSMODE

MIRROR_ADDRESSMODE: number

Static NEAREST_LINEAR

NEAREST_LINEAR: number

Static NEAREST_LINEAR_MIPLINEAR

NEAREST_LINEAR_MIPLINEAR: number

Static NEAREST_LINEAR_MIPNEAREST

NEAREST_LINEAR_MIPNEAREST: number

Static NEAREST_NEAREST

NEAREST_NEAREST: number

Static NEAREST_NEAREST_MIPLINEAR

NEAREST_NEAREST_MIPLINEAR: number

Static NEAREST_NEAREST_MIPNEAREST

NEAREST_NEAREST_MIPNEAREST: number

Static NEAREST_SAMPLINGMODE

NEAREST_SAMPLINGMODE: number

Static PLANAR_MODE

PLANAR_MODE: number

Static PROJECTION_MODE

PROJECTION_MODE: number

Static SKYBOX_MODE

SKYBOX_MODE: number

Static SPHERICAL_MODE

SPHERICAL_MODE: number

Static TRILINEAR_SAMPLINGMODE

TRILINEAR_SAMPLINGMODE: number

Static UseSerializedUrlIfAny

UseSerializedUrlIfAny: boolean

Gets or sets a boolean which defines if the texture url must be build from the serialized URL instead of just using the name and loading them side by side with the scene file

Static WRAP_ADDRESSMODE

WRAP_ADDRESSMODE: number

Methods

clone

delayLoad

  • delayLoad(): void

dispose

  • dispose(): void

getBaseSize

getClassName

  • getClassName(): string

getInternalTexture

getReflectionTextureMatrix

  • getReflectionTextureMatrix(): Matrix

getScene

getSize

getTextureMatrix

isReady

  • isReady(): boolean

isReadyOrNotBlocking

  • isReadyOrNotBlocking(): boolean

readPixels

  • readPixels(faceIndex?: number): Nullable<ArrayBufferView>

releaseInternalTexture

  • releaseInternalTexture(): void

scale

  • scale(ratio: number): void

serialize

  • serialize(): any

toString

  • toString(): string

update

  • update(): void
  • Update Texture in the auto mode. Does not do anything if settings.autoUpdateTexture is false.

    Returns void

updateSamplingMode

  • updateSamplingMode(samplingMode: number): void

updateTexture

  • updateTexture(isVisible: boolean): void
  • Update Texture in manual mode. Does not do anything if not visible or paused.

    Parameters

    • isVisible: boolean

      Visibility state, detected by user using scene.getActiveMeshes() or othervise.

    Returns void

updateURL

  • updateURL(url: string): void
  • Change video content. Changing video instance or setting multiple urls (as in constructor) is not supported.

    Parameters

    • url: string

      New url.

    Returns void

Static CreateFromBase64String

  • CreateFromBase64String(data: string, name: string, scene: Scene, noMipmap?: boolean, invertY?: boolean, samplingMode?: number, onLoad?: Nullable<function>, onError?: Nullable<function>, format?: number): Texture
  • Parameters

    • data: string
    • name: string
    • scene: Scene
    • Optional noMipmap: boolean
    • Optional invertY: boolean
    • Optional samplingMode: number
    • Optional onLoad: Nullable<function>
    • Optional onError: Nullable<function>
    • Optional format: number

    Returns Texture

Static CreateFromWebCam

  • CreateFromWebCam(scene: Scene, onReady: function, constraints: object): void
  • Parameters

    • scene: Scene
    • onReady: function
    • constraints: object
      • deviceId: string
      • maxHeight: number
      • maxWidth: number
      • minHeight: number
      • minWidth: number

    Returns void

Static LoadFromDataString

  • LoadFromDataString(name: string, buffer: any, scene: Scene, deleteBuffer?: boolean, noMipmap?: boolean, invertY?: boolean, samplingMode?: number, onLoad?: Nullable<function>, onError?: Nullable<function>, format?: number): Texture
  • Parameters

    • name: string
    • buffer: any
    • scene: Scene
    • Optional deleteBuffer: boolean
    • Optional noMipmap: boolean
    • Optional invertY: boolean
    • Optional samplingMode: number
    • Optional onLoad: Nullable<function>
    • Optional onError: Nullable<function>
    • Optional format: number

    Returns Texture

Static Parse

Static WhenAllReady

  • WhenAllReady(textures: BaseTexture[], callback: function): void

Generated using TypeDoc