Skip to content

1681-engine / pixel / paintLayer

Function: paintLayer() ​

ts
function paintLayer(stage, o): PixelLayer;

Defined in: src/pixel/paintLayer.ts:46

One effect as its own PixelLayer, redrawn at fps and shown as a single texture: it follows its anchor to the screen pixel while the art inside stays on the world grid, thins out pixel by pixel over its last frames (ordered dither, setCoverage), is neither painted nor uploaded while its anchor is off the screen by more than it has reached, and is destroyed when it ends, when alive says so, or with the stage's tweens.

Parameters ​

ParameterType
stageStage
oPaintLayerOptions

Returns ​

PixelLayer

Released under the MIT License.