@call-me-sensei/toonlab 0.4.19 → 0.4.21
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 +230 -0
- package/README.md +78 -36
- package/agents/PROMPTS.md +91 -0
- package/agents/README.md +9 -14
- package/agents/claude/CLAUDE.md +8 -0
- package/agents/codex/AGENTS.md +161 -0
- package/agents/cursor/toonlab.mdc +37 -0
- package/agents/references/mcp-asset-discovery.md +12 -9
- package/agents/references/runtime-entry-points.md +5 -4
- package/agents/skills/claude/asset-sourcing/SKILL.md +9 -6
- package/agents/skills/claude/rock-ground-shaders/SKILL.md +16 -0
- package/agents/skills/claude/vegetation-sky/SKILL.md +7 -4
- package/agents/skills/codex/asset-sourcing/SKILL.md +9 -6
- package/agents/skills/codex/rock-ground-shaders/SKILL.md +16 -0
- package/agents/skills/codex/vegetation-sky/SKILL.md +7 -4
- package/cli/toonlab.mjs +3 -2
- package/database/fal-patina.mjs +131 -0
- package/database/generation-service.mjs +108 -7
- package/database/migrations/0007_creation_revisions.sql +80 -0
- package/database/migrations/0008_creation_revision_hardening.sql +98 -0
- package/database/migrations/0009_creation_revision_delete_integrity.sql +11 -0
- package/database/migrations/0010_external_catalog_assets.sql +28 -0
- package/database/providers.mjs +195 -16
- package/database/repository.mjs +518 -70
- package/database/seeds/catalog/0003_2026-08-open-assets.sql +159086 -0
- package/database/seeds/catalog/0004_2026-08-c7-rocks.sql +39405 -0
- package/mcp/public-catalog.mjs +4 -52
- package/mcp/server.mjs +175 -12
- package/mcp/vite-plugin.mjs +78 -2
- package/package.json +32 -12
- package/scripts/generate-catalog-seed.mjs +34 -7
- package/src/asset-policy/catalogLicenses.js +64 -6
- package/src/assetlib/loadImported.js +15 -1
- package/src/catalog/officialCatalogAssetRuntime.js +13 -2
- package/src/catalog/officialCatalogLod.js +34 -1
- package/src/catalog/officialCatalogPlacement.js +29 -14
- package/src/character/animationRetarget.js +2 -0
- package/src/character/characterRig.js +6 -1
- package/src/character/characterRuntime.js +175 -7
- package/src/environment/environmentMaterialAdapter.js +30 -0
- package/src/environment/environmentPresets.js +90 -0
- package/src/environment/environmentSunShadowPass.js +42 -0
- package/src/environment/toonLabSurfaceLighting.js +108 -10
- package/src/environment/urbanPropMaterial.js +104 -2
- package/src/lighting/lightingSystem.js +65 -10
- package/src/renderer/index.js +7 -0
- package/src/renderer/styleComparison.js +985 -0
- package/src/rock-shader/index.js +5 -0
- package/src/rock-shader/rockGeometryDetail.js +701 -0
- package/src/rock-shader/rockMaterial.js +782 -39
- package/src/rock-shader/rockRegionRuntime.js +185 -0
- package/src/rock-shader/rockSemanticMaterialRuntime.js +337 -0
- package/src/rock-shader/rockShaderRuntime.js +354 -67
- package/src/rock-shader/rockShaderSettings.js +246 -16
- package/src/rock-shader/rockTangentIntegrity.js +136 -0
- package/src/rock-shader/rockTextureIntegrity.js +115 -0
- package/src/rockgen/index.js +1 -0
- package/src/rockgen/rockDocument.js +27 -3
- package/src/rockgen/surface/c7GeologySurface.js +372 -0
- package/src/shaders-tsl/water.js +8 -0
- package/src/sky/cloudShadow.js +25 -1
- package/src/sky/skySystem.js +9 -0
- package/src/styles/index.js +23 -0
- package/src/styles/neutralStylePresets.js +712 -0
- package/src/styles/sceneStyleRuntime.js +51 -4
- package/src/styles/styleAdapters.js +13 -2
- package/src/styles/styleBundle.js +1 -1
- package/src/texgen/evaluateTexture.js +30 -3
- package/src/texgen/textureGenerators.js +63 -31
- package/src/texgen/textureSettings.js +25 -8
- package/src/toon/toonSettings.js +96 -2
- package/src/vegetation/branchTree.js +327 -42
- package/src/vegetation/index.js +24 -2
- package/src/vegetation/scatter.js +372 -1
- package/src/vegetation/stylizedTree.js +312 -126
- package/src/vegetation/stylizedTreeFoliage.js +229 -7
- package/src/vegetation/treeSurfaceTextures.js +328 -0
- package/src/version.js +1 -1
- package/src/water/waterSettings.js +15 -7
- package/types/asset-policy/catalogLicenses.d.ts +2 -0
- package/types/asset-policy/index.d.ts +2 -0
- package/types/assetlib/loadImported.d.ts +3 -1
- package/types/catalog/officialCatalogLod.d.ts +63 -5
- package/types/character/characterRig.d.ts +59 -0
- package/types/character/characterRuntime.d.ts +1 -0
- package/types/environment/environmentMaterialAdapter.d.ts +3 -1
- package/types/environment/toonLabSurfaceLighting.d.ts +20 -3
- package/types/index.d.ts +89 -7
- package/types/lighting/lightingSystem.d.ts +7 -0
- package/types/react/index.d.ts +20 -0
- package/types/renderer/index.d.ts +1 -0
- package/types/renderer/styleComparison.d.ts +409 -0
- package/types/rock-shader/index.d.ts +5 -0
- package/types/rock-shader/rockGeometryDetail.d.ts +300 -0
- package/types/rock-shader/rockMaterial.d.ts +3 -0
- package/types/rock-shader/rockRegionRuntime.d.ts +86 -0
- package/types/rock-shader/rockSemanticMaterialRuntime.d.ts +29 -0
- package/types/rock-shader/rockShaderRuntime.d.ts +2 -0
- package/types/rock-shader/rockShaderSettings.d.ts +19 -5
- package/types/rock-shader/rockTangentIntegrity.d.ts +51 -0
- package/types/rock-shader/rockTextureIntegrity.d.ts +61 -0
- package/types/rockgen/index.d.ts +1 -0
- package/types/rockgen/rockDocument.d.ts +29 -1
- package/types/rockgen/surface/c7GeologySurface.d.ts +8 -0
- package/types/sky/cloudShadow.d.ts +1 -0
- package/types/styles/index.d.ts +1 -0
- package/types/styles/neutralStylePresets.d.ts +944 -0
- package/types/styles/sceneStyleRuntime.d.ts +20 -0
- package/types/vegetation/branchTree.d.ts +4 -0
- package/types/vegetation/index.d.ts +9 -7
- package/types/vegetation/scatter.d.ts +1 -0
- package/types/vegetation/stylizedTree.d.ts +1 -2
- package/types/vegetation/stylizedTreeFoliage.d.ts +1 -0
- package/types/version.d.ts +1 -1
- package/agents/references/geology-playbook.md +0 -118
- package/agents/skills/claude/karst-cliff-construction/SKILL.md +0 -258
- package/agents/skills/claude/outdoor-world/SKILL.md +0 -492
- package/agents/skills/claude/outdoor-world/references/coastal-landform-formation.md +0 -100
- package/agents/skills/codex/karst-cliff-construction/SKILL.md +0 -258
- package/agents/skills/codex/outdoor-world/SKILL.md +0 -492
- package/agents/skills/codex/outdoor-world/references/coastal-landform-formation.md +0 -100
- package/src/vegetation/legacyTreePresets.js +0 -120
- package/types/vegetation/legacyTreePresets.d.ts +0 -22
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
STYLIZED_TREE_EXAMPLES,
|
|
3
|
-
StylizedTree,
|
|
4
|
-
TREE_RECIPE_SCHEMA,
|
|
5
|
-
TREE_RECIPE_VERSION,
|
|
6
|
-
serializableTreeOptions,
|
|
7
|
-
} from './stylizedTree.js';
|
|
8
|
-
|
|
9
|
-
const LEGACY_TREE_DEFINITIONS = Object.freeze([
|
|
10
|
-
Object.freeze({ id: 'straight', label: 'Straight' }),
|
|
11
|
-
Object.freeze({ id: 'leaning', label: 'Leaning' }),
|
|
12
|
-
Object.freeze({ id: 'see-through', label: 'See-through' }),
|
|
13
|
-
Object.freeze({ id: 'curved', label: 'Curved' }),
|
|
14
|
-
Object.freeze({ id: 'forest-mix', label: 'Forest Mix' }),
|
|
15
|
-
Object.freeze({ id: 'wide-crown', label: 'Wide Crown' }),
|
|
16
|
-
Object.freeze({ id: 'autumn-blend', label: 'Autumn Blend' }),
|
|
17
|
-
Object.freeze({ id: 'gnarled', label: 'Gnarled' }),
|
|
18
|
-
Object.freeze({ id: 'bonsai', label: 'Bonsai' }),
|
|
19
|
-
Object.freeze({ id: 'golden-gingko', label: 'Golden Gingko' }),
|
|
20
|
-
Object.freeze({ id: 'sumeru-tips', label: 'Sumeru Tips' }),
|
|
21
|
-
Object.freeze({ id: 'massive-sumeru', label: 'Massive Sumeru' }),
|
|
22
|
-
]);
|
|
23
|
-
|
|
24
|
-
function clone(value) {
|
|
25
|
-
if (Array.isArray(value)) return value.map(clone);
|
|
26
|
-
if (value && typeof value === 'object') {
|
|
27
|
-
return Object.fromEntries(Object.entries(value).map(([key, entry]) => [key, clone(entry)]));
|
|
28
|
-
}
|
|
29
|
-
return value;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
function deepFreeze(value) {
|
|
33
|
-
if (!value || typeof value !== 'object' || Object.isFrozen(value)) return value;
|
|
34
|
-
for (const entry of Object.values(value)) deepFreeze(entry);
|
|
35
|
-
return Object.freeze(value);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function legacyOptions(example) {
|
|
39
|
-
// `pale` and `climbable` are old showcase-scene hints, not tree generator
|
|
40
|
-
// inputs. Preserve them as document metadata without feeding them into the
|
|
41
|
-
// stable constructor surface.
|
|
42
|
-
const { pale = false, climbable = false, ...options } = example;
|
|
43
|
-
return {
|
|
44
|
-
metadata: { climbable: Boolean(climbable), pale: Boolean(pale) },
|
|
45
|
-
options: serializableTreeOptions(options),
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* The twelve pre-species ToonLab trees, now named and versioned explicitly.
|
|
51
|
-
*
|
|
52
|
-
* This is the supported legacy set that existed before the repository's
|
|
53
|
-
* botanical species research. It contains only generic stylized silhouettes;
|
|
54
|
-
* none of the documents claims a botanical species identity.
|
|
55
|
-
*/
|
|
56
|
-
export const LEGACY_TREE_PRESETS = deepFreeze(LEGACY_TREE_DEFINITIONS.map((definition, index) => {
|
|
57
|
-
const normalized = legacyOptions(STYLIZED_TREE_EXAMPLES[index]);
|
|
58
|
-
return {
|
|
59
|
-
builtIn: true,
|
|
60
|
-
id: definition.id,
|
|
61
|
-
label: definition.label,
|
|
62
|
-
metadata: normalized.metadata,
|
|
63
|
-
options: normalized.options,
|
|
64
|
-
schema: TREE_RECIPE_SCHEMA,
|
|
65
|
-
type: 'tree',
|
|
66
|
-
version: TREE_RECIPE_VERSION,
|
|
67
|
-
};
|
|
68
|
-
}));
|
|
69
|
-
|
|
70
|
-
export const LEGACY_TREE_IDS = Object.freeze(LEGACY_TREE_PRESETS.map(({ id }) => id));
|
|
71
|
-
|
|
72
|
-
/** Returns one immutable legacy recipe document, or null. */
|
|
73
|
-
export function getLegacyTreePreset(id) {
|
|
74
|
-
return LEGACY_TREE_PRESETS.find((preset) => preset.id === id) ?? null;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
/** Lists the stable legacy IDs and labels without duplicating recipe data. */
|
|
78
|
-
export function getLegacyTreePresetOptions() {
|
|
79
|
-
return LEGACY_TREE_PRESETS.map(({ id, label, metadata }) => ({
|
|
80
|
-
id,
|
|
81
|
-
label,
|
|
82
|
-
metadata: { ...metadata },
|
|
83
|
-
}));
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* Creates one tree from the supported pre-species set.
|
|
88
|
-
*
|
|
89
|
-
* Overrides remain the ordinary StylizedTree contract, including `leafShape`,
|
|
90
|
-
* `trunkMap`, `foliage.leafMap`, and `vegetationShader`. Nested generator and
|
|
91
|
-
* material groups merge over the selected recipe instead of replacing it.
|
|
92
|
-
*/
|
|
93
|
-
export function createLegacyTree(id, overrides = {}) {
|
|
94
|
-
const preset = getLegacyTreePreset(id);
|
|
95
|
-
if (!preset) throw new Error(`Unknown legacy tree preset "${String(id)}".`);
|
|
96
|
-
const base = clone(preset.options);
|
|
97
|
-
const source = overrides && typeof overrides === 'object' && !Array.isArray(overrides)
|
|
98
|
-
? overrides
|
|
99
|
-
: {};
|
|
100
|
-
const tree = new StylizedTree({
|
|
101
|
-
...base,
|
|
102
|
-
...source,
|
|
103
|
-
canopy: { ...(base.canopy ?? {}), ...(source.canopy ?? {}) },
|
|
104
|
-
foliage: { ...(base.foliage ?? {}), ...(source.foliage ?? {}) },
|
|
105
|
-
skeleton: { ...(base.skeleton ?? {}), ...(source.skeleton ?? {}) },
|
|
106
|
-
tree: {
|
|
107
|
-
...(base.tree ?? {}),
|
|
108
|
-
...(source.tree ?? {}),
|
|
109
|
-
trunkReceiveShadow: source.tree?.trunkReceiveShadow ?? true,
|
|
110
|
-
},
|
|
111
|
-
trunk: { ...(base.trunk ?? {}), ...(source.trunk ?? {}) },
|
|
112
|
-
});
|
|
113
|
-
tree.name = `LegacyTree:${preset.id}`;
|
|
114
|
-
tree.userData.legacyTree = {
|
|
115
|
-
id: preset.id,
|
|
116
|
-
label: preset.label,
|
|
117
|
-
recipeVersion: preset.version,
|
|
118
|
-
};
|
|
119
|
-
return tree;
|
|
120
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/** Returns one immutable legacy recipe document, or null. */
|
|
2
|
-
export function getLegacyTreePreset(id: any): any;
|
|
3
|
-
/** Lists the stable legacy IDs and labels without duplicating recipe data. */
|
|
4
|
-
export function getLegacyTreePresetOptions(): any;
|
|
5
|
-
/**
|
|
6
|
-
* Creates one tree from the supported pre-species set.
|
|
7
|
-
*
|
|
8
|
-
* Overrides remain the ordinary StylizedTree contract, including `leafShape`,
|
|
9
|
-
* `trunkMap`, `foliage.leafMap`, and `vegetationShader`. Nested generator and
|
|
10
|
-
* material groups merge over the selected recipe instead of replacing it.
|
|
11
|
-
*/
|
|
12
|
-
export function createLegacyTree(id: any, overrides?: {}): StylizedTree;
|
|
13
|
-
/**
|
|
14
|
-
* The twelve pre-species ToonLab trees, now named and versioned explicitly.
|
|
15
|
-
*
|
|
16
|
-
* This is the supported legacy set that existed before the repository's
|
|
17
|
-
* botanical species research. It contains only generic stylized silhouettes;
|
|
18
|
-
* none of the documents claims a botanical species identity.
|
|
19
|
-
*/
|
|
20
|
-
export const LEGACY_TREE_PRESETS: any;
|
|
21
|
-
export const LEGACY_TREE_IDS: any;
|
|
22
|
-
import { StylizedTree } from './stylizedTree.js';
|