1681-engine / index / blendLayer
Function: blendLayer() ​
ts
function blendLayer(stage, options?): Group;Defined in: src/core/blendLayer.ts:26
One container per stage (and name) for every sprite of a blend mode: lamp glows, portals, the glow under loot. Laid among the bodies by depth, each additive sprite switched the blend mode twice and split the sprite batch — in one game 85–97 draw calls a frame in a fight, two thirds of them blend changes; gathered here they are one run. The price is that they no longer sort with the bodies: the layer stands over all of them, so put a glow where its light falls rather than relying on a body to cover it. Made again if destroyed (a scene change).
Parameters ​
| Parameter | Type |
|---|---|
stage | Stage |
options | BlendLayerOptions |