PIXI. VideoTexture

new VideoTexture(source, scaleMode)

A texture of a [playing] Video.

See the "deus" demo.

Parameters:
Name Type Description
source HTMLVideoElement

-

scaleMode Number

See {{#crossLink "PIXI/scaleModes:property"}}PIXI.scaleModes{{/crossLink}} for possible values

Source - pixi/textures/VideoTexture.js, line 1

Extends

Members

<readonly> hasLoaded :Boolean

[read-only] Set to true once the base texture has loaded

Inherited From:
Source - pixi/textures/BaseTexture.js, line 55

<readonly> height :Number

[read-only] The height of the base texture set when the image has loaded

Inherited From:
Source - pixi/textures/BaseTexture.js, line 37

imageUrl :String

Inherited From:
Source - pixi/textures/BaseTexture.js, line 141

mipmap :Boolean

Set this to true if a mipmap of this texture needs to be generated. This value needs to be set before the texture is used Also the texture must be a power of two size to work

Inherited From:
Source - pixi/textures/BaseTexture.js, line 92

premultipliedAlpha :Boolean

Controls if RGB channels should be pre-multiplied by Alpha (WebGL only)

Inherited From:
Default Value:
  • true
Source - pixi/textures/BaseTexture.js, line 74

resolution :Number

The Resolution of the texture.

Inherited From:
Source - pixi/textures/BaseTexture.js, line 20

scaleMode :Number

The scale mode to apply when scaling this texture

Inherited From:
Default Value:
  • PIXI.scaleModes.LINEAR
Source - pixi/textures/BaseTexture.js, line 46

source :Image

The image source that is used to create the texture.

Inherited From:
Source - pixi/textures/BaseTexture.js, line 64

<readonly> width :Number

[read-only] The width of the base texture set when the image has loaded

Inherited From:
Source - pixi/textures/BaseTexture.js, line 28

Methods

<static> baseTextureFromVideo(video, scaleMode) → {PIXI.VideoTexture}

Mimic Pixi BaseTexture.from.... method.

Parameters:
Name Type Description
video HTMLVideoElement

-

scaleMode Number

See {{#crossLink "PIXI/scaleModes:property"}}PIXI.scaleModes{{/crossLink}} for possible values

Returns:
Source - pixi/textures/VideoTexture.js, line 110

<static> fromUrl(videoSrc, scaleMode) → {PIXI.VideoTexture}

Mimic Pixi BaseTexture.from.... method.

Parameters:
Name Type Description
videoSrc String

The URL for the video.

scaleMode Number

See {{#crossLink "PIXI/scaleModes:property"}}PIXI.scaleModes{{/crossLink}} for possible values

Returns:
Source - pixi/textures/VideoTexture.js, line 152

<static> textureFromVideo(video, scaleMode) → {PIXI.Texture}

Mimic Pixi BaseTexture.from.... method.

Parameters:
Name Type Description
video HTMLVideoElement

-

scaleMode Number

See {{#crossLink "PIXI/scaleModes:property"}}PIXI.scaleModes{{/crossLink}} for possible values

Returns:

A Texture, but not a VideoTexture.

Source - pixi/textures/VideoTexture.js, line 137

destroy()

Destroys this base texture

Inherited From:
Source - pixi/textures/BaseTexture.js, line 160

dirty()

Sets all glTextures to be dirty.

Inherited From:
Source - pixi/textures/BaseTexture.js, line 196

unloadFromGPU()

Removes the base texture from the GPU, useful for managing resources on the GPU. Atexture is still 100% usable and will simply be reuploaded if there is a sprite on screen that is using it.

Inherited From:
Source - pixi/textures/BaseTexture.js, line 209

updateSourceImage(newSrc)

Changes the source image of the texture

Parameters:
Name Type Description
newSrc String

the path of the image

Inherited From:
Source - pixi/textures/BaseTexture.js, line 183
Phaser Copyright © 2012-2014 Photon Storm Ltd.
Documentation generated by JSDoc 3.3.0-dev on Tue Jan 06 2015 06:32:46 GMT-0000 (GMT) using the DocStrap template.