A dark, museum-clean orbital simulator where draggable bodies spring into new orbits in real time. Perfect for EdTech STEM pages that need to make gravity, period, and resonance feel tangible rather than abstract.
// Drop the standalone harmonic-orbit-field.html into /public/effects/harmonic-orbit-field.html
// Or copy the HTML/CSS/JS tab directly into your component — zero external dependencies.
export function HarmonicOrbitFieldEmbed() {
return (
<div className="relative min-h-[480px] w-full overflow-hidden rounded-2xl border border-white/10">
<iframe
src="/effects/harmonic-orbit-field.html"
title="Harmonic Orbit Field"
className="h-full min-h-[480px] w-full border-0"
loading="lazy"
/>
</div>
)
}Loading single-file HTML…
Build a zero-dependency single-file HTML/CSS/JS component called "Harmonic Orbit Field" for an EdTech STEM platform. Surface: deep space #05070a with fine #0f1a24 grid lines and a soft radial vignette. Render with Canvas 2D at devicePixelRatio scaling, 60fps on mobile.
Structure: a central star (radial gradient #10b981 → #06b6d4 core), 3 orbiting bodies on independent elliptical tracks, each with a faint trail and a glowing halo. A soft radial "gravity well" gradient sits behind the star. Thin dashed orbit rings guide the eye without clutter.
Interaction: pointer/touch drag any body — it detaches and follows the cursor with spring physics (stiffness ~0.12, damping ~0.82). On release it eases back onto its nearest stable orbit (smoothed Kepler-ish speed = k / sqrt(radius)). Hovering a body brightens its trail and shows a small monospace label ("m₁ · T 4.2s"). A tiny control strip at the bottom offers pause/play and a speed dial (0.5×–2×).
Palette: bg #05070a, grid #0f1a24, accent #10b981, accentSecondary #06b6d4, text #cfe3e6, muted #4a6b73. Respect prefers-reduced-motion: freeze orbits into static positions with subtle pulse only. Listen for window message { type: "prompt-lab-theme", accent, accentSecondary } to update --accent and --accent2. No external assets, no libraries.WHY THIS WORKS IN PRODUCTION
- Drag-to-orbit with spring catch and smooth re-entry
- Kepler-style speed curve keeps motion readable
- Reduced-motion safe with static fallback
- Zero deps, single file, 60fps on mobile
DROP-IN SPECS // WEB & MOBILE FIT





