Sets a pixel in the CanvasTexture to the given color and alpha values.
This is an expensive operation to run in large quantities, so use sparingly.
name | type | arguments | Default | description |
---|---|---|---|---|
x | number |
The x coordinate of the pixel to get. Must lay within the dimensions of this CanvasTexture and be an integer. |
||
y | number |
The y coordinate of the pixel to get. Must lay within the dimensions of this CanvasTexture and be an integer. |
||
red | number |
The red color value. A number between 0 and 255. |
||
green | number |
The green color value. A number between 0 and 255. |
||
blue | number |
The blue color value. A number between 0 and 255. |
||
alpha | number | <optional> | 255 |
The alpha value. A number between 0 and 255. |
This CanvasTexture.