Skip to content

robert-hoffmann/parallax-designer

Repository files navigation

Parallax Designer

A browser-based visual editor for designing and fine-tuning multi-layer parallax scenes. Build rich depth effects with stacked image layers, tweak motion and geometry in real time, then download a self-contained runtime HTML file you can deploy anywhere.

Fun Disclaimer πŸ™‚

I've been building web products for almost 30 years, and still love geeking out over UI, UX, DX, and product details.

This repo is me stress-testing agentic AI in public The app, UX polish, help systems, tests, docs, and deployment automation all came out of AI-driven workflows. (actually Codex 5.3 wrote 100% in this repo)

I'm also Scrum-certified (SM + PO), into business/software/tech intelligence and marketing psychology, and have been deep into AI and agentic workflows for a while now.

The goal is simple: learn what actually works, then bring those patterns into the workplace, and automate what is automatable If you want to steal the prompts, skills, and setup patterns, check .agents/, .github/, and .vscode/

Live Links

Parallax Designer geometry guide overlay

Features

Real-Time Parallax Engine

  • GPU-accelerated translate3d / scale transforms driven by pointer position
  • Per-layer lerp (smoothing), directional movement, and scale-boost on approach
  • Floating harmonics system with configurable dual-frequency sine waves on X and Y axes for organic idle motion
  • Scene-level 3D perspective rotation with adjustable maximum rotation angle
  • Live FPS counter to monitor rendering performance

Layer Management

  • Support for up to 30 layers per project
  • Drag-and-drop reordering with automatic z-index normalization
  • Add, duplicate, rename, show/hide, and delete layers
  • Per-layer geometry controls: position (top/left %), dimensions (width/height %), base Z depth, and base scale
  • Per-layer motion controls: lerp, scale boost, move X/Y, float X/Y, and float speed
  • Full background styling per layer: size mode (cover/contain/auto/custom), position anchoring with offset, repeat axes, blend modes, origin/clip box, and background color

Presets & Templates

  • Start from a 3-layer or 4-layer template, or begin with a blank canvas
  • Five built-in motion presets: Default, Dreamy, Responsive, Subtle, Dramatic
  • Preset strategy: "Replace Layers" to reset structure, or "Keep Current Layers" to patch motion values onto existing layers (matched by preset key, then index fallback)
  • One-click undo after preset application
  • Save, load, overwrite, and delete custom presets stored locally via IndexedDB

Image Asset Management

  • Upload images directly into the browser's local IndexedDB store (idb://asset/<id> references)
  • Select saved images from a dropdown or provide external paths/URLs
  • Asset usage tracking β€” see which layers reference each stored image
  • Delete individual assets or clear all local data

Project Import & Export

  • Copy JSON β€” full project payload to clipboard for backup or sharing
  • Import JSON β€” paste or upload a .json file to restore a project
  • Download HTML β€” generates a standalone runtime HTML file with engine logic and configuration embedded, ready to deploy

Schema & Validation

  • Versioned project schema (v3) with strict validation and normalization
  • Out-of-range numeric values are automatically clamped to defined constraints
  • Excess layers are trimmed with clear feedback
  • Normalization summary shown on import so you know exactly what changed

UI & Polish

  • Responsive overlay panel with tabbed navigation: Project, Scene, Layer
  • Layer inspector tabs: Basic, Geometry, Motion
  • Collapsible sections for background, setup/presets, transfer, and danger-zone actions
  • Double-click any slider label to reset a field to its default value
  • Contextual tooltip help system with docked help panel
  • Geometry guide mini-map showing layer framing relative to the viewport
  • Toast notification system for user feedback
  • Keyboard shortcut: press H to toggle the control panel
  • Internationalization (English and French) with a language toggle

Tech Stack

Layer Technology
Framework Vue 3 (Composition API, <script setup>)
Build Vite 7
Styling Tailwind CSS 4
Language TypeScript 5.9
Local Storage Dexie (IndexedDB wrapper)
Utilities VueUse, SortableJS
Color Picker vue-color
Testing Vitest, Playwright
Docs VitePress
Deployment GitHub Pages via GitHub Actions

Documentation

Full documentation is available at robert-hoffmann.github.io/parallax-designer/docs/, covering:

  • User Guide β€” UI walkthrough, layer management, backgrounds, presets, import/export
  • Technical Reference β€” Architecture, parallax engine, data model, components, composables
  • Advanced Topics β€” i18n, local storage, optimizations

To run the docs locally:

npm run docs:dev

Getting Started

Prerequisites

  • Node.js ^20.19.0 or >=22.12.0
  • npm (ships with Node)

Install & Run

# Install dependencies
npm install

# Start the dev server
npm run dev

Open the URL printed in the terminal (usually http://localhost:5173).

Build for Production

npm run build

Output is written to dist/. Preview locally with:

npm run preview

Quality Checks

# Fast validation: i18n + docs/source sync + type check
npm run check

# CI-equivalent local gate (no browser E2E): check + unit/integration + app/docs builds
npm run verify

Testing

# Unit tests (pure logic)
npm run test:unit

# Integration tests (composables + persistence boundaries)
npm run test:integration

# E2E tests (critical user journeys only)
npm run test:e2e

Default alias:

npm test

This currently maps to test:unit.

For the full testing guide, see:

Project Structure

src/
β”œβ”€β”€ components/          # Vue SFCs β€” scene, editors, controls, modals
β”‚   β”œβ”€β”€ controls/        # Reusable form controls (NumberField, SelectField, …)
β”‚   β”œβ”€β”€ modals/          # Modal dialogs (import JSON, confirm)
β”‚   └── project-settings/  # Settings panel accordion groups
β”œβ”€β”€ composables/         # Stateful composables (project state, I/O, assets, toasts, help)
β”œβ”€β”€ content/             # Help text content definitions
β”œβ”€β”€ core/                # Pure logic β€” engine, schema, constraints, defaults, export
β”œβ”€β”€ i18n/                # Internationalization config and locale files (en, fr)
└── types/               # TypeScript type definitions
tests/
β”œβ”€β”€ unit/                # Fast pure-logic tests (core helpers, schema, presets, etc.)
β”œβ”€β”€ integration/         # Composable + persistence boundary tests
└── e2e/                 # Playwright critical user-journey tests
public/
└── media/               # Sample layer images shipped with the starter templates
docs/                    # VitePress documentation site source
vitest.config.ts         # Vitest configuration
playwright.config.ts     # Playwright E2E configuration

License

See the repository for license details.

About

A visual editor for designing and fine-tuning multi-layer parallax scenes with real-time preview and HTML export.

Topics

Resources

License

Stars

Watchers

Forks

Contributors