CanvasTexture
class CanvasTexture extends CanvasRenderTarget
Constructor
new CanvasTexture(width: number, height: number, attributes: object) → {}
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. |
Summary
Methods inherited from CanvasRenderTarget
Clears the content of the canvas texture |
|
ImageData |
|
|
|
|
|
|
|
Promise |
|
Promise |
|
Promise |
|