gravity

One object is the center. The others orbit it on rings, farther rings turning slower like real orbits, or fall toward it and settle, in the plane of the page.

Usage

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

Options

AttributeTypeDefaultRangeDescription
gravity-strengthnumber0.60 to 1Strength (scene attribute gravity-strength)
gravity-gapnumber240 to 200Clearance from the center in px (an object's gravity-gap overrides)

License

MIT. Use it anywhere, credit appreciated.