Physics Engine · WASM Color Science

MATERIAL
LAB

4 physical simulations — fire plasma, SPH fluid, Verlet cloth,
cellular molten metal — colors derived in real-time via Momoto OKLCH.

WebGL · IGNIS SPH · AQUA Verlet · VELUM CA · FERRUM
Momoto WASM initializing…
WebGL · Heat Field

IGNIS

Fire plasma — semi-Lagrangian advection with GPU heat diffusion.

60fps
res
Move cursor · adds heat
Diffusivity0.065
Cooling/frame97.45%
Sourcebottom + cursor
Color engineMomoto OKLCH ramp
Canvas · SPH

AQUA

SPH fluid — pressure + viscosity forces with metaball rendering.

60fps
120ptcl
Click · repels · Move · attracts
Smoothing h42px
Stiffness k420
Viscosity μ28
Particles120
Canvas · Verlet

VELUM

Cloth/silk — Verlet integration with structural + shear springs.

60fps
252nodes
Hover · pulls cloth
Grid18 × 14
Iterations4 / frame
Damping98.5%
Windsinusoidal
Canvas · Cellular

FERRUM

Molten metal — cellular automaton with 3-phase transitions.

60fps
0%molten
Hover · heats metal (forge)
Grid96 × 72
Conductivity0.18
Melt pointT = 0.35
VaporizeT = 0.80

Momoto OKLCH Inspector

Live color derivation — simulation heat → OKLCH → 6 UI states via TokenDerivationEngine. Cache: 0 entries

Engine: singleton · warm cache

Implementation — 3 Iterations

IT 1

Core Simulation

  • WebGL heat field (IGNIS) — ping-pong FBOs, GLSL advection + diffusion
  • SPH fluid (AQUA) — density/pressure/viscosity forces, gradient rendering
  • Verlet cloth (VELUM) — constraint relaxation, triangle mesh
  • Cellular automaton (FERRUM) — Laplacian diffusion, phase transitions
  • Momoto buildFireRamp(256) — 256-step OKLCH gradient, zero WASM in RAF
IT 2

Interaction + Color

  • Mouse/touch heat injection in all 4 simulations
  • Momoto singleton TokenDerivationEngine — warm Rust cache across calls
  • Live OKLCH inspector — 6 derived states update every 500ms
  • batchDeriveFast() — single WASM round-trip for 4 palettes
  • getInteractionColor()determine_ui_state() + derive_token_for_state()
IT 3

Polish + Deploy

  • Adaptive resolution (DPR, simW = canvasW/3 for IGNIS GPU efficiency)
  • Momoto getMaterialPalette() — specular/shadow/glow/edge tokens per card
  • WCAG contrast validation on card backgrounds via checkContrast()
  • Reduced-motion: simulations freeze on prefers-reduced-motion: reduce
  • Cloudflare Pages: wrangler deploy — static, 0 runtime servers