PixelPaintContext
What a pixel texture’s painter is given. y = 0 is the image’s top row,
as in a PNG and Godot’s Image.
Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
alpha |
PixelLayer |
Coverage, 0 to 1, opaque until painted: a cut-out’s mask. |
color |
PixelLayer |
sRGB colour, packed 0xRRGGBB, black until painted. |
emissive |
PixelLayer |
A linear emissive mask, 0 to 1, dark until painted. A texture that lights no texel carries no emissiveMap. |
height |
PixelLayer |
Linear height in texels, 0 until painted: the normal map’s source, so a pebble two texels high bumps as two texels of its side. |
random |
() => number |
The texture’s own stream, 0 up to 1, from the game’s texture seed and the texture’s name: every page paints the same pixels. Draw from it, never from Math.random. |
size |
readonly [number, number] |
The texture’s size in texels, [width, height]. |