@call-me-sensei/toonlab 0.3.0 → 0.3.1
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/README.md +6 -9
- package/docs/main.jsx +25 -12
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -80,8 +80,7 @@ Labs home (`/`) presents them by the artifact they author:
|
|
|
80
80
|
Supporting editors remain available by direct URL: Weather Lab
|
|
81
81
|
(`/weather-lab/`) coordinates current atmosphere, wind, precipitation,
|
|
82
82
|
lightning, and surface state; Lighting Lab (`/lighting-lab/`) authors light
|
|
83
|
-
rigs and budgets;
|
|
84
|
-
(`/building-lab/`) expose the broader procedural library; Gallery
|
|
83
|
+
rigs and budgets; Gallery
|
|
85
84
|
(`/gallery/`) searches supported open-asset sources. The procedural Catalog
|
|
86
85
|
is exposed through `@call-me-sensei/toonlab/catalog`. See
|
|
87
86
|
[Lab responsibilities](docs/lab-architecture.md) for the scope rules and
|
|
@@ -121,12 +120,10 @@ Point any model-aware lab at your own model with the Model URL input or
|
|
|
121
120
|
| Water | `@call-me-sensei/toonlab/water` | Fully procedural integrated water system: Gerstner wave stack with a calm→storm dial, wave sets, plunging breakers you can surf, three-stop absorption color, refraction/caustics/foam, GPU ripple sim, splashes, wakes, rain, kelp, underwater view, construction-time quality, and a CPU mirror of the whole spectrum for buoyancy. [Docs](docs/water.md) |
|
|
122
121
|
| Vegetation | `@call-me-sensei/toonlab/vegetation` | Instanced grass and flower fields, procedural trees/flowers with serializable recipes, coordinated grass palettes (base, tip, and shadow tint), and one semantic-role `VegetationShaderProfile` shared across grass, foliage, flowers, bark, and stems. Asset identity and current wind/weather remain separate. [Docs](docs/vegetation-sky.md) |
|
|
123
122
|
| Paths, roads & bridges | `@call-me-sensei/toonlab/pathgen` | Seeded path networks routed over any `heightAt`: cost-field router (slope/water aware), hand-drawn ribbon overlay in dirt/stone/planks, arched plank bridges with collision, stepped stone climbs, flattened `paths.heightAt` for walkability, scatter exclusion mask, minimap overlay. |
|
|
124
|
-
|
|
|
125
|
-
| Buildings | `@call-me-sensei/toonlab/buildinggen` | Shape-grammar stylized exteriors (cottage/shed/farmhouse/watchtower/shrine): seeded recipes, timber facades with windows that never intersect beams, always-overhanging roofs (gable/hip/shed/pagoda-ish), buried foundation skirts for slopes, ≤ 6 draw calls per building, grammar invariants asserted across 1000 seeds. |
|
|
126
|
-
| Villages & POIs | `@call-me-sensei/toonlab/villagegen` | Seeded settlements composed from paths + props + buildings: site scoring, main-street layout with parcels facing the street, archetypes as data (village, fishing hamlet, shrine, campsite, ruin), seeded place names, world `pois` option that roads everything together. |
|
|
123
|
+
| Asset placement | `@call-me-sensei/toonlab/propgen` | The universal placement pipeline (the PropAsset contract: grounded, collided, instanced, hi/lo LOD by true 3D distance). `propAssetFromObject` drops any imported GLB — e.g. a CC0 model found through MCP — into the pipeline. |
|
|
127
124
|
| Fauna | `@call-me-sensei/toonlab/fauna` | Instanced GPU-animated ambient creatures: flocking birds that perch and flush, butterflies over flower masks, hovering dragonflies, schooling koi — staggered boids, hard population budgets, ≤ 1 ms CPU at defaults. |
|
|
128
125
|
| Ambient VFX | `@call-me-sensei/toonlab/ambientfx` | One GPU particle backbone, five effects: falling petals and leaves, dusk fireflies, backlit pollen, shoreline mist — follow-window emission, shared wind with grass, time-of-day gates, 3 draw calls total. |
|
|
129
|
-
| Asset catalog | `@call-me-sensei/toonlab/catalog` | Every recipe/preset as a searchable manifest with one headline call: `catalog.spawn(id, { seed })` → a placeable PropAsset for
|
|
126
|
+
| Asset catalog | `@call-me-sensei/toonlab/catalog` | Every recipe/preset as a searchable manifest with one headline call: `catalog.spawn(id, { seed })` → a placeable PropAsset for trees, rocks, and debris. `catalog.addSource(url)` mounts remote registries. |
|
|
130
127
|
| Sky | `@call-me-sensei/toonlab/sky` | Integrated gradient/sun/painterly-cloud/star system with exactly 46 portable art fields, named live scene layers, compile-time quality tiers/custom 1–5 cloud octaves, meaningful built-in looks, and water-reflection compatibility. [Docs](docs/sky.md) |
|
|
131
128
|
| Post-processing | `@call-me-sensei/toonlab/post` | Optional single-pipeline compositor: character-aware bloom, color grade, LUT, vignette, screen outline, depth cue — schema-driven, preset-serializable. [Docs](docs/post-processing.md) |
|
|
132
129
|
| Camera | `@call-me-sensei/toonlab/camera` | Extensible camera operator stack, generated recipe/preset documents, follow/framing/collision/damping/noise/impulse behavior, and a director for blending reusable rigs. [Style domain docs](docs/style-labs.md#camera) |
|
|
@@ -356,9 +353,9 @@ from spawn to the shoreline and swim.
|
|
|
356
353
|
|
|
357
354
|
```text
|
|
358
355
|
Use the ToonLab MCP server to find CC0 props for a small fishing village —
|
|
359
|
-
lanterns, crates, a pier — then place
|
|
360
|
-
|
|
361
|
-
|
|
356
|
+
lanterns, crates, a pier, a torii gate — then place every import with
|
|
357
|
+
propAssetFromObject so they are grounded, collided, and LOD'd. Tell me what
|
|
358
|
+
came from where with licenses.
|
|
362
359
|
```
|
|
363
360
|
|
|
364
361
|
```text
|
package/docs/main.jsx
CHANGED
|
@@ -88,8 +88,8 @@ function Overview() {
|
|
|
88
88
|
<code>@call-me-sensei/toonlab</code>
|
|
89
89
|
</a>
|
|
90
90
|
: toon and environment shading, water, sky, weather, vegetation, lighting, post, camera,
|
|
91
|
-
game feel, and
|
|
92
|
-
|
|
91
|
+
game feel, and procedural rocks, paths, and textures. MIT-licensed, WebGPU-first with a
|
|
92
|
+
WebGL2 fallback, zero bundled textures.
|
|
93
93
|
</li>
|
|
94
94
|
<li>
|
|
95
95
|
<strong>The labs</strong> — visual editors served by <code>npm run dev</code> (or hosted
|
|
@@ -210,10 +210,10 @@ import { propAssetFromObject } from '@call-me-sensei/toonlab/propgen';
|
|
|
210
210
|
|
|
211
211
|
// Procedural catalog: every recipe/preset as a searchable manifest.
|
|
212
212
|
const catalog = createCatalog();
|
|
213
|
-
const
|
|
213
|
+
const tree = catalog.spawn('tree/broadleaf/sensei', { seed: 7 }); // grounded, collided, LOD'd
|
|
214
214
|
|
|
215
|
-
//
|
|
216
|
-
//
|
|
215
|
+
// Imported models (e.g. a CC0 model imported through the local MCP server)
|
|
216
|
+
// join the same placement pipeline — grounded, collided, instanced, LOD'd:
|
|
217
217
|
const shrine = propAssetFromObject(importedGltf.scene);`;
|
|
218
218
|
|
|
219
219
|
const TEXGEN_SNIPPET = `import {
|
|
@@ -300,7 +300,7 @@ function Library() {
|
|
|
300
300
|
<tr><td>/lighting</td><td>Versioned light recipes, budgets, runtime realization, and a data-only UE5 handoff.</td></tr>
|
|
301
301
|
<tr><td>/post, /camera, /game-feel</td><td>Compositor pipeline, camera operator stack + director, and hit-stop/punch/flash game feel.</td></tr>
|
|
302
302
|
<tr><td>/texgen</td><td>Seamless CPU-baked PBR texture generator with 60+ presets and a natural-language recipe mapper.</td></tr>
|
|
303
|
-
<tr><td>/rockgen, /
|
|
303
|
+
<tr><td>/rockgen, /pathgen</td><td>Seeded rock generation and road/bridge networks routed over any terrain.</td></tr>
|
|
304
304
|
<tr><td>/vfxgen, /ambientfx, /fauna</td><td>Gameplay VFX (trails, impacts, weapons), ambient particles (petals, fireflies), and GPU-animated creatures.</td></tr>
|
|
305
305
|
<tr><td>/catalog, /loaders, /debug</td><td>Searchable asset manifest with <code>catalog.spawn</code>, model loaders (GLB/VRM/PMX/FBX), and the schema-driven tuning panel.</td></tr>
|
|
306
306
|
</tbody>
|
|
@@ -505,8 +505,8 @@ and swim.`}
|
|
|
505
505
|
title="CC0 import via the local server"
|
|
506
506
|
prompt={`Use the toonlab-local MCP server to furnish the fishing village: search
|
|
507
507
|
CC0 sources for lanterns, crates, barrels, and a pier (search_cc0_assets),
|
|
508
|
-
import the best fits with import_cc0_asset, and place
|
|
509
|
-
|
|
508
|
+
import the best fits with import_cc0_asset, and place every import with
|
|
509
|
+
propAssetFromObject so they are grounded, collided, and LOD'd. Show me what
|
|
510
510
|
came from where with attribution.`}
|
|
511
511
|
note="import_cc0_asset writes the files and an attribution manifest into .toonlab/imports for direct use by the project."
|
|
512
512
|
/>
|
|
@@ -519,9 +519,10 @@ path should flatten heightAt and register collision.`}
|
|
|
519
519
|
/>
|
|
520
520
|
<PromptBlock
|
|
521
521
|
title="Seeded recipes from the catalog"
|
|
522
|
-
prompt={`With the toonlab-local MCP server, generate three
|
|
523
|
-
(generate_asset from the catalog entry, different seeds), save
|
|
524
|
-
creations, and spawn them along the
|
|
522
|
+
prompt={`With the toonlab-local MCP server, generate three broadleaf tree recipe
|
|
523
|
+
variations (generate_asset from the catalog entry, different seeds), save
|
|
524
|
+
them as creations, and spawn them along the shore so I can compare them in
|
|
525
|
+
the game.`}
|
|
525
526
|
/>
|
|
526
527
|
|
|
527
528
|
<h2>Textures and style</h2>
|
|
@@ -606,11 +607,23 @@ function slugify(text) {
|
|
|
606
607
|
.replace(/\s+/g, '-');
|
|
607
608
|
}
|
|
608
609
|
|
|
610
|
+
// Systems intentionally undocumented until their output meets the quality bar.
|
|
611
|
+
const HIDDEN_REFERENCE_SECTIONS = ['Buildings'];
|
|
612
|
+
|
|
613
|
+
function stripHiddenSections(markdown) {
|
|
614
|
+
for (const title of HIDDEN_REFERENCE_SECTIONS) {
|
|
615
|
+
markdown = markdown
|
|
616
|
+
.replace(new RegExp(`\\n## ${title}\\n[\\s\\S]*?(?=\\n## |$)`), '\n')
|
|
617
|
+
.replace(new RegExp(`- \\[${title}\\]\\(#[\\w-]+\\)\\n`), '');
|
|
618
|
+
}
|
|
619
|
+
return markdown;
|
|
620
|
+
}
|
|
621
|
+
|
|
609
622
|
let referenceHtmlCache = null;
|
|
610
623
|
|
|
611
624
|
function referenceHtml() {
|
|
612
625
|
if (referenceHtmlCache) return referenceHtmlCache;
|
|
613
|
-
let html = marked.parse(settingsReferenceRaw, { async: false });
|
|
626
|
+
let html = marked.parse(stripHiddenSections(settingsReferenceRaw), { async: false });
|
|
614
627
|
html = html.replace(
|
|
615
628
|
/<h([123])>([^<]+)<\/h\1>/g,
|
|
616
629
|
(_m, level, text) => `<h${level} id="${slugify(text)}">${text}</h${level}>`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@call-me-sensei/toonlab",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Stylized (anime/toon) game starter kit for Three.js: character and environment shading, lighting, weather, water, vegetation, sky, and post-processing",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Hyperbond Studio PTE. LTD. (Call Me Sensei)",
|