Skip to content

LLM-readable context and copy-paste prompts for AI coding assistants building with three-flatland.

three-flatland provides machine-readable documentation so AI coding assistants can help you write correct code from the start. This page explains what’s available and includes ready-to-use prompts.

three-flatland publishes two files that AI assistants can consume directly:

FileWhat it containsWhen to use it
llms.txtLinks to all docs pages, guides, and examplesAI tools that can browse and follow links
llms-full.txtSelf-contained API reference with imports, classes, effects, and examplesAI tools that need everything in one file

These follow the llms.txt standard  — a convention for providing LLM-friendly documentation alongside your website.

Copy a prompt below, paste it into your AI assistant, and replace the placeholder at the end with your task.

The general-purpose prompt. Works with any AI assistant that can fetch URLs.

I'm working with three-flatland, a 2D sprite and effects library for Three.js
using WebGPU and TSL (Three Shader Language). It's currently in alpha.
Read this reference for the API:
https://thejustinwalsh.com/three-flatland/llms-full.txt
Key things to know:
- Three.js users import from "three-flatland"
- React Three Fiber users import from "three-flatland/react"
- TSL effect nodes come from "@three-flatland/nodes"
- Install: npm install three-flatland three koota
- Requires three.js >= 0.183.1, koota, and WebGPURenderer from "three/webgpu"
Help me with the following:
[Describe your task here]

Start from a working example and adapt it. The AI reads the actual source code from GitHub, so it builds on patterns that are known to work.

I'm building a project with three-flatland (2D sprites for Three.js/WebGPU).
Read the API reference: https://thejustinwalsh.com/three-flatland/llms-full.txt
Then fetch this example source from GitHub:
https://raw.githubusercontent.com/thejustinwalsh/three-flatland/main/examples/three/EXAMPLE_NAME/main.ts
Adapt it for my needs:
[Describe what you want to build]

Replace EXAMPLE_NAME with one of these:

ExampleWhat it demonstrates
basic-spriteTexture loading, sprite creation, interaction
animationSpritesheet animation with AnimatedSprite2D
batch-demoThousands of sprites in few draw calls
tsl-nodesPer-sprite effects with MaterialEffect and TSL nodes
pass-effectsFull-screen post-processing with PassEffect
tilemapTiled/LDtk tilemap loading and rendering
lighting2D lighting, draggable point lights, preset comparison
skiaSkia WASM vector graphics — shapes, text, paths, gradients
slug-textGPU-rendered vector text with the Slug font pipeline
knightmarkSprite benchmark with batching stress test

For AI assistants that can read local files — Claude Code, Cursor, Copilot workspace. The AI reads the project’s own documentation files and explores the source code based on your task.

I'm working in the three-flatland repository.
Start by reading these files:
1. CLAUDE.md — Project instructions, architecture, build commands
2. README.md — API overview and quick start examples
Then explore based on what I need:
- API details: read packages/three-flatland/src/index.ts and follow exports
- Effect nodes: read packages/nodes/src/ category directories
- Examples: read examples/three/ or examples/react/
- React integration: read packages/three-flatland/src/react.ts
Help me with the following:
[Describe your task here]

These are the mistakes AI assistants make most often with three-flatland. If you see any of these in generated code, correct the AI:

MistakeFix
new THREE.WebGLRenderer()Use new WebGPURenderer() from 'three/webgpu'
import { ... } from '@three-flatland/core'Import from 'three-flatland' (or 'three-flatland/react')
Missing await renderer.init()WebGPU requires async initialization before rendering
Using THREE.SpriteUse Sprite2D from three-flatland — different API entirely
renderer.render(scene, camera) with FlatlandUse flatland.render(renderer) — Flatland manages its own scene and camera