useParticleCollider2dfunctionhooknacatamalon
useParticleCollider2d(options: { shape, enabled }) => TParticleCollider2dMakes this object solid to particles in a flat scene: sparks bounce off it and rain ends on it.
The shape is measured on the object, so it moves, turns and stretches with it. It only stops the effects whose file says how they collide; every other effect goes straight through, which is what smoke and glows want.
One per object. A staircase is one object per step, each with its own.
Parameters
options{ shape, enabled }The shape, and whether it starts on.
Example
const Ledge = () => {
useTransform({ x: 200, y: 300 });
useParticleCollider2d({ shape: { kind: 'rect', width: 120, height: 16 } });
};