Interfaces
SpriteBuffer
A shared sprite buffer for <Atlas buffer count>: capacity sprites of
SPRITE_FLOATS floats each, written in place and read by the renderer
at draw. set is a worklet - call it from either thread; it writes the same
native memory. Write data directly for bulk updates on the JS thread.
Without the native module (tests, web) id is 0 and the atlas falls back to
its inline sprites list.
Properties
capacity
readonly capacity: number;data
readonly data: Float32Array;The JS thread's raw floats, capacity * SPRITE_FLOATS long.
id
readonly id: number;Methods
set()
set(
i: number,
srcX: number,
srcY: number,
srcW: number,
srcH: number,
scale: number,
x: number,
y: number): void;Write sprite i: source rect, uniform scale, and the sprite's centre.
Parameters
i
number
srcX
number
srcY
number
srcW
number
srcH
number
scale
number
x
number
y
number
Returns
void