The .drft container · const
SDFV_MAX_SAMPLES
The most samples one field may declare.
Explained in The .drft container.
const SDFV_MAX_SAMPLES: numberimport { SDFV_MAX_SAMPLES } from '@driftengine/drft';In depth
A bound on the count, not a bound on ambition. The product of three u32s read out of a
file overflows a double at 2^53 and is a plausible number long before that, so a corrupt entry
asks for an allocation that either throws somewhere unhelpful or succeeds and eats the tab. A
512-cubed field is 537 MB at four bytes a sample, which is far past anything a per-object bake
produces and is comfortably under where the arithmetic stops being trustworthy.