I built PhysixLab — a 2D interactive HTML physics playground with physics phenomena you can play with using your mouse.
🌟 Physics Scenarios & Phenomena Included:
-
Rigid Body Demolition Yard
- Wrecking Ball & Brick Demolition: Swing a steel wrecking ball into multi-tier brick walls and explosive TNT crates.
- Soft Ragdolls & Pinball Plinko: Jointed ragdolls falling through peg arrays, bounce platforms, and gravity funnels.
- Domino Chain & Newton's Cradle: High-speed momentum transfer across dominoes, spring ramps, and steel collision cradles.
- Elastic Cloth & Tearable Rope Mesh: Tensile cloth bridges that stretch and tear under extreme stress or mouse slicing blades.
- Quantum Portal Cannon Loop: Paired non-Euclidean portals preserving momentum angle and kinetic velocity in infinite falling chutes.
-
Hydrodynamics & SPH Dynamic Liquids
- SPH Dam Break & Tsunami: High-density Smoothed Particle Hydrodynamics liquid with pressure forces, viscosity, and surface tension.
- Lava vs. Water Thermal Buoyancy: Viscous lava mixing with floating water droplets and solidifying obstacles.
- Interactive Hydro Vortex Mixer: Swirling centrifugal liquid pools with dye particles.
-
Falling Sand & Powder Alchemy
- Granular Sandbox: Cellular automata simulation featuring Sand, Water, Fire, Oil, Acid, Stone, Gunpowder, Lava, and Ice.
- Chemical Reactions & Volcanic Pressure: Fire ignites oil & gunpowder chain explosions; acid dissolves stone; lava vaporizes ice into steam.
-
Electrostatics & Electromagnetism
- Electric Dipoles & Plasma Arcs: Charge sources (+Q, −Q) rendering iron filing E-field vector lines and plasma discharge lightning strikes.
- Lorentz Field & Cyclotron: Magnetic forces (F=q(E+v×B)) curving electron beams into spiral cyclotron orbits.
-
Laser Optics & Dispersion
- Prism Chromatic Rainbow Spectrum: White laser light refracting through glass prisms according to Snell's law and splitting into RGB wavelength spectra.
- Mirror & Beam Splitter Matrix: Beam splitters, total internal reflection fiber guides, and rotating mirrors.
-
Relativity & N-Body Orbital Gravity
- Black Hole & Gravitational Lensing: Singularity event horizons warping spacetime light rays and swallowing accreting matter.
- Keplerian Solar System: Planetary orbits around a central mass with fading trajectory trails.
-
Chaos Theory & Non-Linear Pendulums
- Double Pendulum Chaos Attractor: Exact Lagrangian mechanics showing chaotic divergence (butterfly effect) with glowing neon trajectory ribbons.
-
2D Wave Tank & Acoustic Levitation
- Wave Ripple Interference: 2D finite difference wave equation solver demonstrating double slit diffraction patterns and standing acoustic wave levitation traps.
🧰 Interactive Mouse Tools:
- ✊ Hand Force Drag: Grab and fling any rigid body, ragdoll, charge, or optic mirror with realistic spring forces.
- ⚡ Radial Shockwave: Blast objects away with kinetic force shockwaves.
- 🧲 Tractor Beam: Pull particles and bodies toward your mouse cursor.
- ✂️ Laser Slicer: Slice ropes, cut fabric threads, clear sand, or erase charges.
- 💥 Explosive Detonator: Trigger TNT blasts or spawn local black holes.
- 🌀 Vortex Swirl: Spin liquids, objects, or optics in a tornado field.
- 🔫 Cannon Sling: Shoot cannonballs, liquid streams, and planets with custom launch vectors.
- 🖊️ Wall Brush: Draw static terrain barriers or choose falling sand alchemy elements.
- ⏱️ Stasis Gun: Freeze time in a localized temporal bubble around the cursor.
🔊 Synth Sound Effects & Telemetry HUD:
- Audio Effects: Built-in Web Audio API synthesizer generating collision clicks, laser hums, shockwave booms, portal zaps, and water splashes (with mute toggle).
- Telemetry HUD: Real-time FPS display, Kinetic Energy gauge (Ek), and active Entity counter.
- Visual Overlays: Velocity vectors, Force field lines, and Kinetic Heatmaps.
Files built: index.html, src/types/physics.ts, src/audio/soundEngine.ts, src/simulations/presetsData.ts, src/simulations/matterRigidBody.ts, src/simulations/sphFluid.ts, src/simulations/sphFluid.ts,replacement:, src/simulations/fallingSand.ts, src/simulations/fallingSand.ts,replacement:, src/simulations/electroMagnetic.ts, src/simulations/laserOptics.ts, src/simulations/nBodyGravity.ts, src/simulations/chaoticDoublePendulum.ts, src/simulations/waveTank.ts, src/components/Header.tsx, src/components/SidebarPresets.tsx, src/components/ToolsHotbar.tsx, src/components/PhysicsControls.tsx, src/components/TelemetryDashboard.tsx, src/components/HelpModal.tsx, src/components/PhysicsCanvas.tsx, src/App.tsx