Skip to content

SpriteGroupOptions

Defined in: packages/three-flatland/src/pipeline/types.ts:72

Options for SpriteGroup.

optional autoInvalidateTransforms?: boolean

Defined in: packages/three-flatland/src/pipeline/types.ts:95

Automatically invalidate transforms every frame (default: true). Enable for games where sprites move frequently. Disable for static UIs and call invalidateTransforms() manually. Note: Property changes (tint, alpha, etc.) don’t need this - they write directly to buffers.


optional autoSort?: boolean

Defined in: packages/three-flatland/src/pipeline/types.ts:88

Enable automatic sorting (default: true)


optional clipRect?: ClipRect | null

Defined in: packages/three-flatland/src/pipeline/types.ts:97

Local-space clipping rectangle. WebGPU renderer only.


optional expectedSprites?: number

Defined in: packages/three-flatland/src/pipeline/types.ts:80

Advisory sprite count used to reserve hot CPU-side storage during construction. It does not cap enrollment or pre-create GPU batches. React Three Fiber users pass a stable options object through args (for example, one created with useMemo) and reconstruct the group to change it; it is intentionally not a mutable JSX property.


optional frustumCulling?: boolean

Defined in: packages/three-flatland/src/pipeline/types.ts:90

Enable frustum culling (default: true)


optional maxBatchSize?: number

Defined in: packages/three-flatland/src/pipeline/types.ts:86

Maximum sprites per batch. Must be a positive safe integer no greater than the world’s 20-bit entity capacity (1,048,576). Omit to use 1024 → 4096 → 16384 capacity tiers; set a value to pin every batch.