CanvasTexture

(deprecated: since 17.1.0)
class CanvasTexture extends CanvasRenderTarget
See: CanvasRenderTarget

Constructor


new CanvasTexture(width: number, height: number, attributes: object) → {}
Parameters:
Name Type Attributes Default Description
width number

the desired width of the canvas

height number

the desired height of the canvas

attributes object

The attributes to create both the canvas and context

attributes.context boolean

<optional>

"2d"

the context type to be created ("2d", "webgl", "webgl2")

attributes.offscreenCanvas boolean

<optional>

false

will create an offscreenCanvas if true instead of a standard canvas

attributes.willReadFrequently boolean

<optional>

false

Indicates whether or not a lot of read-back operations are planned

attributes.antiAlias boolean

<optional>

false

Whether to enable anti-aliasing, use false (default) for a pixelated effect.


Powered by webdoc!