About this simulation

Step inside a real-time 3D snow globe rendered entirely in WebGL. Up to 4,000 individual snowflakes drift through a glass sphere — each one governed by terminal-velocity physics, sinusoidal swirl currents, and a custom GLSL shader that renders soft, blue-white ice crystals. Hit Shake and watch the whole scene erupt before the flakes slowly settle back under gravity.

🔬 What it shows

Each snowflake reaches terminal velocity when gravity is exactly balanced by air drag. Because a real flake's flat, branched shape creates huge drag relative to its tiny mass, that terminal speed is only about 1–2 m/s — far slower than a raindrop. The simulation models this by assigning each particle a gentle constant fall rate, with per-flake random variation so no two flakes move identically.

🎮 How to use

Use Snow amount (500–4,000) to trade density for performance. Fall speed scales how fast flakes descend — push it up for a blizzard, pull it down for a dreamy drift. Swirl strength adds sinusoidal turbulence in the horizontal plane, mimicking eddy currents. Flake size adjusts the rendered point size. Click Shake! to inject an upward velocity burst that decays over about a second.

💡 Did you know?

Snow globes were invented around 1900 and originally used white porcelain chips as "snow." Modern collectibles use fine plastic particles in distilled water mixed with glycol to slow the settling — exactly what the Swirl and Fall Speed sliders replicate here. The glass sphere in this simulation uses a two-pass rendering trick (front face + back face) to create the illusion of refraction without expensive ray-marching.

Frequently asked questions

Why do snowflakes fall so slowly compared to rain?

A snowflake's flat, six-branched dendrite shape gives it an exceptionally high surface-area-to-mass ratio. Air drag scales with area while gravity scales with mass, so the drag-to-weight ratio for a flake is far higher than for a compact raindrop. Equilibrium (terminal velocity) is therefore reached at only 1–2 m/s — you can increase the Fall Speed slider beyond 1.0 to see what a heavier particle would look like.

What does the Swirl strength slider actually change?

It scales the amplitude of two sinusoidal offsets applied to each flake's X and Z position over time — one oscillating at 0.7 rad/s, the other at 0.53 rad/s. The two slightly different frequencies create a quasi-random tumbling motion that never exactly repeats, mimicking the eddy currents that form inside a real shaken snow globe. Setting it to 0 gives perfectly straight vertical fall; at 2.0 the flakes spiral dramatically.

How does the Shake button work?

Clicking Shake sets an internal shakeDecay value to 1.0. Every animation frame this value is reduced by 1.4× delta-time, so it fades to zero in about 0.7 seconds. While non-zero, the GLSL vertex shader adds an upward velocity (shakeY) and random lateral offsets (shakeX, shakeZ) to each flake proportional to shakeDecay — producing the characteristic burst-then-settle arc.

What is the maximum number of snowflakes and why?

The slider caps at 4,000 particles. Each flake is a GPU point sprite processed in a custom vertex shader, so performance is excellent even at the maximum — but beyond a few thousand the sphere interior becomes so densely packed that individual flakes are no longer distinguishable. The default of 2,000 gives the best visual balance between density and legibility of individual crystal shapes.

Can I orbit the camera around the globe?

Yes — click and drag on the canvas to orbit, scroll to zoom in and out, and right-click (or two-finger drag on mobile) to pan. The camera uses Three.js OrbitControls with damping enabled, so it glides smoothly to a stop rather than snapping. Zoom is clamped between 2.5 and 12 units so you can never clip inside the base or fly so far that the globe disappears.