@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
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Detail options for a rock of a given measured size.
|
|
3
|
+
*
|
|
4
|
+
* `amount` and `scale` are metres, so the tuned defaults silently mean
|
|
5
|
+
* something different on every asset that is not 5.94 m across. This is the
|
|
6
|
+
* geometry-side twin of `resolveCatalogRockProjectionScale`: hold the relief
|
|
7
|
+
* *proportional to the stone* instead of holding the absolute displacement,
|
|
8
|
+
* which is what keeps a 0.6 m stepping stone and a 6 m cliff reading as the
|
|
9
|
+
* same material.
|
|
10
|
+
*
|
|
11
|
+
* `subdivisions` is derived from a triangle target rather than fixed, because
|
|
12
|
+
* the catalog's density is wildly uneven — garden-scale families ship
|
|
13
|
+
* 120-460 triangles where cliff families ship 1,500-4,000, so one fixed level
|
|
14
|
+
* count either starves the small assets or wastes budget on the large ones.
|
|
15
|
+
*
|
|
16
|
+
* @param {object} options
|
|
17
|
+
* @param {number|number[]} [options.size] Largest dimension in metres, or a bounds triple.
|
|
18
|
+
* @param {string} [options.character] Key of `ROCK_GEOMETRY_DETAIL_CHARACTER`.
|
|
19
|
+
* @param {number} [options.relief] Explicit relief multiplier; wins over `character`.
|
|
20
|
+
* @param {number} [options.triangles] Source triangle count, for the subdivision target.
|
|
21
|
+
* @param {number} [options.triangleTarget] Desired post-subdivision triangles.
|
|
22
|
+
* @param {number} [options.variation] Per-asset decorrelation index.
|
|
23
|
+
* @param {number} [options.maxSubdivisions] Ceiling on subdivision levels.
|
|
24
|
+
* @returns {RockGeometryDetailOptions} options ready for `applyRockGeometryDetail`.
|
|
25
|
+
*/
|
|
26
|
+
export function resolveRockGeometryDetailForSize({ size, character, relief, triangles, triangleTarget, variation, maxSubdivisions, }?: {
|
|
27
|
+
size?: number | number[];
|
|
28
|
+
character?: string;
|
|
29
|
+
relief?: number;
|
|
30
|
+
triangles?: number;
|
|
31
|
+
triangleTarget?: number;
|
|
32
|
+
variation?: number;
|
|
33
|
+
maxSubdivisions?: number;
|
|
34
|
+
}): RockGeometryDetailOptions;
|
|
35
|
+
/**
|
|
36
|
+
* Displacement controls. Declared explicitly because inferring them from the
|
|
37
|
+
* frozen defaults yields literal types (`scale?: 0.65`), which would reject
|
|
38
|
+
* every real caller value and force a permissive declaration fallback.
|
|
39
|
+
*
|
|
40
|
+
* @typedef {object} RockGeometryDetailOptions
|
|
41
|
+
* @property {number} [amount] Peak displacement along the normal, metres.
|
|
42
|
+
* @property {boolean} [cavity] Write the concavity channel the moss mask reads.
|
|
43
|
+
* @property {number} [cavityGain] Scales the curvature response before clamping.
|
|
44
|
+
* @property {number} [cavityMicro] Folds displacement pits into the macro curvature.
|
|
45
|
+
* @property {number} [lacunarity] Frequency step between octaves.
|
|
46
|
+
* @property {number} [normalStrength] Scales the gradient-driven normal tilt.
|
|
47
|
+
* @property {number} [octaves] fBm octave count.
|
|
48
|
+
* @property {number} [scale] Coarsest feature size, metres.
|
|
49
|
+
* @property {boolean} [smoothNormals] Average normals across coincident vertices first.
|
|
50
|
+
* @property {number} [subdivisions] Midpoint subdivision levels (4^n triangles).
|
|
51
|
+
* @property {number} [variation] Per-asset index; equal indices give equal relief.
|
|
52
|
+
*/
|
|
53
|
+
/**
|
|
54
|
+
* @typedef {object} RockDetailHeightOptions
|
|
55
|
+
* @property {number} [lacunarity]
|
|
56
|
+
* @property {number} [octaves]
|
|
57
|
+
* @property {number} [scale]
|
|
58
|
+
* @property {number} [seed]
|
|
59
|
+
*/
|
|
60
|
+
/**
|
|
61
|
+
* Signed fBm height in roughly [-1, 1].
|
|
62
|
+
*
|
|
63
|
+
* `seed` offsets the lattice rather than reseeding the hash, which keeps the
|
|
64
|
+
* field continuous and makes adjacent variation indices genuinely different
|
|
65
|
+
* surfaces instead of near-copies.
|
|
66
|
+
*
|
|
67
|
+
* @param {number} x
|
|
68
|
+
* @param {number} y
|
|
69
|
+
* @param {number} z
|
|
70
|
+
* @param {RockDetailHeightOptions} [options]
|
|
71
|
+
* @returns {number}
|
|
72
|
+
*/
|
|
73
|
+
export function rockDetailHeight(x: number, y: number, z: number, { lacunarity, octaves, scale, seed, }?: RockDetailHeightOptions): number;
|
|
74
|
+
/**
|
|
75
|
+
* Per-vertex concavity of the mesh's own form, in [0,1].
|
|
76
|
+
*
|
|
77
|
+
* Moss does not colonise by slope. It colonises where moisture collects and
|
|
78
|
+
* light is indirect — crevices, hollows, the junction where one slab meets
|
|
79
|
+
* another. Slope cannot express any of that, which is why a slope-only mask
|
|
80
|
+
* reads as a tint painted on rather than a material growing in.
|
|
81
|
+
*
|
|
82
|
+
* The estimator is the standard discrete mean-curvature sign test: for each
|
|
83
|
+
* welded vertex, take the centroid of its one-ring neighbours and project the
|
|
84
|
+
* offset onto the vertex normal. A centroid sitting along +n means the surface
|
|
85
|
+
* curves away on all sides — a hollow. Along -n means a ridge or an exposed
|
|
86
|
+
* corner. Normalising by the local edge length keeps it scale-invariant, so the
|
|
87
|
+
* same term works on a 0.4 m stepping stone and a 6 m cliff.
|
|
88
|
+
*
|
|
89
|
+
* Computed BEFORE subdivision deliberately: the coarse mesh's edges span the
|
|
90
|
+
* macro form, which is where the real crevices are. Subdivision then
|
|
91
|
+
* interpolates the attribute for free, giving a smooth moisture field rather
|
|
92
|
+
* than a stair-stepped one.
|
|
93
|
+
*
|
|
94
|
+
* @param {import('three').BufferGeometry} geometry Non-indexed triangle soup.
|
|
95
|
+
* @param {number} [gain] Scales the curvature response before clamping.
|
|
96
|
+
* @returns {Float32Array} one value per vertex.
|
|
97
|
+
*/
|
|
98
|
+
export function computeMeshCavity(geometry: import("three").BufferGeometry, gain?: number): Float32Array;
|
|
99
|
+
/**
|
|
100
|
+
* Per-vertex concavity AND convexity of the mesh's own form, both in [0,1].
|
|
101
|
+
*
|
|
102
|
+
* One traversal, one curvature estimate, two rectified halves. `cavity` keeps
|
|
103
|
+
* the positive sign (hollows, crevices, slab junctions) and `exposure` keeps the
|
|
104
|
+
* negative one (crowns, ridges, shoulders, exposed corners). They are mutually
|
|
105
|
+
* exclusive per vertex by construction, and a flat face scores 0 in both.
|
|
106
|
+
*
|
|
107
|
+
* Splitting them matters because the two halves answer different questions for
|
|
108
|
+
* the moss mask: cavity says where water lingers, exposure says where it never
|
|
109
|
+
* does. A mask holding only the first can add moss to hollows but cannot take it
|
|
110
|
+
* off a crown, which leaves the noise field as the sole thing distinguishing one
|
|
111
|
+
* upper face from another — and noise uncorrelated with form is the definition
|
|
112
|
+
* of camouflage (D19-212).
|
|
113
|
+
*
|
|
114
|
+
* @param {import('three').BufferGeometry} geometry Non-indexed triangle soup.
|
|
115
|
+
* @param {number} [gain] Scales the curvature response before clamping.
|
|
116
|
+
* @returns {{cavity: Float32Array, exposure: Float32Array}} one value per vertex each.
|
|
117
|
+
*/
|
|
118
|
+
export function computeMeshCurvature(geometry: import("three").BufferGeometry, gain?: number): {
|
|
119
|
+
cavity: Float32Array;
|
|
120
|
+
exposure: Float32Array;
|
|
121
|
+
};
|
|
122
|
+
/**
|
|
123
|
+
* Averages normals across coincident vertices, in place.
|
|
124
|
+
*
|
|
125
|
+
* This is the operation the module's header warns against — and it is warned
|
|
126
|
+
* against for FRACTURED stone, where welding rounds the authored arris edges
|
|
127
|
+
* into a pebble. For water-worn stone the reverse is true: the asset has no
|
|
128
|
+
* arris edges to protect, and the catalog's garden-scale families ship flat
|
|
129
|
+
* per-face normals on a 120-460 triangle hull, so the shading breaks into
|
|
130
|
+
* gemstone facets that no amount of subdivision or displacement can hide.
|
|
131
|
+
*
|
|
132
|
+
* Applied BEFORE subdivision, so the interpolation that follows carries a
|
|
133
|
+
* smooth field rather than re-splitting a faceted one.
|
|
134
|
+
*
|
|
135
|
+
* @param {import('three').BufferGeometry} geometry Non-indexed triangle soup.
|
|
136
|
+
* @returns {number} vertices whose normal was replaced.
|
|
137
|
+
*/
|
|
138
|
+
export function smoothMeshNormals(geometry: import("three").BufferGeometry): number;
|
|
139
|
+
/**
|
|
140
|
+
* Subdivides and displaces one geometry in place.
|
|
141
|
+
*
|
|
142
|
+
* @param {import('three').BufferGeometry} geometry
|
|
143
|
+
* @param {RockGeometryDetailOptions} [options]
|
|
144
|
+
* @returns {{triangles: number, subdivisions: number, amount: number, cavity: boolean} | null} applied detail.
|
|
145
|
+
*/
|
|
146
|
+
export function applyRockGeometryDetailToGeometry(geometry: import("three").BufferGeometry, { amount, cavity, cavityGain, cavityMicro, lacunarity, normalStrength, octaves, scale, smoothNormals, subdivisions, variation, }?: RockGeometryDetailOptions): {
|
|
147
|
+
triangles: number;
|
|
148
|
+
subdivisions: number;
|
|
149
|
+
amount: number;
|
|
150
|
+
cavity: boolean;
|
|
151
|
+
} | null;
|
|
152
|
+
/**
|
|
153
|
+
* Adds geometry detail to every rock mesh under `root`.
|
|
154
|
+
*
|
|
155
|
+
* Idempotent per mesh: a geometry already enriched is skipped, so calling this
|
|
156
|
+
* twice cannot compound displacement into mush.
|
|
157
|
+
*
|
|
158
|
+
* @param {import('three').Object3D} root
|
|
159
|
+
* @param {RockGeometryDetailOptions} [options]
|
|
160
|
+
* @returns {{meshes: number, triangles: number, trianglesBefore: number, skipped: number, cavity: number}} meshes that received a cavity channel are counted in `cavity`.
|
|
161
|
+
*/
|
|
162
|
+
export function applyRockGeometryDetail(root: import("three").Object3D, options?: RockGeometryDetailOptions): {
|
|
163
|
+
meshes: number;
|
|
164
|
+
triangles: number;
|
|
165
|
+
trianglesBefore: number;
|
|
166
|
+
skipped: number;
|
|
167
|
+
cavity: number;
|
|
168
|
+
};
|
|
169
|
+
/**
|
|
170
|
+
* Displacement defaults, tuned against shot S08's 85 mm framing on
|
|
171
|
+
* ROCK-COAST-01 — the closest any launch frame gets to a rock.
|
|
172
|
+
*
|
|
173
|
+
* `amount` is in metres and the useful window is narrow. At 0.055 the straight
|
|
174
|
+
* silhouette edges soften but the broad faces stay visibly planar; at 0.16 with
|
|
175
|
+
* a 0.40 scale the asset turns to lumpy wax and the crisp stylized arris that
|
|
176
|
+
* makes it read as cliff rather than boulder is gone. 0.10 m at a 0.65 m
|
|
177
|
+
* feature scale erodes the edges and breaks up the faces while keeping the
|
|
178
|
+
* authored silhouette legible.
|
|
179
|
+
*
|
|
180
|
+
* `subdivisions: 2` (16x triangles) resolves this scale almost as well as 3
|
|
181
|
+
* (64x) at a quarter of the cost, so 3 is reserved for a hero close-up.
|
|
182
|
+
*/
|
|
183
|
+
export const DEFAULT_ROCK_GEOMETRY_DETAIL: Readonly<{
|
|
184
|
+
amount: 0.1;
|
|
185
|
+
cavity: true;
|
|
186
|
+
cavityGain: 2.6;
|
|
187
|
+
cavityMicro: 0.55;
|
|
188
|
+
lacunarity: 2.03;
|
|
189
|
+
normalStrength: 1;
|
|
190
|
+
octaves: 4;
|
|
191
|
+
scale: 0.65;
|
|
192
|
+
subdivisions: 2;
|
|
193
|
+
variation: 0;
|
|
194
|
+
}>;
|
|
195
|
+
/** Subdivision is 4^levels triangles; past this a hero mesh stops being sane. */
|
|
196
|
+
export const MAX_ROCK_DETAIL_SUBDIVISIONS: 3;
|
|
197
|
+
/**
|
|
198
|
+
* The size the defaults were tuned against: ROCK-COAST-01 at 5.94 m.
|
|
199
|
+
* `amount` and `scale` are absolute metres, so they only mean what they were
|
|
200
|
+
* tuned to mean on a rock of about this size.
|
|
201
|
+
*/
|
|
202
|
+
export const ROCK_GEOMETRY_DETAIL_REFERENCE: Readonly<{
|
|
203
|
+
amount: 0.1;
|
|
204
|
+
scale: 0.65;
|
|
205
|
+
size: 5.94;
|
|
206
|
+
/** ROCK-COAST-01's LOD0 count, which sets the reference facet size. */
|
|
207
|
+
triangles: 4006;
|
|
208
|
+
}>;
|
|
209
|
+
/**
|
|
210
|
+
* Relief multipliers by stone character.
|
|
211
|
+
*
|
|
212
|
+
* A fractured cliff and a water-worn garden boulder are not the same surface
|
|
213
|
+
* at different sizes — the boulder is smoother *in proportion to itself*,
|
|
214
|
+
* because the process that shaped it removed relief rather than creating it.
|
|
215
|
+
* Scaling the cliff numbers geometrically onto a 1.3 m boulder gives a lumpy
|
|
216
|
+
* potato; these are the honest per-character corrections.
|
|
217
|
+
*/
|
|
218
|
+
export const ROCK_GEOMETRY_DETAIL_CHARACTER: Readonly<{
|
|
219
|
+
/** Fractured, bedded, quarried — the tuned cliff response. */
|
|
220
|
+
fractured: 1;
|
|
221
|
+
/** Glacially rounded or water-worn: soft convex form, shallow relief. */
|
|
222
|
+
worn: 0.42;
|
|
223
|
+
/** Weathered but still angular: talus, frost-shattered fragments. */
|
|
224
|
+
weathered: 0.72;
|
|
225
|
+
}>;
|
|
226
|
+
/** Vertex attribute carrying the concavity term the moss mask reads. */
|
|
227
|
+
export const ROCK_CAVITY_ATTRIBUTE: "rockCavity";
|
|
228
|
+
/**
|
|
229
|
+
* Vertex attribute carrying the CONVEXITY term — the signed opposite of
|
|
230
|
+
* `ROCK_CAVITY_ATTRIBUTE`.
|
|
231
|
+
*
|
|
232
|
+
* `computeMeshCavity` clamps its curvature to [0,1], so every convex vertex —
|
|
233
|
+
* every crown, ridge, shoulder and exposed corner — resolves to exactly 0 and
|
|
234
|
+
* is indistinguishable from a flat face. The moss support term could therefore
|
|
235
|
+
* express "this is a hollow" but had no way to express "this is a weather-beaten
|
|
236
|
+
* crown", and a crown is precisely where moss is absent: it sheds water, it is
|
|
237
|
+
* scoured, and it dries first.
|
|
238
|
+
*
|
|
239
|
+
* That missing half is why moss distributed evenly over exposed upper faces
|
|
240
|
+
* (D19-212). It is the same estimator, the same pass and the same interpolation;
|
|
241
|
+
* only the sign kept is different.
|
|
242
|
+
*/
|
|
243
|
+
export const ROCK_EXPOSURE_ATTRIBUTE: "rockExposure";
|
|
244
|
+
/**
|
|
245
|
+
* Displacement controls. Declared explicitly because inferring them from the
|
|
246
|
+
* frozen defaults yields literal types (`scale?: 0.65`), which would reject
|
|
247
|
+
* every real caller value and force a permissive declaration fallback.
|
|
248
|
+
*/
|
|
249
|
+
export type RockGeometryDetailOptions = {
|
|
250
|
+
/**
|
|
251
|
+
* Peak displacement along the normal, metres.
|
|
252
|
+
*/
|
|
253
|
+
amount?: number;
|
|
254
|
+
/**
|
|
255
|
+
* Write the concavity channel the moss mask reads.
|
|
256
|
+
*/
|
|
257
|
+
cavity?: boolean;
|
|
258
|
+
/**
|
|
259
|
+
* Scales the curvature response before clamping.
|
|
260
|
+
*/
|
|
261
|
+
cavityGain?: number;
|
|
262
|
+
/**
|
|
263
|
+
* Folds displacement pits into the macro curvature.
|
|
264
|
+
*/
|
|
265
|
+
cavityMicro?: number;
|
|
266
|
+
/**
|
|
267
|
+
* Frequency step between octaves.
|
|
268
|
+
*/
|
|
269
|
+
lacunarity?: number;
|
|
270
|
+
/**
|
|
271
|
+
* Scales the gradient-driven normal tilt.
|
|
272
|
+
*/
|
|
273
|
+
normalStrength?: number;
|
|
274
|
+
/**
|
|
275
|
+
* fBm octave count.
|
|
276
|
+
*/
|
|
277
|
+
octaves?: number;
|
|
278
|
+
/**
|
|
279
|
+
* Coarsest feature size, metres.
|
|
280
|
+
*/
|
|
281
|
+
scale?: number;
|
|
282
|
+
/**
|
|
283
|
+
* Average normals across coincident vertices first.
|
|
284
|
+
*/
|
|
285
|
+
smoothNormals?: boolean;
|
|
286
|
+
/**
|
|
287
|
+
* Midpoint subdivision levels (4^n triangles).
|
|
288
|
+
*/
|
|
289
|
+
subdivisions?: number;
|
|
290
|
+
/**
|
|
291
|
+
* Per-asset index; equal indices give equal relief.
|
|
292
|
+
*/
|
|
293
|
+
variation?: number;
|
|
294
|
+
};
|
|
295
|
+
export type RockDetailHeightOptions = {
|
|
296
|
+
lacunarity?: number;
|
|
297
|
+
octaves?: number;
|
|
298
|
+
scale?: number;
|
|
299
|
+
seed?: number;
|
|
300
|
+
};
|
|
@@ -14,5 +14,8 @@ export function loadToonRockMaterial(...args: any[]): any;
|
|
|
14
14
|
export function loadToonRockMaterialInputs(...args: any[]): any;
|
|
15
15
|
export function normalizeToonLabMountainProfile(...args: any[]): any;
|
|
16
16
|
export function normalizeToonLabRockProfile(...args: any[]): any;
|
|
17
|
+
export function tangentNormalToView(...args: any[]): any;
|
|
17
18
|
export function toonLabMountainProfileFromResolvedMaterial(...args: any[]): any;
|
|
18
19
|
export function toonLabRockProfileFromResolvedMaterial(...args: any[]): any;
|
|
20
|
+
export function toonLabTriplanarColor(...args: any[]): any;
|
|
21
|
+
export function toonLabTriplanarNormal(...args: any[]): any;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
export const ROCK_REGION_BINDING_SCHEMA: 'toonlab.rock-region-binding';
|
|
2
|
+
export const ROCK_REGION_BINDING_VERSION: 1;
|
|
3
|
+
export const ROCK_REGION_PROFILE: 'hoodoo-caprock-normalized-height-v1';
|
|
4
|
+
export const ROCK_REGION_GLTF_ATTRIBUTE: '_TL_ROCK_REGION';
|
|
5
|
+
export const ROCK_REGION_THREE_ATTRIBUTE: '_tl_rock_region';
|
|
6
|
+
export const ROCK_REGION_BINDING_KEY: 'toonlabRockRegionBinding';
|
|
7
|
+
export const ROCK_REGION_CHANNELS: readonly ['base', 'shaft', 'neck', 'cap'];
|
|
8
|
+
export const ROCK_REGION_BANDS: Readonly<{
|
|
9
|
+
base: readonly [0.12, 0.30];
|
|
10
|
+
cap: readonly [0.72, 0.86];
|
|
11
|
+
neckEnter: readonly [0.60, 0.70];
|
|
12
|
+
neckExit: readonly [0.80, 0.89];
|
|
13
|
+
}>;
|
|
14
|
+
|
|
15
|
+
export type RockRegionChannel = (typeof ROCK_REGION_CHANNELS)[number];
|
|
16
|
+
|
|
17
|
+
export interface RockRegionBindingDocument {
|
|
18
|
+
readonly schema: typeof ROCK_REGION_BINDING_SCHEMA;
|
|
19
|
+
readonly version: typeof ROCK_REGION_BINDING_VERSION;
|
|
20
|
+
readonly profile: 'hoodoo-caprock-normalized-height-v1';
|
|
21
|
+
readonly attribute: typeof ROCK_REGION_GLTF_ATTRIBUTE;
|
|
22
|
+
readonly encoding: 'unorm8';
|
|
23
|
+
readonly channels: readonly ['base', 'shaft', 'neck', 'cap'];
|
|
24
|
+
readonly space: 'mesh-local-normalized-height';
|
|
25
|
+
readonly failClosed: true;
|
|
26
|
+
readonly bands: Readonly<{
|
|
27
|
+
base: readonly [number, number];
|
|
28
|
+
cap: readonly [number, number];
|
|
29
|
+
neckEnter: readonly [number, number];
|
|
30
|
+
neckExit: readonly [number, number];
|
|
31
|
+
}>;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface RockRegionAttributeLike {
|
|
35
|
+
readonly array: Uint8Array;
|
|
36
|
+
readonly count: number;
|
|
37
|
+
readonly itemSize: 4;
|
|
38
|
+
readonly normalized: true;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface RockRegionMeshLike {
|
|
42
|
+
readonly isMesh: true;
|
|
43
|
+
readonly name?: string;
|
|
44
|
+
readonly userData?: Record<string, unknown>;
|
|
45
|
+
readonly geometry: {
|
|
46
|
+
readonly isBufferGeometry: true;
|
|
47
|
+
getAttribute(name: string): unknown;
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface RockRegionRootLike {
|
|
52
|
+
traverse(callback: (object: unknown) => void): void;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface RockRegionInspection {
|
|
56
|
+
readonly binding: RockRegionBindingDocument;
|
|
57
|
+
readonly attribute: RockRegionAttributeLike;
|
|
58
|
+
readonly attributeName: typeof ROCK_REGION_THREE_ATTRIBUTE;
|
|
59
|
+
readonly count: number;
|
|
60
|
+
readonly bytes: number;
|
|
61
|
+
readonly primaryPartitionFailures: number;
|
|
62
|
+
readonly compilerProfileMismatches: number;
|
|
63
|
+
readonly neckSamples: number;
|
|
64
|
+
readonly nonzeroSamples: readonly [number, number, number, number];
|
|
65
|
+
readonly channelMinUnorm8: readonly [number, number, number, number];
|
|
66
|
+
readonly channelMaxUnorm8: readonly [number, number, number, number];
|
|
67
|
+
readonly passed: true;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export interface RockRegionTreeInspection {
|
|
71
|
+
readonly passed: true;
|
|
72
|
+
readonly meshCount: number;
|
|
73
|
+
readonly totalVertices: number;
|
|
74
|
+
readonly totalBytes: number;
|
|
75
|
+
readonly records: readonly (RockRegionInspection & { readonly mesh: RockRegionMeshLike })[];
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function inspectRockRegionBinding(
|
|
79
|
+
mesh: RockRegionMeshLike,
|
|
80
|
+
options?: Readonly<{ sampleValues?: boolean }>,
|
|
81
|
+
): Readonly<RockRegionInspection>;
|
|
82
|
+
|
|
83
|
+
export function inspectRockRegionBindings(
|
|
84
|
+
root: RockRegionRootLike,
|
|
85
|
+
options?: Readonly<{ requireEveryMesh?: boolean; sampleValues?: boolean }>,
|
|
86
|
+
): Readonly<RockRegionTreeInspection>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolves every fail-closed GLB material binding before the asset is exposed.
|
|
3
|
+
* Throws on any missing manifest, set, or source texture; there is no fallback.
|
|
4
|
+
*
|
|
5
|
+
* @param {import('three').Object3D} root
|
|
6
|
+
* @param {{
|
|
7
|
+
* fetchImpl?: typeof globalThis.fetch,
|
|
8
|
+
* modelUrl?: string | URL,
|
|
9
|
+
* textureLoader?: TextureLoader,
|
|
10
|
+
* }} [options]
|
|
11
|
+
* @returns {Promise<{ materialSets: number, textures: number }>}
|
|
12
|
+
*/
|
|
13
|
+
export function prepareRockSemanticMaterialBindings(root: import("three").Object3D, { fetchImpl, modelUrl, textureLoader, }?: {
|
|
14
|
+
fetchImpl?: typeof globalThis.fetch;
|
|
15
|
+
modelUrl?: string | URL;
|
|
16
|
+
textureLoader?: TextureLoader;
|
|
17
|
+
}): Promise<{
|
|
18
|
+
materialSets: number;
|
|
19
|
+
textures: number;
|
|
20
|
+
}>;
|
|
21
|
+
/** Preserves cache-owned Texture instances when official assets clone materials. */
|
|
22
|
+
export function copyRockSemanticMaterialBinding(source: any, target: any): any;
|
|
23
|
+
export function rockSemanticMaterialTextures(material: any): any;
|
|
24
|
+
export function clearRockSemanticMaterialCaches({ disposeTextures }?: {
|
|
25
|
+
disposeTextures?: boolean;
|
|
26
|
+
}): void;
|
|
27
|
+
export const ROCK_MATERIAL_BINDING_SCHEMA: "toonlab.rock-material-binding";
|
|
28
|
+
export const ROCK_SEMANTIC_MATERIAL_SET_SCHEMA: "toonlab.rock-semantic-material-set";
|
|
29
|
+
import { TextureLoader } from 'three';
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
// Source inference fallback: public names retained with permissive signatures.
|
|
2
|
+
export const ROCK_MOSS_CAVITY_STRENGTH: any;
|
|
2
3
|
export function applyRockShader(...args: any[]): any;
|
|
3
4
|
export function createDefaultRockShaderTextureSet(...args: any[]): any;
|
|
4
5
|
export function createRockShaderMaterial(...args: any[]): any;
|
|
6
|
+
export function createRockShaderTextureSet(...args: any[]): any;
|
|
5
7
|
export function disposeDefaultRockShaderTextures(...args: any[]): any;
|
|
6
8
|
export function restoreRockShader(...args: any[]): any;
|
|
7
9
|
export function rockShaderSettingsToProfile(...args: any[]): any;
|
|
@@ -71,9 +71,9 @@ export const DEFAULT_ROCK_SHADER_SETTINGS: Readonly<{
|
|
|
71
71
|
export const CALL_ME_SENSEI_ROCK_SHADER_SETTINGS: Readonly<{
|
|
72
72
|
projection: Readonly<{
|
|
73
73
|
scale: 48;
|
|
74
|
-
saturation:
|
|
75
|
-
contrast:
|
|
76
|
-
brightness: 0
|
|
74
|
+
saturation: 1;
|
|
75
|
+
contrast: 1;
|
|
76
|
+
brightness: 0;
|
|
77
77
|
projectionContrast: 2;
|
|
78
78
|
sideOnly: false;
|
|
79
79
|
nearDetailScale: 1.2;
|
|
@@ -89,10 +89,13 @@ export const CALL_ME_SENSEI_ROCK_SHADER_SETTINGS: Readonly<{
|
|
|
89
89
|
emissiveStrength: 0;
|
|
90
90
|
}>;
|
|
91
91
|
lighting: Readonly<{
|
|
92
|
-
exposure: 0.
|
|
93
|
-
ambientFloor: 0.
|
|
92
|
+
exposure: 0.95;
|
|
93
|
+
ambientFloor: 0.04;
|
|
94
|
+
skyColorInfluence: 1;
|
|
94
95
|
skyFillStrength: 0.72;
|
|
95
96
|
skyFillTint: readonly number[];
|
|
97
|
+
shadowFill: 0;
|
|
98
|
+
shadowFillTint: readonly number[];
|
|
96
99
|
}>;
|
|
97
100
|
shoreline: Readonly<{
|
|
98
101
|
wetBandWidth: 1;
|
|
@@ -127,6 +130,17 @@ export const CALL_ME_SENSEI_ROCK_SHADER_SETTINGS: Readonly<{
|
|
|
127
130
|
colorPower: 1.3;
|
|
128
131
|
lowColor: readonly number[];
|
|
129
132
|
highColor: readonly number[];
|
|
133
|
+
roughness: -1;
|
|
134
|
+
relief: 0;
|
|
135
|
+
fringe: 0;
|
|
136
|
+
fringeScale: 0.35;
|
|
137
|
+
formDriven: 0;
|
|
138
|
+
coverage: -1;
|
|
139
|
+
band: 0.18;
|
|
140
|
+
patchScale: 0.6;
|
|
141
|
+
patchStrength: 0.8;
|
|
142
|
+
patchOctaves: 3;
|
|
143
|
+
patchContrast: 1.6;
|
|
130
144
|
}>;
|
|
131
145
|
layerMask: Readonly<{
|
|
132
146
|
useAssetMask: true;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Audits a geometry tangent attribute before a normal-mapped material can
|
|
3
|
+
* consume it. A missing tangent attribute is valid: Three.js derives a
|
|
4
|
+
* derivative TBN frame. A present but zero/invalid attribute is not valid and
|
|
5
|
+
* produces literal black facets in WebGPU/TSL normal mapping.
|
|
6
|
+
*/
|
|
7
|
+
export function inspectRockGeometryTangents(geometry: any, { epsilon, orthogonalityTolerance, }?: {
|
|
8
|
+
epsilon?: number;
|
|
9
|
+
orthogonalityTolerance?: number;
|
|
10
|
+
}): {
|
|
11
|
+
vertices: any;
|
|
12
|
+
hasTangents: boolean;
|
|
13
|
+
tangentVertices: any;
|
|
14
|
+
invalidVertices: number;
|
|
15
|
+
zeroLength: number;
|
|
16
|
+
nonFinite: number;
|
|
17
|
+
invalidHandedness: number;
|
|
18
|
+
nonOrthogonal: number;
|
|
19
|
+
countMismatch: boolean;
|
|
20
|
+
itemSizeInvalid: boolean;
|
|
21
|
+
valid: boolean;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Removes only invalid tangent attributes. Three.js then uses its derivative
|
|
25
|
+
* tangent frame, which is the safe fallback for degenerate UV islands. Vertex
|
|
26
|
+
* positions, normals, UVs, indices, materials, and texture files are untouched.
|
|
27
|
+
*/
|
|
28
|
+
export function sanitizeRockGeometryTangents(geometry: any, options?: {}): {
|
|
29
|
+
removed: boolean;
|
|
30
|
+
vertices: any;
|
|
31
|
+
hasTangents: boolean;
|
|
32
|
+
tangentVertices: any;
|
|
33
|
+
invalidVertices: number;
|
|
34
|
+
zeroLength: number;
|
|
35
|
+
nonFinite: number;
|
|
36
|
+
invalidHandedness: number;
|
|
37
|
+
nonOrthogonal: number;
|
|
38
|
+
countMismatch: boolean;
|
|
39
|
+
itemSizeInvalid: boolean;
|
|
40
|
+
valid: boolean;
|
|
41
|
+
};
|
|
42
|
+
/** Audits and repairs every mesh below a rock root. */
|
|
43
|
+
export function sanitizeRockTangents(root: any, options?: {}): {
|
|
44
|
+
meshes: number;
|
|
45
|
+
meshesWithTangents: number;
|
|
46
|
+
repairedMeshes: number;
|
|
47
|
+
vertices: number;
|
|
48
|
+
tangentVertices: number;
|
|
49
|
+
invalidVertices: number;
|
|
50
|
+
issues: any[];
|
|
51
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reads a texture's pixel dimensions across the shapes three.js uses:
|
|
3
|
+
* `DataTexture`/`Texture` carry `image`, compressed KTX2 textures carry
|
|
4
|
+
* `mipmaps[0]`, and loaders that went through `Source` carry `source.data`.
|
|
5
|
+
*
|
|
6
|
+
* @returns {{width: number, height: number} | null} null when undeterminable.
|
|
7
|
+
*/
|
|
8
|
+
export function resolveTextureSize(texture: any): {
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
} | null;
|
|
12
|
+
/**
|
|
13
|
+
* True when a texture is too small to carry the detail its slot implies.
|
|
14
|
+
*
|
|
15
|
+
* Undeterminable sizes return `false` — this guard removes maps only when it
|
|
16
|
+
* can prove they are degenerate, so an unusual-but-valid texture is never
|
|
17
|
+
* silently dropped.
|
|
18
|
+
*/
|
|
19
|
+
export function isDegenerateDetailMap(texture: any, { minEdgeTexels, }?: {
|
|
20
|
+
minEdgeTexels?: number;
|
|
21
|
+
}): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Describes a texture for diagnostics without assuming it is loaded.
|
|
24
|
+
*/
|
|
25
|
+
export function describeTexture(texture: any): {
|
|
26
|
+
name: any;
|
|
27
|
+
resolution: string;
|
|
28
|
+
uuid: any;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Removes degenerate detail maps from a texture set.
|
|
32
|
+
*
|
|
33
|
+
* Returns a new object plus the list of rejected slots so callers can report
|
|
34
|
+
* the substitution rather than hiding it — a dropped map changes the rendered
|
|
35
|
+
* result and should be visible in an asset report.
|
|
36
|
+
*
|
|
37
|
+
* @param {Record<string, unknown>} textures
|
|
38
|
+
* @param {{minEdgeTexels?: number, slots?: readonly string[]}} [options]
|
|
39
|
+
* @returns {{textures: Record<string, unknown>, rejected: Array<{slot: string, reason: string, texture: object}>}}
|
|
40
|
+
*/
|
|
41
|
+
export function withoutDegenerateDetailMaps(textures: Record<string, unknown>, { minEdgeTexels, slots, }?: {
|
|
42
|
+
minEdgeTexels?: number;
|
|
43
|
+
slots?: readonly string[];
|
|
44
|
+
}): {
|
|
45
|
+
textures: Record<string, unknown>;
|
|
46
|
+
rejected: Array<{
|
|
47
|
+
slot: string;
|
|
48
|
+
reason: string;
|
|
49
|
+
texture: object;
|
|
50
|
+
}>;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Minimum edge length, in texels, for a map to be treated as carrying detail.
|
|
54
|
+
*
|
|
55
|
+
* A triplanar detail map is projected at metre scale, so its texel density is
|
|
56
|
+
* what produces fracture and erosion relief. Below 16x16 there is no spatial
|
|
57
|
+
* frequency left to project and the map is indistinguishable from a constant.
|
|
58
|
+
*/
|
|
59
|
+
export const MIN_DETAIL_MAP_EDGE_TEXELS: 16;
|
|
60
|
+
/** Texture slots treated as detail maps for integrity purposes. */
|
|
61
|
+
export const ROCK_DETAIL_MAP_SLOTS: readonly string[];
|
package/types/rockgen/index.d.ts
CHANGED
|
@@ -18,6 +18,13 @@ export function createRockReferenceIdentity(options?: any): {
|
|
|
18
18
|
role: string;
|
|
19
19
|
series: string;
|
|
20
20
|
sourceMode: string;
|
|
21
|
+
surfacePackage: {
|
|
22
|
+
geology: string;
|
|
23
|
+
mapResolution: number;
|
|
24
|
+
schema: string;
|
|
25
|
+
seed: number;
|
|
26
|
+
version: number;
|
|
27
|
+
};
|
|
21
28
|
surfaceMode: string;
|
|
22
29
|
targetTriangles: number;
|
|
23
30
|
topFinish: any;
|
|
@@ -85,6 +92,13 @@ export function createRockDocument(options?: any): {
|
|
|
85
92
|
role: string;
|
|
86
93
|
series: string;
|
|
87
94
|
sourceMode: string;
|
|
95
|
+
surfacePackage: {
|
|
96
|
+
geology: string;
|
|
97
|
+
mapResolution: number;
|
|
98
|
+
schema: string;
|
|
99
|
+
seed: number;
|
|
100
|
+
version: number;
|
|
101
|
+
};
|
|
88
102
|
surfaceMode: string;
|
|
89
103
|
targetTriangles: number;
|
|
90
104
|
topFinish: any;
|
|
@@ -123,6 +137,13 @@ export function rebaseRockDocumentStyle(document: any, style?: string): {
|
|
|
123
137
|
role: string;
|
|
124
138
|
series: string;
|
|
125
139
|
sourceMode: string;
|
|
140
|
+
surfacePackage: {
|
|
141
|
+
geology: string;
|
|
142
|
+
mapResolution: number;
|
|
143
|
+
schema: string;
|
|
144
|
+
seed: number;
|
|
145
|
+
version: number;
|
|
146
|
+
};
|
|
126
147
|
surfaceMode: string;
|
|
127
148
|
targetTriangles: number;
|
|
128
149
|
topFinish: any;
|
|
@@ -189,6 +210,13 @@ export function deserializeRockDocument(jsonOrObject: any): {
|
|
|
189
210
|
role: string;
|
|
190
211
|
series: string;
|
|
191
212
|
sourceMode: string;
|
|
213
|
+
surfacePackage: {
|
|
214
|
+
geology: string;
|
|
215
|
+
mapResolution: number;
|
|
216
|
+
schema: string;
|
|
217
|
+
seed: number;
|
|
218
|
+
version: number;
|
|
219
|
+
};
|
|
192
220
|
surfaceMode: string;
|
|
193
221
|
targetTriangles: number;
|
|
194
222
|
topFinish: any;
|
|
@@ -206,7 +234,7 @@ export function deserializeRockDocument(jsonOrObject: any): {
|
|
|
206
234
|
/** Document type tag stamped on saved rockgen project JSON. */
|
|
207
235
|
export const ROCKGEN_PROJECT_DOCUMENT_TYPE: "toonlab/rockgen-project";
|
|
208
236
|
/** Current schema version for rockgen project documents. */
|
|
209
|
-
export const ROCKGEN_PROJECT_SCHEMA_VERSION:
|
|
237
|
+
export const ROCKGEN_PROJECT_SCHEMA_VERSION: 6;
|
|
210
238
|
/** Sparse source-mesh edits are packed into the portable document so normal
|
|
211
239
|
* sculpting remains below the hosted creation-document limit. Runtime state
|
|
212
240
|
* is still the convenient array form consumed by the editor and compiler. */
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Source inference fallback: public names retained with permissive signatures.
|
|
2
|
+
export const C7_GEOLOGY_PROFILES: any;
|
|
3
|
+
export const C7_GEOLOGY_SURFACE_SCHEMA: any;
|
|
4
|
+
export const C7_GEOLOGY_SURFACE_VERSION: any;
|
|
5
|
+
export function c7SurfaceSeed(...args: any[]): any;
|
|
6
|
+
export function createC7GeologyMapData(...args: any[]): any;
|
|
7
|
+
export function createC7SurfaceSpecification(...args: any[]): any;
|
|
8
|
+
export function resolveC7Projection(...args: any[]): any;
|
|
@@ -39,6 +39,7 @@ export function createCloudShadowPass({ cloudVolume, clouds, sun, timeOfDay, res
|
|
|
39
39
|
readonly resolution: number;
|
|
40
40
|
bakeInterval: number;
|
|
41
41
|
groundReferenceY: number;
|
|
42
|
+
setLightDirection(value?: any): any;
|
|
42
43
|
setResolution(value: any): void;
|
|
43
44
|
updateFrame(camera: any): void;
|
|
44
45
|
bake(renderer: any): boolean;
|