By · Updated

Lava Lamp Screensaver

Slow Blobs, Fullscreen in Your Browser

No ratings yet

Press Play to start

OneTask is free, with no sign-up, and built by one person.
If this tool saved you time, a coffee helps keep new ones coming.

How the Lava Lamp works

This lava lamp screensaver runs full screen in a browser. Press Play and a handful of soft blobs drift up and down, joining when they touch and pulling apart when they leave, the way wax does in a real lamp. Pick a colour, choose how many blobs, slow it right down and put it fullscreen on a screen you are not using.

Lava lamp screensaver: what it does and why

A lava lamp works by heating wax at the bottom of a bottle of liquid until it is slightly less dense than the liquid, at which point a blob rises, cools at the top, becomes denser again and sinks. The motion is slow, unpredictable and hypnotic, and it has been the model for "calm" screensavers since the first ones existed. This page draws the same thing without the wax.

How the blobs are drawn. Each blob is a point with a radius, and the picture is a metaball field: every pixel adds up the influence of every blob, falling off with the square of the distance, and pixels where the total is above a threshold are inside the lava. That is why two blobs approaching each other grow a neck between them before they touch, and why they separate with a stretch rather than a snap. The threshold contour is what makes it look like liquid instead of circles.

How they move. Each blob has a small upward or downward drift with a gentle pull toward the middle of the lamp, a little random jitter, and a soft bounce off the top and bottom. The result is the slow rise and fall of a lamp that has been on for an hour. Speed scales all of this; at 1 the blobs are barely moving and at 10 they bob like a lamp that has been shaken.

Colour and count. The four colour options each set a dark background, a main lava colour and a bright core, and the lava shades between the main and core colours depending on how deep inside the blob a pixel is. More blobs means more merging and splitting; two is sparse and twelve is a lamp that is mostly wax.

Performance. The field is computed at a quarter of the canvas resolution and scaled up, because every pixel checks every blob. At quarter resolution the picture is soft, which happens to be exactly right for a lava lamp, and it runs at full frame rate even in fullscreen on a large display.

FAQ

Why is it blurry?

The blob field is computed at reduced resolution and scaled up with smoothing, which keeps it fast on large screens. For this particular effect the softness is a feature — a real lamp has no sharp edges either — but if you save a PNG it will have the same soft look.

Can I make it slower?

Speed 1 is very slow, with blobs taking a minute or more to cross the screen, which is close to a real lamp. If you want it slower still, pause it: Play toggles pause and the still frame is the same picture.

Does it run when the tab is in the background?

No. Browsers stop animation frames for hidden tabs, so it pauses itself when you switch away and resumes when you come back. Fullscreen on a second display keeps it visible and therefore running.

Can I choose my own colours?

The four palettes cover the classic lamp colours. Each is a coordinated set of background, lava and highlight rather than a single colour, which is why they are named rather than offered as a colour picker.

See also: all Simulations & Screensavers tools, Images, Audio, Video & Screen, PDF, SVG, Generative Art, Chart Makers, 3D Model Viewers, Drawing Pads, Mockups & 3D Making, Diagram Makers, 3D Science, Tracker Music.

Related tools