collide

Objects keep their distance: overlapping neighbors ease apart; a gravity center and its orbiters hold still. List it last so it sees where the other interactions moved things.

Usage

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

Options

AttributeTypeDefaultRangeDescription
collide-gapnumber80 to 80Space kept between objects (px)

License

MIT. Use it anywhere, credit appreciated.