A full-bleed kinetic warp tunnel that steers with the cursor and boosts speed on press — built for gaming launch pages, hero sections, and media splash screens. It feels great because the depth motion is instantly legible and every interaction lands with a tactile chromatic snap.
// Drop the standalone chromatic-warp-portal.html into /public/effects/chromatic-warp-portal.html
// Or copy the HTML/CSS/JS tab directly into your component — zero external dependencies.
export function ChromaticWarpPortalEmbed() {
return (
<div className="relative min-h-[480px] w-full overflow-hidden rounded-2xl border border-white/10">
<iframe
src="/effects/chromatic-warp-portal.html"
title="Chromatic Warp Portal"
className="h-full min-h-[480px] w-full border-0"
loading="lazy"
/>
</div>
)
}Loading single-file HTML…
Build a full-viewport "Chromatic Warp Portal" hero effect for a dark gaming launch page using only vanilla HTML, CSS, and a single Canvas 2D context — zero dependencies, 60fps on mobile.
Structure: a <canvas> filling a dark obsidian stage (#07050c) with a subtle vignette overlay div and a centered minimal HUD title block (small caps label + one bold line) that fades in on load.
Mechanics: maintain ~120 concentric rings receding toward a vanishing point at the exact center. Each ring has a radius that grows by a fixed depth rate; when it exceeds max radius, recycle it to the center. Draw each ring as a thin stroked circle with a slight rotation offset and a hue that interpolates between --accent (#f43f5e) and --accent2 (#a855f7) based on depth. For chromatic punch, render each ring three times with tiny red/blue offsets scaled by speed. Pointer position steers the vanishing point (lerp, ~0.08) and pointer velocity adds a speed multiplier (clamped 1–3.5). On pointerdown/touchstart, spike the speed and briefly widen the chromatic offset, then ease back. Add faint radial spokes for depth cues.
Touch/mobile: use pointer events, cap devicePixelRatio at 2, resize via ResizeObserver. Respect prefers-reduced-motion by rendering a single static frame with slow ambient drift only.
Accessibility: canvas is aria-hidden, HUD text is real DOM, keyboard-focusable CTA. Listen for window message { type: "prompt-lab-theme", accent, accentSecondary } to live-update --accent and --accent2.WHY THIS WORKS IN PRODUCTION
- Pointer steers vanishing point; velocity drives warp speed smoothly
- Triple-pass ring draw gives real chromatic punch without shaders
- Press/touch spikes speed then eases back for tactile feedback
- DPR-capped canvas + reduced-motion static frame keeps mobile at 60fps
DROP-IN SPECS // WEB & MOBILE FIT







