The 2D layer · const
DEFAULT_SPRITE_SLOTS
Texture slots, if the caller does not say.
Explained in Sprites and tilemaps.
const DEFAULT_SPRITE_SLOTS = 8import { DEFAULT_SPRITE_SLOTS } from '@driftengine/ui2d';In depth
Eight is a sheet for the world, one for the interface, and room to spare. It is not a GPU limit — each slot is its own bind group on WebGPU and its own object on WebGL2 — it is the number above which a caller should be asking why its 2D layer has that many atlases.