Documentation

Build with ToonLab

User guides for the runtime, Labs, MCP, portable documents, and asset workflows.

The three layers

  • The runtime library — @call-me-sensei/toonlab on npm. Toon character shading, environment, ground and rock treatment, water, sky and clouds, vegetation, lighting, post-processing, procedural rocks and textures, plus policy-aware asset loading. MIT-licensed, WebGPU-first with a WebGL2 fallback.
  • The labs — visual editors at toonlab.io/labs for shaders, assets, and world systems. Lab outputs use portable documents; inspect their runtime and capability contracts before assuming a repository-only engine is in npm.
  • Agent prompts + MCP — the npm package includes local stdio MCP, ready-to-paste prompts, Codex/Claude/Cursor guidance, and paired feature skills. The optional Pro remote MCP adds your cloud Library, Gallery, stored characters, and managed generation.

The optimal workflow

01Install the runtime and the agent skills. Add the npm package to your Three.js project, then copy the feature skills from node_modules/@call-me-sensei/toonlab/agents/ into your project. The installed package contains NPM-LIBRARY.md, agents/PROMPTS.md, shared agent guidance, references, and every supported skill; GitHub access is not required.

02Connect MCP. Use local npm MCP without an account, or connect Pro at https://toonlab.io/mcp and authorize in the browser — setup for each client is on the Connect via MCP page. Your agent can now search CC0 assets, generate what it can't find, and read the presets you author in the labs.

03Author styles visually, apply them from code. Tune shaders and world systems in the labs, group them into a style bundle, and fetch it with fetchStyleBundle then apply it through createSceneStyleRuntime to the labeled scene. Fetching the document alone does not apply any materials.

04Prompt, run, iterate. Start from a goal prompt and let the agent verify its own work in the running game. The prompt cookbook has a ready-to-paste starting prompt and recipes for the common jobs.

Start here