THREE.JS / FOUNDATIONS 55

The floaters push back.

A TSL struct stores position and velocity per instance. A compute kernel samples the living surface, then the vertex stage renders the same data.

Initializing structured instances—
Preparing the height field and per-floater storage.

Click and drag across the pool to disturb the surface. Each floater samples a clamped height-field cell, follows the normal-driven push, and bounces inside the pool bounds.

LAB 55 / STRUCTURED COMPUTE