InstancedMesh for performance. Useful for debugging contact behavior.
Usage
Customized
Props
number
default:"100"
Maximum number of contact points to render. Limits are important to avoid WASM out-of-memory when reading contact data.
number
default:"0.005"
Sphere radius for each contact marker.
string
default:"#4f46e5"
Color of the contact markers.
boolean
default:"true"
Toggle visibility. Useful for a debug panel toggle.
Notes
- Contact data is read from
data.contactevery frame - Access is wrapped in try/catch since contact reads can fail if
nconis large - The component always checks
data.nconbefore iterating contacts - Uses
InstancedMeshfor efficient rendering of many small spheres