@call-me-sensei/toonlab 0.4.21 → 0.4.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NPM-LIBRARY.md +87 -27
- package/README.md +11 -10
- package/agents/PROMPTS.md +17 -3
- package/agents/README.md +13 -3
- package/agents/claude/CLAUDE.md +3 -0
- package/agents/codex/AGENTS.md +112 -159
- package/agents/cursor/toonlab.mdc +7 -3
- package/agents/examples/game-foundation.mjs +104 -0
- package/agents/references/game-lifecycle.md +57 -0
- package/agents/references/runtime-entry-points.md +26 -0
- package/agents/references/style-bundles.md +4 -1
- package/agents/skills/claude/asset-sourcing/SKILL.md +7 -4
- package/agents/skills/claude/environment/SKILL.md +4 -0
- package/agents/skills/claude/game-dev/SKILL.md +63 -87
- package/agents/skills/claude/lighting/SKILL.md +36 -0
- package/agents/skills/claude/post-processing/SKILL.md +8 -3
- package/agents/skills/claude/rock-ground-shaders/SKILL.md +10 -15
- package/agents/skills/claude/rockgen/SKILL.md +52 -21
- package/agents/skills/claude/scene-style-application/SKILL.md +4 -0
- package/agents/skills/claude/style-presets/SKILL.md +11 -8
- package/agents/skills/claude/toon-shading/SKILL.md +4 -0
- package/agents/skills/claude/vegetation-sky/SKILL.md +13 -7
- package/agents/skills/claude/visual-verification/SKILL.md +45 -119
- package/agents/skills/claude/water/SKILL.md +6 -2
- package/agents/skills/codex/asset-sourcing/SKILL.md +7 -4
- package/agents/skills/codex/environment/SKILL.md +4 -0
- package/agents/skills/codex/game-dev/SKILL.md +63 -87
- package/agents/skills/codex/lighting/SKILL.md +36 -0
- package/agents/skills/codex/post-processing/SKILL.md +8 -3
- package/agents/skills/codex/rock-ground-shaders/SKILL.md +10 -15
- package/agents/skills/codex/rockgen/SKILL.md +52 -21
- package/agents/skills/codex/scene-style-application/SKILL.md +4 -0
- package/agents/skills/codex/style-presets/SKILL.md +11 -8
- package/agents/skills/codex/toon-shading/SKILL.md +4 -0
- package/agents/skills/codex/vegetation-sky/SKILL.md +13 -7
- package/agents/skills/codex/visual-verification/SKILL.md +45 -119
- package/agents/skills/codex/water/SKILL.md +6 -2
- package/database/apply-one-catalog-seed.mjs +63 -0
- package/database/providers.mjs +1 -0
- package/database/seeds/catalog/0005_2026-08-c8-first12.sql +1101 -0
- package/database/seeds/catalog/0006_2026-09-c8-first100.sql +14245 -0
- package/database/seeds/catalog/0007_2026-09-c8-first100-primary-model.sql +14845 -0
- package/mcp/lab-management.mjs +11 -8
- package/mcp/public-catalog.mjs +0 -16
- package/mcp/tree-lab-contract.mjs +2381 -0
- package/mcp/vite-plugin.mjs +5 -1
- package/package.json +29 -18
- package/src/catalog/officialCatalog.js +1 -0
- package/src/catalog/officialCatalogAssetRuntime.js +98 -1
- package/src/catalog/officialCatalogLod.js +160 -16
- package/src/catalog/officialCatalogPlacement.js +52 -12
- package/src/catalog/officialCatalogProvider.js +79 -8
- package/src/catalog/officialCatalogRockPackage.js +172 -0
- package/src/cloud/cloudReprojection.js +40 -7
- package/src/cloud/cloudVolume.js +44 -7
- package/src/cloud/noise/baseShapeVolume.js +8 -6
- package/src/cloud/noise/cirrusMap.js +2 -1
- package/src/cloud/noise/curlNoise.js +2 -1
- package/src/cloud/noise/erosionVolume.js +2 -1
- package/src/cloud/noise/textureCache.js +77 -0
- package/src/cloud/noise/weatherMap.js +2 -1
- package/src/core/sha256.js +83 -0
- package/src/ground-shader/groundShaderMaterial.js +12 -3
- package/src/rock-shader/rockMaterial.js +205 -28
- package/src/rock-shader/rockShaderRuntime.js +17 -1
- package/src/rock-shader/rockShaderSettings.js +16 -0
- package/src/rockgen/index.js +9 -0
- package/src/rockgen/lod/index.js +1 -0
- package/src/rockgen/lod/rockDenseFieldPolicy.js +143 -0
- package/src/rockgen/rockDocument.js +899 -35
- package/src/rockgen/surface/c7GeologySurface.js +39 -9
- package/src/rockgen/surface/naturalRockSurface.js +1948 -0
- package/src/shaders-tsl/chunks/projected-water-caustics.js +14 -2
- package/src/shaders-tsl/chunks/water-foam.js +6 -6
- package/src/shaders-tsl/chunks/water-lighting.js +28 -5
- package/src/shaders-tsl/chunks/water-shore-state.js +5 -2
- package/src/shaders-tsl/chunks/water-waves.js +10 -5
- package/src/shaders-tsl/flower.js +7 -4
- package/src/shaders-tsl/grass.js +4 -3
- package/src/shaders-tsl/water-shore-state-simulation.js +3 -2
- package/src/shaders-tsl/water.js +209 -41
- package/src/sky/skySystem.js +30 -7
- package/src/toon/settings/perspectiveRemovalSettings.js +1 -1
- package/src/toon/toonSettings.js +74 -0
- package/src/vegetation/stylizedFlower.js +6 -0
- package/src/version.js +1 -1
- package/src/water/waterDetailSpectrum.js +91 -0
- package/src/water/waterDynamics.js +422 -0
- package/src/water/waterFoamParticles.js +196 -0
- package/src/water/waterFoamTexture.js +57 -0
- package/src/water/waterHydrodynamics.js +209 -0
- package/src/water/waterMaterial.js +1 -0
- package/src/water/waterRenderExtension.js +107 -0
- package/src/water/waterScenePasses.js +14 -6
- package/src/water/waterSettings.js +53 -26
- package/src/water/waterShoreMaterial.js +38 -14
- package/src/water/waterSpectralOcean.js +137 -0
- package/src/water/waterStageSettings.js +19 -1
- package/src/water/waterSurface.js +62 -18
- package/src/water/waterUnderwaterAtmosphere.js +30 -3
- package/types/catalog/officialCatalog.d.ts +1 -0
- package/types/catalog/officialCatalogPlacement.d.ts +4 -0
- package/types/catalog/officialCatalogRockPackage.d.ts +68 -0
- package/types/cloud/noise/baseShapeVolume.d.ts +1 -1
- package/types/cloud/noise/textureCache.d.ts +12 -0
- package/types/core/sha256.d.ts +2 -0
- package/types/index.d.ts +30 -0
- package/types/rock-shader/rockMaterial.d.ts +3 -0
- package/types/rock-shader/rockShaderSettings.d.ts +2 -0
- package/types/rockgen/index.d.ts +1 -0
- package/types/rockgen/lod/index.d.ts +1 -0
- package/types/rockgen/lod/rockDenseFieldPolicy.d.ts +181 -0
- package/types/rockgen/rockDocument.d.ts +654 -71
- package/types/rockgen/surface/naturalRockSurface.d.ts +100 -0
- package/types/shaders-tsl/chunks/projected-water-caustics.d.ts +7 -1
- package/types/shaders-tsl/chunks/water-lighting.d.ts +4 -3
- package/types/shaders-tsl/water.d.ts +2 -1
- package/types/version.d.ts +1 -1
- package/types/water/waterDetailSpectrum.d.ts +13 -0
- package/types/water/waterDynamics.d.ts +89 -0
- package/types/water/waterFoamParticles.d.ts +32 -0
- package/types/water/waterFoamTexture.d.ts +1 -0
- package/types/water/waterHydrodynamics.d.ts +49 -0
- package/types/water/waterRenderExtension.d.ts +16 -0
- package/types/water/waterScenePasses.d.ts +1 -1
- package/types/water/waterSettings.d.ts +1 -0
- package/types/water/waterSpectralOcean.d.ts +17 -0
- package/types/water/waterStageSettings.d.ts +1 -1
- package/types/water/waterUnderwaterAtmosphere.d.ts +19 -4
|
@@ -1,136 +1,62 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: visual-verification
|
|
3
|
-
description:
|
|
3
|
+
description: Verify ToonLab rendered output and gameplay with settled frames, relevant camera views, subsystem isolation and measurable evidence. Use for visual reviews or diagnosing a suspected rendering defect.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# Verify rendered output
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
owner".
|
|
8
|
+
References beginning `agents/` resolve from the installed ToonLab package root.
|
|
9
|
+
A passing build does not establish visual correctness. Choose checks that match
|
|
10
|
+
the requested change, the art direction and the cameras the game actually uses.
|
|
12
11
|
|
|
13
|
-
##
|
|
12
|
+
## Readiness and capture
|
|
14
13
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
Await every readiness promise exposed by the host, render through its real
|
|
15
|
+
pipeline, and check required objects/textures have loaded. For static fixtures,
|
|
16
|
+
stable drawable counts across frames are a necessary signal, not proof of GPU
|
|
17
|
+
compilation or successful rendering. Animated/procedural scenes may legitimately
|
|
18
|
+
change counts; use their explicit readiness signals instead.
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
Inspect pixels from the output (a small `readPixels` grid or the captured image).
|
|
21
|
+
Check that intended surfaces are visible, with useful coverage and valid alpha.
|
|
22
|
+
Do not hardcode black as the only empty-frame value; an empty scene may match a
|
|
23
|
+
sky-colored or transparent background. Check relevant console/network errors
|
|
24
|
+
and failed textures. Do not dismiss a failed required resource because the rest
|
|
25
|
+
of the scene renders. Record the camera, readiness signals and capture path.
|
|
22
26
|
|
|
23
|
-
|
|
24
|
-
pipeline, and re-read the scene graph until triangle and drawable counts are
|
|
25
|
-
**unchanged across several consecutive reads**. Treat count stability as a
|
|
26
|
-
necessary signal, not proof that GPU compilation, render targets, or external
|
|
27
|
-
loads succeeded. Then screenshot. Report `settled`, the readiness signals, and
|
|
28
|
-
a non-zero rendered frame count in the capture manifest, and **fail the
|
|
29
|
-
capture** if any required signal is wrong. A black or half-built frame must
|
|
30
|
-
never be able to pass as a render.
|
|
27
|
+
## Diagnose before attributing a defect
|
|
31
28
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
clear colors can hide the same failure. Record the distinct-color count or
|
|
38
|
-
coverage ratio with the capture.
|
|
29
|
+
Isolate the suspect subsystem while retaining its lighting and required passes.
|
|
30
|
+
Compare with and without post-processing when appropriate. Keep camera, pose,
|
|
31
|
+
exposure, lighting and source textures fixed for before/after comparisons.
|
|
32
|
+
Inspect world-space bounds, scale and material contracts when an object has an
|
|
33
|
+
unexpected silhouette, repeated pattern or stretched surface.
|
|
39
34
|
|
|
40
|
-
|
|
41
|
-
|
|
35
|
+
For palette-matching tasks, sample corresponding material regions and compare
|
|
36
|
+
small patches in a perceptual color space such as CIEDE2000. Confirm the probe
|
|
37
|
+
hits the intended surface. For ordinary feature work, clear visual inspection
|
|
38
|
+
and targeted telemetry are enough; do not invent numeric color gates without a
|
|
39
|
+
reference or require measurement tools unrelated to the requested result.
|
|
42
40
|
|
|
43
|
-
##
|
|
41
|
+
## View and interaction coverage
|
|
44
42
|
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
Use gameplay cameras first. For 3D assets or formations, choose relevant views
|
|
44
|
+
from hero, wide, close, flyover, top-down; include angles that expose seams or
|
|
45
|
+
repetition. A fixed-camera UI change does not need a five-camera asset audit.
|
|
46
|
+
Check near/far and lit/shadowed behavior when LOD or lighting is affected.
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
For a game slice, exercise movement, collision, interaction, success/failure and
|
|
49
|
+
restart where present. Test resize, focus loss/resume and teardown when changing
|
|
50
|
+
lifecycle ownership. Confirm post-processing is the final render path when used.
|
|
51
51
|
|
|
52
|
-
|
|
53
|
-
flag that bypasses post. Most attribution questions collapse to two captures.
|
|
52
|
+
## Review and report
|
|
54
53
|
|
|
55
|
-
|
|
54
|
+
Take a separate review pass against the requested acceptance criteria. When
|
|
55
|
+
active tools and developer authorization permit an independent agent/thread,
|
|
56
|
+
that reviewer should capture fresh evidence. Otherwise review locally; do not
|
|
57
|
+
spawn agents or create user tasks without authorization.
|
|
56
58
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
Two disciplines that matter more than the metric:
|
|
62
|
-
|
|
63
|
-
- **Probe the right surface.** A probe that lands on terrain when you think it
|
|
64
|
-
is on rock will report a rock defect that does not exist. Prove it: change the
|
|
65
|
-
suspected material's value and re-measure. If the probe does not move, it is
|
|
66
|
-
not on that material. This exact check revealed that two "rock" probes were
|
|
67
|
-
reading the ground shader.
|
|
68
|
-
- **Probe where the reference has that material.** A probe placed at coordinates
|
|
69
|
-
the reference fills with sky, on a frame where your scene has a cliff, measures
|
|
70
|
-
a composition difference and reports it as a colour failure.
|
|
71
|
-
|
|
72
|
-
Keep a second sampler for arbitrary points, so a question like "is the shaded
|
|
73
|
-
wall darker than the lit one, and by how much" is one command.
|
|
74
|
-
|
|
75
|
-
## Scan the scene graph for outliers
|
|
76
|
-
|
|
77
|
-
Traverse for meshes above a size threshold and print path, world-space extent
|
|
78
|
-
and position. This catches the things nobody sees because they read as
|
|
79
|
-
background:
|
|
80
|
-
|
|
81
|
-
- a 104 m slab lying across a 72 m channel, damming it;
|
|
82
|
-
- "cliff-top caps" built at 70–90 m across when the tower crown is 20 m.
|
|
83
|
-
|
|
84
|
-
Both survived several visual reviews. A ten-line traversal found each in
|
|
85
|
-
seconds.
|
|
86
|
-
|
|
87
|
-
Audit transforms the same way. Report per-role mean and max uniform scale and
|
|
88
|
-
the worst axis ratio; a mean scale of 6× with a max of 22× is a stretched
|
|
89
|
-
surface, and it is visible long before anyone can articulate why.
|
|
90
|
-
|
|
91
|
-
## Judge from every approved camera
|
|
92
|
-
|
|
93
|
-
A formation can read as one coherent mass from the hero camera and as a kit row
|
|
94
|
-
from above. Fix a small set of cameras — hero, wide, close, flyover, top-down —
|
|
95
|
-
and require all of them before approving a change. Never approve from one view.
|
|
96
|
-
|
|
97
|
-
## Run an adversarial critic
|
|
98
|
-
|
|
99
|
-
Separate the builder from the judge. When the active tool surface and developer
|
|
100
|
-
authorization permit an independent agent/thread, have that critic capture its
|
|
101
|
-
**own** fresh evidence rather than trusting the builder's screenshots. Otherwise
|
|
102
|
-
perform a separate critic pass after clearing builder assumptions. Read the
|
|
103
|
-
module source and return structured blockers: region, expected, actual, fix,
|
|
104
|
-
owner.
|
|
105
|
-
|
|
106
|
-
Make the critic's standard a specific shipped frame, not "good". Give it the
|
|
107
|
-
sampled palette and an explicit auto-fail list, and require a verdict field that
|
|
108
|
-
is hard to fudge — a boolean like `readsAsOneMass` forces a judgement that a
|
|
109
|
-
score can blur.
|
|
110
|
-
|
|
111
|
-
Then feed the blockers back to the builder with instructions not to argue but to
|
|
112
|
-
disprove with a capture if it disagrees. Loop until the critic passes it.
|
|
113
|
-
|
|
114
|
-
In the qualifying run, independent critics scored subsystems 1.5–3.0 out of 10
|
|
115
|
-
with 9–11 blockers each and drove the useful visual fixes. Code inspection
|
|
116
|
-
still found contract defects; rendered evidence determined whether they were
|
|
117
|
-
visible and whether a correction actually improved the target frame.
|
|
118
|
-
|
|
119
|
-
## Keep the harness honest under parallelism
|
|
120
|
-
|
|
121
|
-
If several agents capture at once:
|
|
122
|
-
|
|
123
|
-
- give each run its own port, or they fight over a fixed one;
|
|
124
|
-
- serialise the browser through a small semaphore — GPU-backed browsers
|
|
125
|
-
exhaust WASM memory a few instances in, and the failure surfaces to an agent
|
|
126
|
-
as a broken module rather than as machine pressure;
|
|
127
|
-
- expect transient failures from another agent's mid-edit file, and retry rather
|
|
128
|
-
than "fixing" a module you do not own.
|
|
129
|
-
|
|
130
|
-
## Record the measurement, not the conclusion
|
|
131
|
-
|
|
132
|
-
Write down the number and the command that produced it. "The wall is too blue"
|
|
133
|
-
ages badly; "left wall `#4B6E97` L105 against target `#93A9C6` L168, from
|
|
134
|
-
`capture --view hero` then a point sample at 300,250" can be re-checked after
|
|
135
|
-
the scene has moved on — and it repeatedly turned out that the conclusion was
|
|
136
|
-
wrong while the measurement was still useful.
|
|
59
|
+
Describe concrete defects with location, expected result, observed result and
|
|
60
|
+
likely owner. Fix them and repeat affected checks. Report evidence and remaining
|
|
61
|
+
limitations without treating every host-owned feature as a ToonLab limitation.
|
|
62
|
+
Use a standalone fixture to support claims about package defects.
|
|
@@ -3,6 +3,10 @@ name: water
|
|
|
3
3
|
description: Help developers use ToonLab water materials, waves, ripple simulation, breakers, splashes, rain, kelp, or water settings.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
+
References beginning `agents/` resolve from the installed ToonLab package root
|
|
7
|
+
(normally `node_modules/@call-me-sensei/toonlab/`), even when this skill is copied.
|
|
8
|
+
|
|
9
|
+
|
|
6
10
|
# Water
|
|
7
11
|
|
|
8
12
|
Use this skill when a developer wants WaterSurface, water material settings,
|
|
@@ -65,8 +69,8 @@ Developer guidance:
|
|
|
65
69
|
composition. Live scene owners use unique `setSceneOverrideLayer` ids and
|
|
66
70
|
clear only their own id; they must not write composed values back to a preset.
|
|
67
71
|
- In a composed world, let the host game own lighting and pass current light
|
|
68
|
-
state through Water's explicit scene adapters.
|
|
69
|
-
|
|
72
|
+
state through Water's explicit scene adapters. The public lighting slot and `createSceneStyleRuntime()` coordinate the
|
|
73
|
+
supported lighting and shared-shadow contract.
|
|
70
74
|
- Preserve the host renderer's depth convention. Water supports both standard
|
|
71
75
|
and reversed depth; qualify contact foam and refraction using the host's
|
|
72
76
|
actual `reversedDepthBuffer` setting rather than silently changing it.
|
|
@@ -3,6 +3,10 @@ name: asset-sourcing
|
|
|
3
3
|
description: Help agents source anime-game-ready models, textures, and presets through policy-aware ToonLab MCP discovery, provenance, supported shaders, and explicit custom-gap reporting.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
+
References beginning `agents/` resolve from the installed ToonLab package root
|
|
7
|
+
(normally `node_modules/@call-me-sensei/toonlab/`), even when this skill is copied.
|
|
8
|
+
|
|
9
|
+
|
|
6
10
|
# Asset Sourcing
|
|
7
11
|
|
|
8
12
|
Use this skill when a developer needs an asset — a model, texture, HDRI,
|
|
@@ -66,7 +70,7 @@ scene-kit role.
|
|
|
66
70
|
Never regenerate or re-download something already available.
|
|
67
71
|
3. **Use an approved procedural family only when policy permits it.** Discover
|
|
68
72
|
approved families through MCP, then use their focused runtime such as
|
|
69
|
-
`@call-me-sensei/toonlab/vegetation`, `rockgen
|
|
73
|
+
`@call-me-sensei/toonlab/vegetation`, `rockgen` or `texgen`.
|
|
70
74
|
This is the direct route only when the requested family has an approved,
|
|
71
75
|
versioned stylized base set and passes the policy/review gate described in
|
|
72
76
|
`agents/references/asset-sourcing-policy.md`. Preserve base-set version, generator version,
|
|
@@ -97,9 +101,8 @@ scene-kit role.
|
|
|
97
101
|
generation capability, polling, and save tools; follow the advertised schema.
|
|
98
102
|
6. **Author stable visual profiles in code.** Post profiles can be generated
|
|
99
103
|
deterministically through `@call-me-sensei/toonlab/post`; other stable
|
|
100
|
-
shader profiles resolve through the selected style bundle. Lighting
|
|
101
|
-
|
|
102
|
-
are not advertised by the packaged MCP server.
|
|
104
|
+
shader profiles resolve through the selected style bundle. Lighting is a supported public runtime and bundle slot. VFX, camera and
|
|
105
|
+
game-feel implementations remain host-owned; do not invent package APIs.
|
|
103
106
|
|
|
104
107
|
Persist anything worth keeping with `save_creation` (or write the JSON into
|
|
105
108
|
the repo); `.toonlab/creations/` is the shared surface labs and later
|
|
@@ -3,6 +3,10 @@ name: environment
|
|
|
3
3
|
description: Help developers use ToonLab environment shading, lighting rigs, ambient probes, reflections, fog, cloud shadows, or vertex AO in an app.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
+
References beginning `agents/` resolve from the installed ToonLab package root
|
|
7
|
+
(normally `node_modules/@call-me-sensei/toonlab/`), even when this skill is copied.
|
|
8
|
+
|
|
9
|
+
|
|
6
10
|
# Environment
|
|
7
11
|
|
|
8
12
|
Use this skill when a developer wants stylized scene materials, material-role
|
|
@@ -1,100 +1,76 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: game-dev
|
|
3
|
-
description:
|
|
3
|
+
description: Build a new playable game or integrate ToonLab into an existing Three.js game using public rendering, character, surface, collision, and asset workflows.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# Develop a game with ToonLab
|
|
7
7
|
|
|
8
|
-
Use this
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
Use this for game development and integration spanning several ToonLab systems.
|
|
9
|
+
For a single shader or asset edit, use its focused skill. References beginning
|
|
10
|
+
`agents/` are relative to the installed `@call-me-sensei/toonlab` package root.
|
|
11
11
|
|
|
12
|
-
Read
|
|
13
|
-
|
|
14
|
-
-
|
|
15
|
-
|
|
16
|
-
- `agents/references/asset-sourcing-policy.md`
|
|
17
|
-
- `agents/references/runtime-entry-points.md`
|
|
12
|
+
Read `agents/references/runtime-entry-points.md` for supported APIs. Read
|
|
13
|
+
`agents/references/game-lifecycle.md` when wiring the renderer, movement,
|
|
14
|
+
update loop, or teardown. Read art-direction/style references when applying a
|
|
15
|
+
look, and `asset-sourcing` when asset discovery or generation is needed.
|
|
18
16
|
|
|
19
|
-
##
|
|
17
|
+
## New game
|
|
20
18
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
2. Load the selected v2 bundle and its `artDirection`; use
|
|
26
|
-
`CALL_ME_SENSEI_STYLE_BUNDLE` when no other approved bundle is selected.
|
|
27
|
-
3. Locate the asset-sourcing policy. Ask the developer when it is missing;
|
|
28
|
-
continue library-first in advisory mode only while reporting that decision.
|
|
29
|
-
4. Feature-detect ToonLab OSS local and/or ToonLab Pro remote MCP. Reuse the
|
|
30
|
-
project/library first, search the released Gallery for named gaps, validate
|
|
31
|
-
finalists, then download only selected assets with provenance.
|
|
32
|
-
5. Let the host game retain its renderer, scene layout, cameras, controls,
|
|
33
|
-
animation, physics, storage, and loading pipeline. When the same scene has
|
|
34
|
-
terrain-bound objects, grass, or shoreline water, create one
|
|
35
|
-
`createSceneSurfaceRuntime({ bounds, heightAt, waterLevel })`. The host owns
|
|
36
|
-
authored XZ layout and the terrain sampler; the surface runtime owns every
|
|
37
|
-
derived Y placement, bounds-grounding, water bed/shore wiring, and its
|
|
38
|
-
readiness audit. Never independently assign those values.
|
|
39
|
-
Label only the requested character, manufactured, tree, grass, flower,
|
|
40
|
-
ground, rock, water, and post targets.
|
|
41
|
-
When creating or modifying 3D content, also inventory every render material:
|
|
42
|
-
each slot needs a stable material ID and valid semantic role in the target's
|
|
43
|
-
versioned material contract. A root label alone never makes a multi-material
|
|
44
|
-
model bundle-ready.
|
|
45
|
-
Imported manufactured models should go through
|
|
46
|
-
`proposeManufacturedStyleTargetLabel()` and a reviewed proposal; every
|
|
47
|
-
low-confidence or generic entry needs an explicit override before
|
|
48
|
-
`applyManufacturedStyleTargetLabelProposal()` writes durable metadata.
|
|
49
|
-
Create one `createSceneStyleRuntime()` for the scene. Its default collision
|
|
50
|
-
runtime makes labeled manufactured, rock, prop, and tree targets solid;
|
|
51
|
-
generated trees use trunk geometry. Do not write parallel blocker arrays.
|
|
52
|
-
6. Run `auditStyleBundleApplication()` and resolve every missing label, mixed
|
|
53
|
-
material, unsupported renderer, missing slot, or custom adapter before the
|
|
54
|
-
first mutation. Then call atomic `applyStyleBundle()`.
|
|
55
|
-
7. Add focused procedural grass with `surface.createGrassField()`, ground
|
|
56
|
-
objects with `surface.place()`, and create shoreline Water with
|
|
57
|
-
`surface.createWaterSurface()`. This makes terrain sampling, water masking,
|
|
58
|
-
shoaling, nearshore phase, and persistent shore state the default. Do not
|
|
59
|
-
silently redesign the level to make a subsystem fit.
|
|
60
|
-
8. Run `styleRuntime.collision.assertReady()`, report every target plan, and
|
|
61
|
-
probe representative tree, rock, and manufactured objects. Use explicit
|
|
62
|
-
collision metadata when bounds are inappropriate and the public Rapier
|
|
63
|
-
adapter when the host already owns a Rapier world. Then run
|
|
64
|
-
`surface.assertReady({ camera, styleRuntime, requireShadowDomains })`
|
|
65
|
-
after the shared shadow pass has rendered. A build, `castShadow` flag, or
|
|
66
|
-
target count is not proof of grounding, texture preservation, shoreline
|
|
67
|
-
wiring, or actual caster coverage. Then inspect the developer-supplied cameras plus relevant
|
|
68
|
-
close/far and lit/shadowed views. Iterate one material or asset family at a
|
|
69
|
-
time and report every remaining host or experimental gap.
|
|
19
|
+
Implement the requested host game: input, camera, rules, HUD, level layout,
|
|
20
|
+
dynamic physics or lightweight movement, and persistence if requested.
|
|
21
|
+
Host-owned does not mean forbidden. Use ToonLab for the capabilities it
|
|
22
|
+
actually exports; do not promise that a package call generates a finished world.
|
|
70
23
|
|
|
71
|
-
|
|
24
|
+
Start with a playable vertical slice: move, collide, interact with one objective,
|
|
25
|
+
and restart. Use simple host-authored geometry until the loop works. Replace
|
|
26
|
+
placeholders with accepted assets and the chosen style incrementally. Record
|
|
27
|
+
performance and visual checks at the gameplay camera, not just a flyover.
|
|
28
|
+
The copyable `agents/examples/game-foundation.mjs` demonstrates a small
|
|
29
|
+
host-authored loop with public ToonLab labeling, styling and static collision;
|
|
30
|
+
it is an example, not a new package API or a full physics controller.
|
|
72
31
|
|
|
73
|
-
|
|
74
|
-
then renders once. Do not invent undocumented ToonLab imports. One-shot world
|
|
75
|
-
generation; terrain/biome/coast/cliff formation; automatic set dressing;
|
|
76
|
-
current Sky/Cloud composition; and full Lighting, Weather, Climate, VFX,
|
|
77
|
-
camera, game-feel, navigation, physics, and streaming composition are
|
|
78
|
-
experimental or host-owned.
|
|
32
|
+
## Existing game
|
|
79
33
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
34
|
+
Inventory the existing renderer, loop, cameras, physics, loading and cleanup
|
|
35
|
+
paths. Preserve them unless the task authorizes replacement. Integrate only the
|
|
36
|
+
requested targets and avoid starting another animation loop. Use adapters for
|
|
37
|
+
the host physics world and existing controllers rather than parallel systems.
|
|
83
38
|
|
|
84
|
-
##
|
|
39
|
+
## Integrate the supported runtime
|
|
85
40
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
41
|
+
1. Resolve the installed package version, export map, and selected style bundle.
|
|
42
|
+
Call Me Sensei's bundle ID is `call-me-sensei`; domain selectors can differ.
|
|
43
|
+
2. Create or reuse the host scene and renderer. Use `createCharacterRuntime()`
|
|
44
|
+
for supported loaded characters, and the walkable runtime when its movement
|
|
45
|
+
integration fits. Keep host input, movement intent and camera separate.
|
|
46
|
+
3. If terrain placement and shoreline systems share a heightfield, provide its
|
|
47
|
+
world bounds and `heightAt(x, z)` once to `createSceneSurfaceRuntime()`.
|
|
48
|
+
Use its placement, grass and water helpers for that coordinated scene.
|
|
49
|
+
Ordinary rooms or flat arenas do not need a surface runtime.
|
|
50
|
+
4. Assign stable target IDs, rendering domains, material IDs and roles. Use
|
|
51
|
+
`proposeManufacturedStyleTargetLabel()` and explicit reviewed corrections
|
|
52
|
+
for ambiguous imported materials; persist the accepted contract.
|
|
53
|
+
5. Create one `createSceneStyleRuntime()` for the scene, then call its `apply()`
|
|
54
|
+
with the chosen bundle and labeled targets/discovery in strict mode. This
|
|
55
|
+
coordinates the renderer, lighting, ground field, shadows and static
|
|
56
|
+
collision. Resolve strict failures before application; do not bypass them
|
|
57
|
+
by calling an adapter directly.
|
|
58
|
+
6. Use its default labeled static blockers and explicit collision metadata
|
|
59
|
+
where bounds are inappropriate. Prefer `createRapierCollisionAdapter()`
|
|
60
|
+
when integrating with an existing Rapier world. Do not maintain a second
|
|
61
|
+
blocker list for the same assets. Test real movement, not just flags.
|
|
62
|
+
7. Assign one update owner per system and one final render owner. See the
|
|
63
|
+
lifecycle reference: style updates do not replace Sky, Water, grass or
|
|
64
|
+
character updates. When post is active, render through its documented path.
|
|
65
|
+
8. Run `styleRuntime.collision.assertReady()`. For heightfield scenes, also run
|
|
66
|
+
`surface.assertReady({ camera, styleRuntime, requireShadowDomains })` after
|
|
67
|
+
the shared passes have rendered, scoped to the domains actually present.
|
|
68
|
+
|
|
69
|
+
## Completion
|
|
70
|
+
|
|
71
|
+
The requested gameplay loop, controls, camera, UI and restart work. Applicable
|
|
72
|
+
build/type checks pass. Targets have complete material contracts; assets retain
|
|
73
|
+
provenance and editable recipes. Inspect lit/shadowed and near/far views where
|
|
74
|
+
relevant, and exercise startup, resize, pause/resume and disposal. Report
|
|
75
|
+
remaining defects honestly. Do not require every optional ToonLab domain in a
|
|
76
|
+
scene that does not use it, or treat user-approved host code as a package defect.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: lighting
|
|
3
|
+
description: Integrate ToonLab's public lighting and scene-style runtime, diagnose shared shadows and sky alignment, and coordinate host-owned local lights.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Lighting and shared shadows
|
|
7
|
+
|
|
8
|
+
References beginning `agents/` resolve from the installed ToonLab package root.
|
|
9
|
+
Read `agents/references/runtime-entry-points.md` and the selected bundle's
|
|
10
|
+
art direction. Public imports are `@call-me-sensei/toonlab/lighting` and
|
|
11
|
+
`@call-me-sensei/toonlab/styles`.
|
|
12
|
+
|
|
13
|
+
Prefer `createSceneStyleRuntime({ renderer, scene, sky, water, post })` and
|
|
14
|
+
`styleRuntime.apply(bundle, ...)` for a coordinated game scene. The public
|
|
15
|
+
lighting bundle slot owns the supported sun/fill/probe settings; scene-style
|
|
16
|
+
updates coordinate lighting, shared shadows and the ground field. Do not add
|
|
17
|
+
an independent default directional rig that doubles the package key light.
|
|
18
|
+
|
|
19
|
+
The host owns the time progression, authored local lights, camera and gameplay
|
|
20
|
+
conditions. Use `styleRuntime.setTimeOfDay(hour)` to synchronize supported
|
|
21
|
+
bound systems. Choose unique named override layers for independent live owners,
|
|
22
|
+
and remove only the layer that owner created. Do not serialize composed state
|
|
23
|
+
back over authored presets.
|
|
24
|
+
|
|
25
|
+
Every relevant caster/receiver must participate in the shared shadow contract.
|
|
26
|
+
Label targets, preserve cast/receive flags, and inspect the actual shared-pass
|
|
27
|
+
coverage. Native `renderer.shadowMap` alone does not feed every ToonLab TSL
|
|
28
|
+
receiver. If the host integrates focused APIs without scene-style ownership,
|
|
29
|
+
explicitly wire the same light direction, shadow pass and scene-state adapters.
|
|
30
|
+
|
|
31
|
+
Check the visible sky sun against the shadow direction, key/fill balance,
|
|
32
|
+
near-white clipping, dark-material readability and relevant indoor/outdoor
|
|
33
|
+
views. Frame shadow coverage around the area the game actually uses. Tune
|
|
34
|
+
quality/resolution against a measured frame budget. Use additional coastal or
|
|
35
|
+
underwater checks only when water is present. Record an integration gap only
|
|
36
|
+
when the supported contract cannot meet the requested treatment.
|
|
@@ -3,6 +3,10 @@ name: post-processing
|
|
|
3
3
|
description: Help developers use ToonLab post-processing, bloom, color grade, LUT, vignette, outlines, depth cue, or motion blur.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
+
References beginning `agents/` resolve from the installed ToonLab package root
|
|
7
|
+
(normally `node_modules/@call-me-sensei/toonlab/`), even when this skill is copied.
|
|
8
|
+
|
|
9
|
+
|
|
6
10
|
# Post Processing
|
|
7
11
|
|
|
8
12
|
Use this skill when a developer wants ToonLab's optional post-processing
|
|
@@ -22,9 +26,10 @@ Generating looks (no lab UI required):
|
|
|
22
26
|
- `createPostGeneratorRecipe(id, { seed, locks, configuration })` defines an
|
|
23
27
|
editable domain; `createGeneratedPostPresetDocument(recipe, { quality })`
|
|
24
28
|
resolves it into a flat, portable preset deterministically per seed.
|
|
25
|
-
-
|
|
26
|
-
|
|
27
|
-
|
|
29
|
+
- MCP supports portable Lab document creation and mutation as well as asset
|
|
30
|
+
discovery. Inspect `get_lab_features` for the available Lab contract; use
|
|
31
|
+
code for procedural profile generation and keep any resolved document the
|
|
32
|
+
project needs to retain.
|
|
28
33
|
- Ship the resolved preset in the app; keep the recipe only if runtime
|
|
29
34
|
re-rolling is a feature.
|
|
30
35
|
|
|
@@ -3,6 +3,10 @@ name: rock-ground-shaders
|
|
|
3
3
|
description: Apply, configure, and verify ToonLab rock and ground shaders in outdoor scenes, including textures, close detail, HDR sun response, cast/receive shadows, ground-field adoption, shoreline wet bands, and Call Me Sensei defaults.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
+
References beginning `agents/` resolve from the installed ToonLab package root
|
|
7
|
+
(normally `node_modules/@call-me-sensei/toonlab/`), even when this skill is copied.
|
|
8
|
+
|
|
9
|
+
|
|
6
10
|
# Rock and ground shaders
|
|
7
11
|
|
|
8
12
|
Use this skill when terrain, cliffs, catalog rocks, beaches, or grass-ground
|
|
@@ -35,21 +39,12 @@ if (report.usedGeneratedTextures) {
|
|
|
35
39
|
setRockShaderSceneState(rockRoot, { waterLevel });
|
|
36
40
|
```
|
|
37
41
|
|
|
38
|
-
For
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
if (regions.totalVertices !== 134981) throw new Error('Unexpected hoodoo binding');
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
The v1 binding is fixed to profile `hoodoo-caprock-normalized-height-v1` and
|
|
48
|
-
channels `base/shaft/neck/cap`. Do not apply it to another family. Use only
|
|
49
|
-
material styling (`detail: null`) on the annotated mesh; any position/topology
|
|
50
|
-
edit requires semantic regeneration and rebaking. Prove repeated
|
|
51
|
-
`applyRockShader()` / `restoreRockShader()` cycles restore exact material,
|
|
52
|
-
texture, geometry, index, attribute, shadow, and user-data identities.
|
|
42
|
+
For an asset with authored semantic regions, use `inspectRockRegionBindings()`
|
|
43
|
+
and its matching versioned contract before styling. Do not copy region names
|
|
44
|
+
or vertex-count assumptions from a single research fixture onto other rocks.
|
|
45
|
+
Preserve authored masks and their geometry binding; topology/UV edits require
|
|
46
|
+
updated bindings and any required rebakes. Qualify apply/revert cycles on the
|
|
47
|
+
actual asset.
|
|
53
48
|
|
|
54
49
|
`applyRockShader` sets `castShadow` and `receiveShadow` true by default.
|
|
55
50
|
Override them only for an explicit rendering reason. It reports whether
|
|
@@ -1,30 +1,61 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: rockgen
|
|
3
|
-
description:
|
|
3
|
+
description: Create or edit ToonLab procedural rocks and portable rock recipes, including deterministic realistic surface maps, semantic masks, LOD, collision and export.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# Procedural rocks and realistic surfaces
|
|
7
7
|
|
|
8
|
-
Use
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
Use public `@call-me-sensei/toonlab/rockgen` for geometry and deterministic
|
|
9
|
+
surface data, and `@call-me-sensei/toonlab/rock-shader` for reusable appearance.
|
|
10
|
+
References beginning `agents/` resolve from the installed package root, even
|
|
11
|
+
when this skill is copied. Read `agents/references/runtime-entry-points.md` and
|
|
12
|
+
`rock-ground-shaders` for material application and shared shadow integration.
|
|
11
13
|
|
|
12
|
-
|
|
13
|
-
- `@call-me-sensei/toonlab/rockgen`
|
|
14
|
+
## Geometry and sourcing
|
|
14
15
|
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
Use the project's accepted sourcing policy. Strict anime sourcing admits
|
|
17
|
+
library/gallery rocks; a newly generated procedural rock needs an explicitly
|
|
18
|
+
permitted workflow. An explicit rock-authoring request is not a request for a
|
|
19
|
+
complete terrain or automatic world builder. Keep the host's layout and game
|
|
20
|
+
logic separate from the asset recipe.
|
|
17
21
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
- Heightfield erosion is provided by ToonLab's first-party stylized erosion
|
|
25
|
-
path; do not advise developers to depend on the old terrain-editor fork or
|
|
26
|
-
third-party simulator.
|
|
22
|
+
Use a fixed seed and stable asset ID. Preserve the geometry recipe, transforms,
|
|
23
|
+
units, surface specification, LODs, collision and provenance in the host asset
|
|
24
|
+
pipeline. Use MCP `get_lab_features` for the current portable document contract
|
|
25
|
+
before `create_lab_document`; read the result's `document` field. Save to the
|
|
26
|
+
Library when persistence is requested. Do not import Labs, repository compilers
|
|
27
|
+
or fixture data into the consumer app.
|
|
27
28
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
## Realistic material support
|
|
30
|
+
|
|
31
|
+
The npm generator supports realistic rock surfaces without generative AI
|
|
32
|
+
credits. Use `NATURAL_ROCK_SURFACE_PROFILES` to discover IDs and display labels,
|
|
33
|
+
`createNaturalRockMapData` to produce deterministic channel data, and
|
|
34
|
+
`createNaturalRockSurfaceSpecification` to persist its reproducible recipe.
|
|
35
|
+
Display “Nature Reference Rocks” or the profile label, never internal production
|
|
36
|
+
names. Do not replace a requested realistic finish with a stylized one.
|
|
37
|
+
|
|
38
|
+
`result.maps` contains RGBA byte arrays for `baseColor`, `normalGL`, `roughness`,
|
|
39
|
+
`ao`, `orm`, `smoothness` and `heightMicro`. The host constructs textures and
|
|
40
|
+
assigns the projection: Base Color is sRGB, other maps are linear data. ORM is
|
|
41
|
+
AO/roughness/metallic in R/G/B; metallic is zero. Preserve source UV mapping
|
|
42
|
+
when applying baked maps. A shader profile alone does not load or bind maps.
|
|
43
|
+
|
|
44
|
+
Homogeneous profiles need an explicit profile and seed. Mixed-material profiles
|
|
45
|
+
also require authored semantic masks bound to the current geometry SHA-256.
|
|
46
|
+
Persist the specification's encoded masks and hashes unchanged. Do not fabricate
|
|
47
|
+
regions or discard masks on save, clone or MCP edits. Topology/UV changes need
|
|
48
|
+
new bindings. Use 64–4096 maps for previews; production surface specifications
|
|
49
|
+
require 1024–4096. Budget memory for all channels before choosing resolution.
|
|
50
|
+
|
|
51
|
+
Micro-height describes material detail, not a signed high-to-low geometry bake.
|
|
52
|
+
Geometry edits can invalidate LOD, collision, projection and bake provenance;
|
|
53
|
+
regenerate affected outputs before declaring the variation ready.
|
|
54
|
+
|
|
55
|
+
## Verify the asset
|
|
56
|
+
|
|
57
|
+
Regenerate with the same recipe and compare shape/map hashes; save and reopen
|
|
58
|
+
when persistence is part of the task. Inspect the requested finish, seams,
|
|
59
|
+
silhouette, near/far transitions and shadows at relevant views. Check physical
|
|
60
|
+
scale and collision by moving against the object. Use targeted runtime tests
|
|
61
|
+
and rendered evidence; metadata alone is insufficient.
|
|
@@ -3,6 +3,10 @@ name: scene-style-application
|
|
|
3
3
|
description: Inspect, plan, apply, and verify ToonLab style bundles on labeled scenes without copying Lab or showcase code.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
+
References beginning `agents/` resolve from the installed ToonLab package root
|
|
7
|
+
(normally `node_modules/@call-me-sensei/toonlab/`), even when this skill is copied.
|
|
8
|
+
|
|
9
|
+
|
|
6
10
|
# Scene style application
|
|
7
11
|
|
|
8
12
|
Ask the developer whether application should be **strict** or **advisory** before
|