
Marquee that speeds up with scroll
Scroll, Text, Hover
Lifetime
Tool pills fall into a box with real physics: they bounce, pile up, and can be grabbed with the mouse or a finger and thrown.
A folder that runs on its own: index.html, style.css, script.js and the libraries from a CDN.
The code for this animation is part of lifetime access.
The preview stays open: watch it, slow it down, try it on your phone.
Lifetime accessThe pills are HTML elements (text readable by screen readers, styled with CSS). For each one Matter.js creates a rectangle with corners rounded to half its height: the same shape, but invisible.
Physics advances in 1/60 s steps with an accumulator, independent of frames: with variable steps Matter becomes unstable. After each step the pills copy their bodies’ position and rotation through a transform.
Every body’s inertia is multiplied by 2.5: the pills tilt and roll little, so they almost never end up upside down.
On pointerdown an elastic constraint ties the grabbed point to the pointer; moving moves the constraint’s end. On release the constraint goes away and the pill’s speed becomes the throw. setPointerCapture keeps the drag going outside the pill.
| Name | File | Default | What it changes |
|---|---|---|---|
GRAVITA | script.js | 1.1 | Gravity: higher, they fall faster and bounce less. |
RIMBALZO / ATTRITO | script.js | 0.3 / 0.4 | How much they bounce and how much they grip each other. |
RIGIDITA | script.js | 2.5 | Multiplies rotational inertia: higher, they flip less. |
INTERVALLO | script.js | 90 | Milliseconds between one drop and the next. |
For a list that does not need to be read in order: tools, skills, clients, ingredients. It is a toy: the same information should also be there in a normal form.
It works with a finger. Only the pills block scrolling (touch-action none): touching outside the pills scrolls the page normally.
No physics: the pills sit in a row, still and readable.
Matter.js 0.20.0, Mona Sans (font variabile) 5.3.0.
Weight: 10 KB of our own files.
Tested on 27 September 2026
Use it in your own projects and in your clients’ projects. Do not resell it or redistribute it as is. GSAP stays under its own Standard license. Full license.
With your account’s email and password.
You’re signed in as .
Your plan is free. When lifetime access arrives, it will switch on for this same account.