Walk the scene graph and flip needsUpdate on every attribute and
material reachable from a Mesh / InstancedMesh. Three.js
re-creates buffers/programs lazily, but the explicit dirty flag is
the one knob that makes recovery deterministic for our custom
shader materials, instanced geometry, and pooled buffer attributes.
Pure with respect to the scene — does NOT mutate the graph itself,
only the attribute / material flags.
Walk the scene graph and flip
needsUpdateon every attribute and material reachable from a Mesh / InstancedMesh. Three.js re-creates buffers/programs lazily, but the explicit dirty flag is the one knob that makes recovery deterministic for our custom shader materials, instanced geometry, and pooled buffer attributes.Pure with respect to the scene — does NOT mutate the graph itself, only the attribute / material flags.