repel

Objects near the pointer are pushed away from it and spring back when it leaves.

Usage

Set interaction="repel" on the scene. Interactions are scene rules: they work on every object inside, whatever its type. Several run in the order written.

Options

AttributeTypeDefaultRangeDescription
repel-radiusnumber14020 to 400Reach around the pointer (px)
repel-strengthnumber0.60 to 1Push strength

License

MIT. Use it anywhere, credit appreciated.