shockwave
A tap sends a ring out across the scene: shapes it crosses are shoved outward, flash, and spring back.
Add the script once, then use the tags anywhere.
<script type="module" src="https://mmaxence.github.io/solids/solids.js"></script>
Or copy the library into your project: download solids.js from the repo and serve it yourself. No build step, no other files.
Usage
Set interaction="shockwave" on the scene. Interactions are scene rules: they work on every object inside, whatever its type. Several run in the order written.
Options
| Attribute | Type | Default | Range | Description |
|---|---|---|---|---|
shockwave-radius | number | 480 | 60 to 1600 | How far the ring travels (px) |
shockwave-strength | number | 0.7 | 0 to 1 | Shove strength |
shockwave-speed | number | 900 | 100 to 3000 | Ring speed (px per second) |
License
MIT. Use it anywhere, credit appreciated.