A first-person, modern-3D-cartoon reimagining of the opening of Pokémon LeafGreen, built entirely with procedural code in Three.js and shipping no binary art assets.

Stars

25

7-day growth

No data

Forks

4

Open issues

0

License

MIT

Last updated

2026-07-30

AI repository intelligence
FR-AI / ANALYSIS

Why it is worth attention

It achieves a complete game-like scene using only procedural generation for textures, models (via signed-distance fields and marching cubes), and audio, with a deterministic seed and a sophisticated HDR rendering pipeline including GTAO, bloom, ACES tone mapping, and integrated capture tools for visual regression testing.

Who it is for

  • Web game developers interested in procedural generation
  • Three.js / WebGL enthusiasts
  • Pokémon fan developers
  • Indie game artists exploring procedural art pipelines

Use cases

  • Reference for procedural texture baking and asset generation
  • Learning Three.js post-processing and HDR pipeline
  • Prototyping deterministic game worlds
  • Studying marching cubes for creature modeling

Strengths

  • Zero binary assets; everything is procedural, reducing asset pipeline dependencies
  • Deterministic seed enables reproducible screenshots and visual regression testing
  • Well-defined rendering chain with proper HDR, single tone-map, and bloom on true over-range values
  • Integrated capture harnesses and a shot list contract for consistent visual review

Considerations

  • First load takes ~20 seconds due to procedural world build on the player's critical path
  • Requires WebGL2 and decent hardware to maintain 60fps at 1600x900 (≤260 draw calls, ≤2.2M triangles)
  • Editing source files mid-capture causes Vite hot-reload restart, potentially timing out capture processes

README quick start

Pallet Town

A first-person, modern-3D-cartoon reimagining of the opening of Pokémon LeafGreen — the town, and the choice of a first partner Pokémon — built in Three.js.

Everything you see is generated in code. The project ships no binary art assets: every texture is baked procedurally at load time, every model is sculpted from signed-distance fields and marching cubes, and every sound is synthesised in WebAudio.

npm install
npm run dev          # http://127.0.0.1:5173
npm run check        # typecheck
npm test             # unit tests

First load builds the whole world procedurally and currently takes around 20 seconds. That is on the player's critical path and is the largest outstanding defect in the project; World.build() logs a per-step breakdown to the console so the expensive step is always visible.

Click to lock the pointer. WASD move · Shift run · Space jump · Mouse look · E interact · Esc release cursor.


Layout

src/
  core/          engine, render pipeline, input, procedural texture bakery, noise
  world/         terrain, sky, water, buildings, vegetation, props, lab interior
  player/        first-person controller
  gameplay/      the starter Pokémon and the choice sequence
  ui/            HUD, dialogue, menus
  audio/         procedural soundscape
  fx/            shared materials and the sculpting toolkit
tools/           headless capture harnesses used for visual review

ART_DIRECTION.md is the art bible. It is the reason a scene assembled by many hands still reads as one place, and it takes precedence over individual taste. PROMPT.md is the single message the whole project was built from.

How it renders

The whole chain runs in HDR half-float targets, with exactly one tone-map at the end:

scene (MSAA) → GTAO → bloom → grade (DOF · ACES · split-tone · vignette · grain) → SMAA

Tone mapping is deliberately disabled on the renderer itself. Bloom has to see true over-range values or sunlight blooms into a grey halo instead of a soft falloff, so the single ACES conversion lives at the end of the post chain in PostFX.ts — never in both places.

Lighting is a small rig, owned entirely by world/Atmosphere.ts: one shadow-casting key light, a hemisphere fill whose ground colour is what makes shadows read blue-green rather than grey, a dim warm bounce, and a PMREM envir

Description

Pallet Town — a first-person, modern 3D cartoon reimagining of the opening of Pokemon LeafGreen, built in Three.js with zero binary art assets

Related repositories

Similar projects matched by category, topics, and programming language.

TanStack
Featured
TanStack GitHub avatar

router

TanStack Router is a type-safe, data-driven React router with built-in caching, prefetching, and nested layouts, while TanStack Start extends it into a full-stack SSR framework.

Web DevelopmentFrontend Frameworks
14,861
vercel-labs
Featured
vercel-labs GitHub avatar

scriptc

scriptc compiles ordinary TypeScript into small, fast native executables without needing Node.js, V8, or any JavaScript runtime in the binary.

Developer ToolsCode Quality & Build
1,985
Jakubantalik
Featured
Jakubantalik GitHub avatar

thinking-orbs

A React component library that renders six hand-tuned animated thought orb loading indicators on a plain 2D canvas, with two purpose-tuned sizes and automatic theme detection for AI and agent UIs.

AI & Machine LearningAI Agents
1,191