Thanos Snap Gauntlet
An interactive pixel gauntlet using 48-frame CSS steps() sprite sheets and an HTML5 Canvas particle field. Clicking Snap dissolves scoped target cards into drifting dust; clicking again reverses time to restore them.
SANDBOX // TARGET
Target Module
Isolated target card. Dissolves into pixel dust without mutating page layout.
click gauntlet
Interactive Controls
soundEnabled
Installation
Zero external dependencies — drop the source files directly into your project.
Required Public Assets
Place these sprite sheets and optional audio cues under public/:
- /easter-egg/thanos/idle-light.png
- /easter-egg/thanos/idle-dark.png
- /easter-egg/thanos/snap-light.png
- /easter-egg/thanos/snap-dark.png
- /easter-egg/thanos/time-light.png
- /easter-egg/thanos/time-dark.png
- /easter-egg/thanos/thanos_snap_sound.mp3
- /easter-egg/thanos/thanos_reverse_sound.mp3
Props API
| Prop | Type | Default | Description |
|---|---|---|---|
| soundEnabled | boolean | true | Enables snap and Time Stone reverse audio cues when clicked. |
| label | string | "Target Module" | Heading displayed inside the scoped demo target card. |
- Standalone sandbox variant scopes particle bounds strictly to the target container via Canvas 2D.
- Supports light and dark sprite variants via documentElement .dark class observation.
- Locks duplicate clicks while the 2.25s 48-frame sprite animation plays.
Source Files
"use client";
import React, { useCallback, useEffect, useRef, useState } from "react";
import styles from "@/components/GauntletTrigger.module.css";
type GloveMode = "idle" | "snap" | "settled" | "time";
interface DustParticle {
x: number;
y: number;
vx: number;
vy: number;
size: number;
alpha: number;
decay: number;
color: string;
}
export interface ThanosGauntletSandboxProps {
soundEnabled?: boolean;
label?: string;
}
export function ThanosGauntletSandbox({