Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/hetari/creative-coding/llms.txt

Use this file to discover all available pages before exploring further.

Creative Coding is a structured, high-performance workspace for reproducing, experimenting with, and learning from creative coding techniques. Built on Vue 3, Vite 8, and TypeScript, it unifies rendering libraries — PixiJS 8, p5.js 2, Three.js 0.184 / TresJS, and GSAP 3 — under a single consistent architecture: composable-based lifecycle management, a central typed registry, and a two-file dynamic routing shell. Rather than scattering sketches across a file-router’s folder tree, the playground separates what you build (src/sketches/) from how it gets discovered (src/config/sketches.ts) and how it gets served (src/pages/), so adding a new experiment is always a one-step edit.

Quickstart

Clone the repo, install dependencies, and have your first sketch running in under five minutes.

Project Structure

Understand the three-layer architecture: sketches, registry, and routing shell.

Adding a Sketch

Step-by-step guide to creating a new sketch from scratch and registering it.

usePixiApp Composable

API reference for the PixiJS lifecycle composable used by every canvas sketch.

Core Architecture

The playground is built around three distinct layers that each carry one responsibility and one responsibility only.
  1. src/sketches/ — Creative implementations live here. A sketch folder can contain a Vue component, GLSL .vert/.frag shaders, textures, math helpers, and any domain-specific utilities. This directory is never touched by the router generator.
  2. src/config/sketches.ts — A single typed SKETCHES array is the sole source of truth for every experiment in the playground. Each entry declares an id, title, category, path, order, previewMode, optional resources, and a dynamic component loader. Adding or removing a sketch means editing exactly this one file.
  3. src/pages/ — A two-file routing shell: index.vue renders the root dashboard, and [...all].vue is a catch-all that dynamically resolves both category dashboards and leaf sketch components from the registry at runtime.
You never create .vue files inside src/pages/ when adding a new sketch or category. The entire sub-route tree is generated dynamically by [...all].vue from the SKETCHES registry. New pages appear instantly — no imports, no menu updates, no boilerplate.

What’s Included

The playground ships with a set of composables and overlay components that handle all the repetitive scaffold work so each sketch file can focus purely on creative logic.

Composables

usePixiApp — PixiJS application lifecycle with hot-reload-safe teardown.useP5 — p5.js sketch mounting with lazy dynamic import.useGsap — GSAP + ScrollTrigger setup and cleanup.useAsciiRasterizer — ASCII art image composable for rasterized effects.

Overlay Components

StatsPanel.vue — Floating FPS / MS / MB overlay powered by stats.js. Iframe-aware: auto-hides inside dashboard preview cards.LilGui.vue — Reactive lil-gui parameter controller. Closed by default, skips init in iframe previews.ResourcesList.vue — Collapsible reference-links pill, glassmorphic panel, also iframe-aware.

Zero-Config Routing

Register a sketch once in src/config/sketches.ts and it immediately appears on the dashboard with a card preview, a correct URL, and full navigation — no manual route definitions required.

GLSL Shader Support

Import .vert and .frag files directly as strings via Vite’s asset pipeline. Shader sources live alongside their Vue component inside src/sketches/, keeping the entire shader domain self-contained.

Tech Stack

The following packages are declared in package.json and form the foundation of the playground:
PackageVersionRole
vue3.5Reactive component framework
vite8Build tool and dev server
typescript~6.0Static type checking
pixi.js82D WebGL renderer
p52Creative coding canvas API
three0.1843D WebGL renderer
@tresjs/core5Declarative Three.js for Vue
gsap3Animation and ScrollTrigger
vue-router5Hash-based SPA routing
@vueuse/core14Composable utilities (tryOnMounted, tryOnUnmounted, etc.)
tailwindcss4Utility-first CSS framework
lenis1Smooth scroll with Vue integration
lil-gui0.21Lightweight parameter controller
stats.js0.17Real-time performance monitor

Build docs developers (and LLMs) love