Skip to content

Class: MaskPlanner ​

Defined in: ssplayer-core/dist/index.d.ts:5163

Engine-agnostic SpriteStudio mask planner. Given one context's frame (via a MaskPlanSource), produces the writer set a renderer needs to rasterise the coverage bitmap and replay it: per-writer draw rank, packed bit, OP (increment/invert), clipping flag, cutout texture hash + threshold, geometry kind, and the replay meta. The renderer owns the GPU-specific parts (offscreen target, shaders, vertex buffers); this owns the selection/classification logic, which is identical across engines.

Output is reusable SoA, valid until the next plan() call. bit === index, so writer w's coverage bit is w.

Constructors ​

Constructor ​

new MaskPlanner(): MaskPlanner

Returns ​

MaskPlanner

Properties ​

bit ​

readonly bit: Int32Array<ArrayBuffer>

Defined in: ssplayer-core/dist/index.d.ts:5166


count ​

count: number

Defined in: ssplayer-core/dist/index.d.ts:5177

Number of finalized writers from the last plan().


exceeded ​

exceeded: boolean

Defined in: ssplayer-core/dist/index.d.ts:5179

True when the writer cap was reached (extra masks dropped).


geomKind ​

readonly geomKind: Uint8Array<ArrayBuffer>

Defined in: ssplayer-core/dist/index.d.ts:5171


isClipping ​

readonly isClipping: Uint8Array<ArrayBuffer>

Defined in: ssplayer-core/dist/index.d.ts:5168


meta ​

readonly meta: Float32Array<ArrayBuffer>

Defined in: ssplayer-core/dist/index.d.ts:5175

Replay metadata (drawRank, bit, opInvert, isClipping) x MAX, consumed by the masked shader.


numIndices ​

readonly numIndices: Int32Array<ArrayBuffer>

Defined in: ssplayer-core/dist/index.d.ts:5173


numVerts ​

readonly numVerts: Int32Array<ArrayBuffer>

Defined in: ssplayer-core/dist/index.d.ts:5172


opInvert ​

readonly opInvert: Uint8Array<ArrayBuffer>

Defined in: ssplayer-core/dist/index.d.ts:5167


partIdx ​

readonly partIdx: Int32Array<ArrayBuffer>

Defined in: ssplayer-core/dist/index.d.ts:5164


rank ​

readonly rank: Int32Array<ArrayBuffer>

Defined in: ssplayer-core/dist/index.d.ts:5165


textureHash ​

readonly textureHash: Uint32Array<ArrayBuffer>

Defined in: ssplayer-core/dist/index.d.ts:5169


threshold ​

readonly threshold: Float32Array<ArrayBuffer>

Defined in: ssplayer-core/dist/index.d.ts:5170

Methods ​

plan() ​

plan(src): number

Defined in: ssplayer-core/dist/index.d.ts:5185

Plan the mask writers for one context's frame. Returns the finalized writer count and fills the SoA fields above.

Parameters ​

src ​

MaskPlanSource

Returns ​

number