Functions & Hooks

spriteFloats

function spriteFloats(buffer: SpriteBuffer): Float32Array;

This runtime's floats over a SpriteBuffer's memory, SPRITE_FLOATS per sprite: the bulk path for a worklet that fills thousands of sprites a frame, where a set call per sprite is the cost. A worklet must go through this - its captured data is a clone. Cached per runtime, so a per-frame call allocates nothing after the first.

Parameters

buffer

SpriteBuffer

Returns

Float32Array

On this page