Capítulo 215 de 859

Chapter 215: CanvasTexture

Core Idea

Creates a texture from a canvas element.

This is almost the same as the base texture class, except that it sets Texture#needsUpdate to true immediately since a canvas can directly be used for rendering.

Key Concepts

  • isCanvasTexture : boolean (readonly): This flag can be used for type testing.

Reference Tables

Constructor

Signature
new CanvasTexture( canvas : HTMLCanvasElement, mapping : number, wrapS : number, wrapT : number, magFilter : number, minFilter : number, format : number, type : number, anisotropy : number )

Properties

PropertyDescription
.isCanvasTexture : boolean (readonly)This flag can be used for type testing.

Key Takeaways

  1. CanvasTexture extends: EventDispatcher → Texture
  2. Most relevant properties: isCanvasTexture.

Connects To