Texture

CanvasTexture

Creates a texture from a <canvas> element.

This is almost the same as the base Texture class, except that it sets needsUpdate to true immediately.

Constructor

CanvasTexture(canvas : HTMLElement, mapping : Constant, wrapS : Constant, wrapT : Constant, magFilter : Constant, minFilter : Constant, format : Constant, type : Constant, anisotropy : Integer)

Properties

See the base Texture class for common properties.

.isCanvasTexture : Boolean

Read-only flag to check if a given object is of type CanvasTexture.

.needsUpdate : Boolean

True by default. This is required so that the canvas data is loaded.

Methods

See the base Texture class for common methods.

Puzzles

Check out the create canvas elem and replace texture puzzles to manage canvas textures in a code-less manner.

Source

For more info on how to obtain the source code of this module see this page.