wrapWithLightFlags
wrapWithLightFlags(
lightFn):ColorTransformFn
Defined in: packages/three-flatland/src/lights/wrapWithLightFlags.ts:21
Wrap a light ColorTransformFn with a per-instance lit-bit gate.
Uses readLitFlag + select() to bypass lighting for sprites
whose lit flag is not set. Only needed for batched sprites —
standalone usage can assign the raw lightFn directly.
This is the only light-specific helper in the per-instance-accessor
family; the raw accessors (readFlip, readShadowRadius,
etc.) live in materials/instanceAttributes.ts alongside the
flag-mask constants that define the bit layout. They’re re-exported
from this module’s barrel for convenience and backward compatibility.
Parameters
Section titled “Parameters”lightFn
Section titled “lightFn”The lighting ColorTransformFn to wrap
Returns
Section titled “Returns”A new ColorTransformFn that gates lighting per instance