Snow Simulator
Prompt
Build ONE self-contained index.html blizzard POV simulator. No other files. Use Three.js from a CDN. No build step. GOAL First-person eye-level view of standing in a Northeast US snowstorm. Must feel atmospheric, not a particle toy. Implementation only β no essay. HARD SCOPE (do not exceed) - One HTML file, inline CSS + JS - Three.js + one canvas, no extra libraries - No custom GLSL files; simple materials / Points / sprites only - No WebGPU - Target 40β60fps on a laptop; cap particles (near 400, mid 2500, far 6000, ground 800). If FPS drops, cut far particles first. - Do not write a game engine, physics engine, or postprocessing stack SCENE - Flat-ish snow ground with cheap height variation (vertex colors or a few displaced planes) - 20β40 simple dark tree meshes or instanced cones in mid/far - Overcast gray sky + fog - Subtle idle camera sway (breathing), very small - Desktop: mouse-drag look, limited yaw/pitch - Mobile: touch-drag look - No WASD walking SNOW β 3 LAYERS + GROUND 1) Near: fewer, larger, irregular flakes, some motion streak via stretched points 2) Mid: most snow; gravity + wind + mild turbulence; not parallel rain lines 3) Far: tiny dense specks that merge into fog 4) Ground blow: particles skimming the surface when wind is high Particles must not all be identical white circles. Vary size/opacity/alpha. No CSS snow. COUPLED WEATHER (this is the eval) Controls must change physics, not just overlays. Sliders: - Snow rate: 0.1β5.0 in/hr, show value - Flake size: Fine β Large (change SIZE DISTRIBUTION, not one global scale) - Wind: 0β60 mph, show value Toggles: - Day / Night (smooth 0.6s lighting/fog change; night is actually darker + tighter fog + near flakes catching dim light β NOT a black overlay) - Sound on/off, default OFF Interaction examples the code must produce: - 4 in/hr + 5 mph β dense, mostly vertical - 4 in/hr + 50 mph β near-horizontal, heavy ground blow, poor visibility - 0.5 in/hr + 50 mph β sparse fall, lots of drifting surface snow Gusts: wind speed wanders Β±30% on a 4β10s irregular cycle. Gusts increase horizontal speed, ground blow, fog density, and audio gain, then ease. No obvious sine loop. VISIBILITY Show a live readout: VISIBILITY X.XX mi Compute from rate + wind + gust. High rate and high wind approach whiteout by increasing fog density / lowering contrast / thickening far layer β NEVER a full-screen white div. AUDIO (optional quality, keep short) Web Audio: filtered noise wind + gust gain. Silent until Sound is ON. User gesture to start. UI Full-viewport canvas. Compact frosted bar at bottom. Desktop row: Snow | Size | Wind | Day/Night | Sound | Visibility Mobile: wrap to 2 rows, fat sliders. Meteorology look, not a game HUD. DEFAULTS Snow 2.0 in/hr, Size Normal, Wind 30 mph, Day, Sound off. OUTPUT RULES - Return only the HTML document (ok to wrap in one markdown fence) - Must run by opening the file locally - No placeholders, no βadd textures laterβ, no multi-file project - Keep total code under ~700 lines - Prefer working + coupled controls over photoreal shaders
A system prompt was added to support web rendering