threejs-visualizations-with-good-quality-and-real-physics
Made by JeffBuild top-tier Three.js (threejs) visualizations — showcase scenes or real-physics sims with frankensim WASM. Use when making 3D or WebGL scenes, hero visuals, touch/mobile 3D controls, HUDs, or sim kernels.
From Jeffrey's Skills.md: professionally crafted skills for any AI agent, installed and kept in sync by the jsm CLI. Subscription only, $20/month.
Works With
Quality and Utility come from canonical skill metadata. Community ratings appear separately as stars when subscriber reviews exist.
Subscribe to download
Public previews are available, but downloads, CLI sync, and premium content require an active subscription.
Sign In to Subscribe- Full skill content with deterministic versioning
- CLI sync + local search index
- Access to Jeffrey’s premium library
Save to your account
Saved skills live in your cloud list. Run jsm sync on each machine to pull them locally.
What's New with this Skill
1Updates, enhancements, and release notes for this skill.
New: threejs-visualizations-with-good-quality-and-real-physics, the HUD prints what the kernel computed
Distilled from a museum site whose 54 Three.js exhibits were built and hardened in one 47-hour multi-agent campaign, then generalized past that origin. The skill opens with a mode gate: a showcase scene that only has to look good under nice controls, or real parameterized physics taught honestly, each with its own rulebook. Both modes share the invariant core: one studio harness, touch controls that leave page scrolling intact, and a HUD that can always be hidden.
- The mode gate is the first instruction: ask whether the user wants real physics and pedagogy or a showcase that looks incredible under nice controls. Determinism and the no-GLTF policy relax in showcase mode, and the reference says which rules relax and why.
- One law per exhibit, because one page once showed 1800 rpm and 3600 rpm for the same motor: a single step function feeds scene, schematic, badge, and audio through a parameter bus with alias canonicalization.
- Three forbidden tokens in visual components: Math.random, new THREE.Clock, performance.now. A source-grep test enforces the ban; a seeded LCG and a stateless sin-hash replace randomness; a fixed-dt scheduler with a three-tick catch-up bound and re-anchor replaces wall-clock dt.
- The WASM badge must be earned: module instantiated, exports probed, per-call envelope parsed, and the fallback is a real port of the same integrator. Out-of-domain inputs return typed refusals with stable codes; nothing silently clamps.
- Touch doctrine from shipped bugs: absolute pinch mapping from gesture-start distance, preventDefault gated on active gestures, pointer handlers that early-return on touch to stop double-handling, and a double-tap reset.
- renderer.setSize(w, h, false) is load-bearing: the false keeps Three from writing inline CSS that retriggers ResizeObserver and flashes black during scroll. Dispose ends with forceContextLoss because mobile Safari caps live WebGL contexts.
- A kernel catalog of about 56 browser-cheap closed forms with cited constants: Kloss slip on the stable branch, point kinetics calibrated so the historical pile configuration reads k=1.000, Magnus dew point, thin-wall hoop stress, quaternion exp-map with a small-angle Taylor branch.
- validate-viz.py checks a codebase for the documented bug classes, audit-viewports.cjs runs Playwright at 1440, 768, and 375 px, and scaffold-viz.py stamps a kernel, model, component, and registry stub that start out compliant, with TODOs to fill before running the checker.
- 61 pitfalls each carry the symptom, the root cause, the fix, and the standing detector; the worker transport is specified to byte level, including the run_epoch header word that stops a restarted worker's stale snapshot from being consumed and the leased ring that throws below three slots.
The doctrine is one law per exhibit: a single step function feeds the 3D scene, the 2D schematic, the telemetry badge, and the audio, because the alternative was observed directly; one page showed 1800 rpm and 3600 rpm for the same motor at the same time. A parameter bus with alias canonicalization keeps regenerated files from splitting the badge off the mesh. Determinism is enforced by a source-grep test that fails the build on Math.random, new THREE.Clock, or performance.now in visual components; presentation runs on frame-counter time while physics runs on a fixed-dt scheduler that refuses