Skip to content
TheChatArchiveThe Chat Archive
Claudeclaude-opus-4-7-thinking-webdev· AnthropicHugging Face Arena WebDev Preferences (2026)

please make a interactive pixelart safe. the safe must be shown from more than one side…

  1. User

    please make a interactive pixelart safe. the safe must be shown from more than one side and the door must be interactive. no "secret", just click to open door

  2. Claude Assistant

    I'll build an interactive pixel-art safe with both a flat front view and a 3D isometric view, where clicking the door opens/closes it (with contents revealed inside).

    Let me start by looking at the project structure.

    Now I'll create the pixel-art Safe component with all its parts (frame, door, interior) using SVG rects for a crisp pixel look.

    Now the two views — a flat front view and a 3D perspective view — that share the open/close state:

    Now let me wire it up in App.tsx with a nice layout:

    Now let me add the pixel-art font via index.html and check the index.css:

    Now let me build to check for errors:

    I notice an issue — the front frame currently paints the door hole with a solid color, which will cover the interior when the door swings open. Let me fix it so the hole is truly cut out:

    Let me rebuild to verify everything still compiles:

    Wait — I spot another bug. The outline rect fills the entire 40×44 area first (including the hole), so the hole would be black, not transparent. Let me fix that:

    Let me add a hover effect and a click hint to make the interactivity more obvious:

    Now let me apply the pixel-door class to the interactive door elements and add a floating "CLICK ME" hint when the safe is closed:

    Now let me add a bobbing "click me!" hint in App.tsx below the safes when closed:

    Everything builds cleanly. Here's what I built:

    🔐 Interactive Pixel Safe

    Two synced views:

    1. Front (flat) view — a 40×44 pixel safe drawn entirely with SVG <rect> pixels (crisp edges, no antialiasing):

      • Recessed door frame with corner rivets and edge bevels
      • Door with golden combination dial, chunky lever handle, corner screws, and visible left-side hinges
      • Interior revealed on open: wooden shelves, stacked gold bars, cash bundles with red straps, gold coins, and red/blue/green gems with sparkles
    2. 3D perspective view — same pixel faces arranged as a box using CSS 3D transforms:

      • Front face (with a real cut-out hole in the frame so the interior shows through)
      • Top face with carrying grip
      • Right side face with vertical seam and column of rivets
      • Rotated with perspective + rotateX/Y for depth

    Interactive door: clicking the door on either view (or the central Open/Close button) swings both doors open on their left hinge via a smooth rotateY(-115deg) animation. Interior contents are revealed behind.

    Nice touches:

    • Hover glow (yellow drop-shadow) on the doors
    • Keyboard accessible (Enter/Space, focus ring)
    • Bobbing "↑ click the door ↑" hint below each safe when closed
    • Live status readout with pulsing red/green indicator
    • Retro Press Start 2P pixel font, dark purple gradient background

    Files created:

    • src/Safe.tsx — pixel-art SVG parts (FrontFrame, Interior, Door, SideFace, TopFace)
    • src/SafeViews.tsx — FlatSafe and IsoSafe components that wire faces together and handle the door animation
    • src/App.tsx — page layout, header, both views, toggle button, status
    • src/index.css — hover/focus states + bob animation
    • index.html — updated title + Google Font

    Files built: index.html, src/Safe.tsx, src/SafeViews.tsx, src/App.tsx, src/index.css