The 2D layer · const

SPRITE_FLOATS

Floats per instance: two edge vectors, a UV rectangle, a tint, and an origin.

Explained in Sprites and tilemaps.

const SPRITE_FLOATS = 14
import { SPRITE_FLOATS } from '@driftengine/ui2d';

In depth

Fourteen rather than a rounder sixteen because a vertex buffer's stride only has to be a multiple of four bytes, and two floats a sprite is 8 KB at a four-thousand-sprite batch.