@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,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
|
|
@@ -3,19 +3,23 @@ name: style-presets
|
|
|
3
3
|
description: Explicitly select and record the intended ToonLab style or preset at every style-aware call site, distinguish neutral-default factories from Call Me Sensei-default factories, and audit overrides before reporting a custom integration note. Use before authoring environment, vegetation, grass, water, rock, ground, sky, cloud, or post settings, and whenever a subsystem looks unexpectedly unstyled.
|
|
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
|
# Name the preset
|
|
7
11
|
|
|
8
12
|
This skill makes an individual call site explicit; it does not imply that every
|
|
9
13
|
listed subsystem is part of a live Lab. Sky and Cloud focused authoring is live.
|
|
10
|
-
Weather
|
|
11
|
-
|
|
14
|
+
Weather and Climate engines remain repository-only; agents may author host
|
|
15
|
+
scene conditions without claiming unsupported npm entry points.
|
|
12
16
|
|
|
13
17
|
Style-aware ToonLab factories take a `preset`, a `style`, or both. Some
|
|
14
18
|
factories intentionally resolve a neutral/default treatment when the selector
|
|
15
19
|
is omitted; Rock and Ground already default to Call Me Sensei, while
|
|
16
20
|
Cloud has no named style at all since the volumetric rebuild retired them.
|
|
17
|
-
|
|
18
|
-
|
|
21
|
+
Pass the intended selector where the API has one; do not invent a selector
|
|
22
|
+
for a parameter-only API. Never claim that every omitted selector falls back to neutral.
|
|
19
23
|
|
|
20
24
|
Omitting a selector on the neutral-default factories is one of the most
|
|
21
25
|
expensive mistakes a ToonLab agent can make. In one capability test it hit
|
|
@@ -65,10 +69,9 @@ report against ToonLab before the cause was found:
|
|
|
65
69
|
- A bare `createVegetationShaderScopeSettings()` plus ~25 hand-authored fields —
|
|
66
70
|
three revisions of look development on the wrong base.
|
|
67
71
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
with a measured value. If you cannot name one, do not override it.
|
|
72
|
+
Document meaningful overrides with the scene requirement they serve, such as
|
|
73
|
+
bed depth, camera distance, material identity or the requested art direction.
|
|
74
|
+
Routine art iteration is allowed; do not add an approval step for every value.
|
|
72
75
|
|
|
73
76
|
## When a subsystem looks wrong
|
|
74
77
|
|
|
@@ -3,6 +3,10 @@ name: toon-shading
|
|
|
3
3
|
description: Help developers use ToonLab character toon shading, toon settings, presets, material roles, outlines, shadows, highlights, fur, or stickers.
|
|
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
|
# Toon Shading
|
|
7
11
|
|
|
8
12
|
Use this skill when a developer wants ToonLab character toon materials, toon
|
|
@@ -3,6 +3,10 @@ name: vegetation-sky
|
|
|
3
3
|
description: Help users apply ToonLab grass, flowers, trees, Tree/Grass/Flower shader profiles, and the live Sky/Cloud authoring surfaces to an existing scene.
|
|
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
|
# Vegetation, Sky, and Cloud
|
|
7
11
|
|
|
8
12
|
Use these focused systems on an existing scene with host-supplied placements,
|
|
@@ -85,7 +89,7 @@ User guidance:
|
|
|
85
89
|
MCP's `search_public_gallery` and `get_public_gallery_asset` tools, then
|
|
86
90
|
instantiate its portable recipe with `StylizedTree`. Use `BranchTree` when
|
|
87
91
|
the developer explicitly wants
|
|
88
|
-
recursive branching
|
|
92
|
+
recursive branching and the supported `BRANCH_TREE_LEAF_SHAPES`, leaf color/texture plus a
|
|
89
93
|
portable lit/shadow/crown palette, independent leaf `coverageScale`, bark
|
|
90
94
|
color/texture, authored trunk bend/twist/taper, roots, portable documents,
|
|
91
95
|
and the shared Tree Shader. `branches.children` counts lateral children;
|
|
@@ -104,7 +108,8 @@ User guidance:
|
|
|
104
108
|
and use `trunkSurfaceProfile: 'none'` only for a deliberate flat-color art
|
|
105
109
|
direction. Verify every trunk both casts and receives in shared-pass
|
|
106
110
|
coverage telemetry.
|
|
107
|
-
|
|
111
|
+
Use supported morphology and texture controls for the requested appearance;
|
|
112
|
+
do not claim botanical fidelity from a named leaf shape alone. The large
|
|
108
113
|
taxonomy/species roster visible in repository labs is experimental and is
|
|
109
114
|
not a package API.
|
|
110
115
|
- Author and route the independent `TREE_SHADER_PROFILE`,
|
|
@@ -118,8 +123,8 @@ User guidance:
|
|
|
118
123
|
- Use the public versioned Grass, vegetation-shader, BranchTree/flower recipe, and Sky
|
|
119
124
|
preset document APIs for portable data; do not copy lab-local validators.
|
|
120
125
|
- Treat Sky as one integrated World System, not a separate Shader Lab. Its
|
|
121
|
-
|
|
122
|
-
|
|
126
|
+
atmosphere, sun, cloud, night-sky, noise, god-ray and time blocks use the
|
|
127
|
+
current `SKY_PARAMS_FIELD_SCHEMA`; quality is a separate runtime choice.
|
|
123
128
|
- Cloud is a raymarched volumetric deck. The painted source/composition/card
|
|
124
129
|
pipeline was replaced outright: `createCloudSourceDocument`,
|
|
125
130
|
`createCloudCompositionDocument`, `createCloudField` and
|
|
@@ -132,9 +137,10 @@ User guidance:
|
|
|
132
137
|
- `sky.settings` is the authored baseline and `sky.renderedSettings` is the
|
|
133
138
|
current named-layer composition. Give Lighting, Weather, and other scene
|
|
134
139
|
owners unique `setSceneOverrideLayer` ids and clear only their own id.
|
|
135
|
-
- For world integration,
|
|
136
|
-
|
|
137
|
-
|
|
140
|
+
- For world integration, prefer `createSceneStyleRuntime()` and its public
|
|
141
|
+
lighting slot for the sun, probe and shared shadows. The host still owns
|
|
142
|
+
time progression and authored local lights. Coordinate custom scene inputs
|
|
143
|
+
through the documented adapters.
|
|
138
144
|
- The composed-world sun adapter is `setSun({ direction, color, sky })`; it
|
|
139
145
|
keeps the real light/shadows and Grass, Flower, Forest, Ambient FX, Sky, and
|
|
140
146
|
Water scene inputs aligned without changing their portable presets.
|