PixelLayer
One layer of a pixel texture as its painter writes it. A texel past an edge wraps onto the opposite one, and a coordinate that is no whole number floors, so a stroke across an edge continues on the far side and the texture tiles.
Methods
Section titled “Methods”readPixel()
Section titled “readPixel()”readPixel(
x,y):number
The value at texel (x, y), as this layer holds it now.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
x |
number |
y |
number |
Returns
Section titled “Returns”number
setPixel()
Section titled “setPixel()”setPixel(
x,y,value):void
Writes value at texel (x, y): Godot’s set_pixel and Unity’s
SetPixel.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
x |
number |
y |
number |
value |
number |
Returns
Section titled “Returns”void