LavaLamp
On your display
A real lava lamp: wax blobs heat up, rise, merge, split and sink back down. Pick your colours.
- Topic
- Animations
- Includes
- Script
Runs on
- Runs on 32×8 (TC001 & DIY)
- Runs on 52×16 (TC002)
- Does not run on 32×8 with AWTRIX 3 (TC001 & DIY) Made for AWTRIX NG.
Choose your display in the next step.
Script description
LavaLamp
A real lava lamp on your clock: wax blobs warm up at the bottom, rise, cool off at the top and sink back down, merging and tearing apart on the way.
Panels: 32x8 and 52x16, and any other size: it scales · Needs: nothing, no account, no network
What it is
Not a loop. Every blob is a little piece of physics.
Wax warms up in the glowing puddle at the bottom, gets lighter and starts to rise. Near the top it cools, gets heavier and sinks back. Small blobs heat and cool faster than big ones, so they overtake each other on the way. When two meet, they merge into one smooth shape, then stretch and split apart again. A slow side-to-side drift keeps them moving, so it never repeats.
Hot wax glows brighter and yellower. Cooling wax fades back to your lava colour, with a soft edge into the liquid.
What to watch for
- A blob rising out of the bottom puddle, still attached by a thin neck before it lets go.
- Two blobs crossing paths and melting into one.
- The hot highlight fading as a blob reaches the top and turns back.
Any panel size
Tuned on the 32x8 and scaled with the panel height, so on a 52x16 the blobs keep the same proportions. Wider panels get more blobs (up to 6). The renderer runs in fixed-point maths and reaches up to 40 fps on a TC001.
Settings
| Setting | Default | What it does |
|---|---|---|
| Lava color | #FF3000 | Colour of the wax. Hot highlights are derived from it. |
| Background color | #200008 | The liquid around the wax. |
| Blobs | 4 | 2 to 6 on a 32x8, scaled up with panel width. |
| Speed | 3 | 1 (slow and lazy) to 10 (boiling). |
Try a green lava on a deep blue background, or purple on black.
Source
Source and other scripts: github.com/toinux/awtrixng
Sign in to view and copy the code of this script.
Discussion 0
Ask a question, suggest a change or share how you use it.
No comments yet. Start the conversation.
More scripts in Animations
Something wrong with this script? Report it.
Have an idea?
Sign in to ask questions and join the conversation.