@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.
Files changed (129) hide show
  1. package/NPM-LIBRARY.md +87 -27
  2. package/README.md +11 -10
  3. package/agents/PROMPTS.md +17 -3
  4. package/agents/README.md +13 -3
  5. package/agents/claude/CLAUDE.md +3 -0
  6. package/agents/codex/AGENTS.md +112 -159
  7. package/agents/cursor/toonlab.mdc +7 -3
  8. package/agents/examples/game-foundation.mjs +104 -0
  9. package/agents/references/game-lifecycle.md +57 -0
  10. package/agents/references/runtime-entry-points.md +26 -0
  11. package/agents/references/style-bundles.md +4 -1
  12. package/agents/skills/claude/asset-sourcing/SKILL.md +7 -4
  13. package/agents/skills/claude/environment/SKILL.md +4 -0
  14. package/agents/skills/claude/game-dev/SKILL.md +63 -87
  15. package/agents/skills/claude/lighting/SKILL.md +36 -0
  16. package/agents/skills/claude/post-processing/SKILL.md +8 -3
  17. package/agents/skills/claude/rock-ground-shaders/SKILL.md +10 -15
  18. package/agents/skills/claude/rockgen/SKILL.md +52 -21
  19. package/agents/skills/claude/scene-style-application/SKILL.md +4 -0
  20. package/agents/skills/claude/style-presets/SKILL.md +11 -8
  21. package/agents/skills/claude/toon-shading/SKILL.md +4 -0
  22. package/agents/skills/claude/vegetation-sky/SKILL.md +13 -7
  23. package/agents/skills/claude/visual-verification/SKILL.md +45 -119
  24. package/agents/skills/claude/water/SKILL.md +6 -2
  25. package/agents/skills/codex/asset-sourcing/SKILL.md +7 -4
  26. package/agents/skills/codex/environment/SKILL.md +4 -0
  27. package/agents/skills/codex/game-dev/SKILL.md +63 -87
  28. package/agents/skills/codex/lighting/SKILL.md +36 -0
  29. package/agents/skills/codex/post-processing/SKILL.md +8 -3
  30. package/agents/skills/codex/rock-ground-shaders/SKILL.md +10 -15
  31. package/agents/skills/codex/rockgen/SKILL.md +52 -21
  32. package/agents/skills/codex/scene-style-application/SKILL.md +4 -0
  33. package/agents/skills/codex/style-presets/SKILL.md +11 -8
  34. package/agents/skills/codex/toon-shading/SKILL.md +4 -0
  35. package/agents/skills/codex/vegetation-sky/SKILL.md +13 -7
  36. package/agents/skills/codex/visual-verification/SKILL.md +45 -119
  37. package/agents/skills/codex/water/SKILL.md +6 -2
  38. package/database/apply-one-catalog-seed.mjs +63 -0
  39. package/database/providers.mjs +1 -0
  40. package/database/seeds/catalog/0005_2026-08-c8-first12.sql +1101 -0
  41. package/database/seeds/catalog/0006_2026-09-c8-first100.sql +14245 -0
  42. package/database/seeds/catalog/0007_2026-09-c8-first100-primary-model.sql +14845 -0
  43. package/mcp/lab-management.mjs +11 -8
  44. package/mcp/public-catalog.mjs +0 -16
  45. package/mcp/tree-lab-contract.mjs +2381 -0
  46. package/mcp/vite-plugin.mjs +5 -1
  47. package/package.json +29 -18
  48. package/src/catalog/officialCatalog.js +1 -0
  49. package/src/catalog/officialCatalogAssetRuntime.js +98 -1
  50. package/src/catalog/officialCatalogLod.js +160 -16
  51. package/src/catalog/officialCatalogPlacement.js +52 -12
  52. package/src/catalog/officialCatalogProvider.js +79 -8
  53. package/src/catalog/officialCatalogRockPackage.js +172 -0
  54. package/src/cloud/cloudReprojection.js +40 -7
  55. package/src/cloud/cloudVolume.js +44 -7
  56. package/src/cloud/noise/baseShapeVolume.js +8 -6
  57. package/src/cloud/noise/cirrusMap.js +2 -1
  58. package/src/cloud/noise/curlNoise.js +2 -1
  59. package/src/cloud/noise/erosionVolume.js +2 -1
  60. package/src/cloud/noise/textureCache.js +77 -0
  61. package/src/cloud/noise/weatherMap.js +2 -1
  62. package/src/core/sha256.js +83 -0
  63. package/src/ground-shader/groundShaderMaterial.js +12 -3
  64. package/src/rock-shader/rockMaterial.js +205 -28
  65. package/src/rock-shader/rockShaderRuntime.js +17 -1
  66. package/src/rock-shader/rockShaderSettings.js +16 -0
  67. package/src/rockgen/index.js +9 -0
  68. package/src/rockgen/lod/index.js +1 -0
  69. package/src/rockgen/lod/rockDenseFieldPolicy.js +143 -0
  70. package/src/rockgen/rockDocument.js +899 -35
  71. package/src/rockgen/surface/c7GeologySurface.js +39 -9
  72. package/src/rockgen/surface/naturalRockSurface.js +1948 -0
  73. package/src/shaders-tsl/chunks/projected-water-caustics.js +14 -2
  74. package/src/shaders-tsl/chunks/water-foam.js +6 -6
  75. package/src/shaders-tsl/chunks/water-lighting.js +28 -5
  76. package/src/shaders-tsl/chunks/water-shore-state.js +5 -2
  77. package/src/shaders-tsl/chunks/water-waves.js +10 -5
  78. package/src/shaders-tsl/flower.js +7 -4
  79. package/src/shaders-tsl/grass.js +4 -3
  80. package/src/shaders-tsl/water-shore-state-simulation.js +3 -2
  81. package/src/shaders-tsl/water.js +209 -41
  82. package/src/sky/skySystem.js +30 -7
  83. package/src/toon/settings/perspectiveRemovalSettings.js +1 -1
  84. package/src/toon/toonSettings.js +74 -0
  85. package/src/vegetation/stylizedFlower.js +6 -0
  86. package/src/version.js +1 -1
  87. package/src/water/waterDetailSpectrum.js +91 -0
  88. package/src/water/waterDynamics.js +422 -0
  89. package/src/water/waterFoamParticles.js +196 -0
  90. package/src/water/waterFoamTexture.js +57 -0
  91. package/src/water/waterHydrodynamics.js +209 -0
  92. package/src/water/waterMaterial.js +1 -0
  93. package/src/water/waterRenderExtension.js +107 -0
  94. package/src/water/waterScenePasses.js +14 -6
  95. package/src/water/waterSettings.js +53 -26
  96. package/src/water/waterShoreMaterial.js +38 -14
  97. package/src/water/waterSpectralOcean.js +137 -0
  98. package/src/water/waterStageSettings.js +19 -1
  99. package/src/water/waterSurface.js +62 -18
  100. package/src/water/waterUnderwaterAtmosphere.js +30 -3
  101. package/types/catalog/officialCatalog.d.ts +1 -0
  102. package/types/catalog/officialCatalogPlacement.d.ts +4 -0
  103. package/types/catalog/officialCatalogRockPackage.d.ts +68 -0
  104. package/types/cloud/noise/baseShapeVolume.d.ts +1 -1
  105. package/types/cloud/noise/textureCache.d.ts +12 -0
  106. package/types/core/sha256.d.ts +2 -0
  107. package/types/index.d.ts +30 -0
  108. package/types/rock-shader/rockMaterial.d.ts +3 -0
  109. package/types/rock-shader/rockShaderSettings.d.ts +2 -0
  110. package/types/rockgen/index.d.ts +1 -0
  111. package/types/rockgen/lod/index.d.ts +1 -0
  112. package/types/rockgen/lod/rockDenseFieldPolicy.d.ts +181 -0
  113. package/types/rockgen/rockDocument.d.ts +654 -71
  114. package/types/rockgen/surface/naturalRockSurface.d.ts +100 -0
  115. package/types/shaders-tsl/chunks/projected-water-caustics.d.ts +7 -1
  116. package/types/shaders-tsl/chunks/water-lighting.d.ts +4 -3
  117. package/types/shaders-tsl/water.d.ts +2 -1
  118. package/types/version.d.ts +1 -1
  119. package/types/water/waterDetailSpectrum.d.ts +13 -0
  120. package/types/water/waterDynamics.d.ts +89 -0
  121. package/types/water/waterFoamParticles.d.ts +32 -0
  122. package/types/water/waterFoamTexture.d.ts +1 -0
  123. package/types/water/waterHydrodynamics.d.ts +49 -0
  124. package/types/water/waterRenderExtension.d.ts +16 -0
  125. package/types/water/waterScenePasses.d.ts +1 -1
  126. package/types/water/waterSettings.d.ts +1 -0
  127. package/types/water/waterSpectralOcean.d.ts +17 -0
  128. package/types/water/waterStageSettings.d.ts +1 -1
  129. package/types/water/waterUnderwaterAtmosphere.d.ts +19 -4
@@ -1,35 +1,186 @@
1
+ export function isRockSourceMeshReference(reference: any): boolean;
2
+ /** Deterministic browser-safe identity for the complete saved C8 control/high/semantic authority. */
3
+ export function createC8ReferenceAuthoritySourceId(reference: any): string;
4
+ /** Deterministic browser-safe identity for the exact live C8 control geometry. */
5
+ export function createC8ReferenceGeometrySourceId(reference: any): string;
6
+ /** Surface derivative identity, separate from geometry and explicit about the C7 recipe. */
7
+ export function createC8ReferenceSurfaceSourceId(reference: any): string;
1
8
  /**
2
9
  * Portable identity for a source-GLB project. Geometry stays outside the JSON
3
- * document; the document stores only the stable catalog id, deterministic
4
- * generation/deformation seed, and exact LOD contract needed to rebuild and
5
- * decode the first-party GLB source.
10
+ * document; the document stores either the stable catalog id or the exact C8
11
+ * control/high hashes, plus deterministic edit state needed to rebuild and
12
+ * decode the source GLB.
6
13
  */
7
14
  export function createRockReferenceIdentity(options?: any): {
8
- archetype: string;
9
- catalogVersion: number;
10
- family: string;
11
- id: string;
12
- lodRatios: any;
13
- lodTriangles: any;
14
- meshEdits: {
15
- deltas: any;
16
- meshIndex: number;
17
- }[];
15
+ variationSettings?: {
16
+ version: number;
17
+ scope: string;
18
+ anchorBase: boolean;
19
+ locks: {};
20
+ };
18
21
  role: string;
19
22
  series: string;
20
23
  sourceMode: string;
21
- surfacePackage: {
24
+ surfacePackage: any;
25
+ surfaceMode: string;
26
+ targetTriangles: number;
27
+ topFinish: any;
28
+ variation: number;
29
+ variationSeed: number;
30
+ authoritySourceId?: string;
31
+ customMeshSource?: {
32
+ authority: string;
33
+ control: {
34
+ boundsMetres: {
35
+ max: any[];
36
+ min: any[];
37
+ };
38
+ byteLength: number;
39
+ contentHash: any;
40
+ coordinateSystem: string;
41
+ dimensionsMetres: any[];
42
+ geometryAudit: {
43
+ topologyHash: any;
44
+ meshVertexCounts: any;
45
+ triangleCount: number;
46
+ vertexCount: number;
47
+ };
48
+ id: string;
49
+ metreUnitScale: number;
50
+ mimeType: string;
51
+ role: any;
52
+ sourceRevision: number;
53
+ topologyHash: any;
54
+ unit: string;
55
+ uri: string;
56
+ };
57
+ editEnvelope: {
58
+ maximumDisplacementMetres: number;
59
+ maximumVariationStrength: number;
60
+ mode: string;
61
+ };
62
+ highDetail: {
63
+ boundsMetres: {
64
+ max: any[];
65
+ min: any[];
66
+ };
67
+ byteLength: number;
68
+ contentHash: any;
69
+ coordinateSystem: string;
70
+ dimensionsMetres: any[];
71
+ geometryAudit: {
72
+ topologyHash: any;
73
+ meshVertexCounts: any;
74
+ triangleCount: number;
75
+ vertexCount: number;
76
+ };
77
+ id: string;
78
+ metreUnitScale: number;
79
+ mimeType: string;
80
+ role: any;
81
+ sourceRevision: number;
82
+ topologyHash: any;
83
+ unit: string;
84
+ uri: string;
85
+ };
86
+ schema: string;
87
+ semanticRegions: {
88
+ id: string;
89
+ label: string;
90
+ landmarkIds: any;
91
+ role: string;
92
+ selector: {
93
+ attribute: string;
94
+ kind: string;
95
+ value: number;
96
+ };
97
+ }[];
98
+ version: number;
99
+ };
100
+ derivedArtifactState?: {
101
+ surfaceReprojection: {
102
+ authoritySourceId: any;
103
+ contentHash: any;
104
+ geometrySourceId: any;
105
+ method: any;
106
+ sourceRevision: any;
107
+ status: string;
108
+ surfaceSourceId: any;
109
+ trueHighToLowBake: boolean;
110
+ reason?: undefined;
111
+ } | {
112
+ authoritySourceId: any;
113
+ contentHash: any;
114
+ geometrySourceId: any;
115
+ reason: string;
116
+ sourceRevision: any;
117
+ status: string;
118
+ surfaceSourceId: any;
119
+ trueHighToLowBake: boolean;
120
+ method?: undefined;
121
+ };
122
+ };
123
+ geology?: string;
124
+ geometrySourceId?: string;
125
+ identityLandmarks?: {
126
+ id: string;
127
+ positionMetres: any[];
128
+ role: string;
129
+ }[];
130
+ label?: string;
131
+ sourceRevision?: number;
132
+ surfaceSourceId?: string;
133
+ surfaceReprojection?: {
134
+ reprojectionContentId: string;
135
+ authoritySourceId: any;
136
+ controlContentHash: any;
137
+ dimensionsMetres: any[];
138
+ editOperationCount: any;
22
139
  geology: string;
140
+ geometrySourceId: any;
23
141
  mapResolution: number;
142
+ method: string;
143
+ projection: Readonly<{
144
+ characteristicMetres: number;
145
+ dimensionsMetres: readonly number[];
146
+ mode: "world-metre-triplanar-isotropic";
147
+ nearDetailScaleMetres: number;
148
+ scaleMetres: number;
149
+ axisScale: readonly number[];
150
+ tileSpan: readonly number[];
151
+ }>;
24
152
  schema: string;
25
153
  seed: number;
154
+ sourceContentId: any;
155
+ sourceId: any;
156
+ sourceRevision: any;
157
+ surfaceSourceId: any;
158
+ trueHighToLowBake: boolean;
26
159
  version: number;
27
160
  };
28
- surfaceMode: string;
29
- targetTriangles: number;
30
- topFinish: any;
31
- variation: number;
32
- variationSeed: number;
161
+ thumbnailUrl?: string;
162
+ archetype: string;
163
+ catalogVersion: number;
164
+ family: string;
165
+ id: string;
166
+ lodRatios: any;
167
+ lodTriangles: any;
168
+ meshCuts: {
169
+ depth: number;
170
+ meshIndex: number;
171
+ normal: any;
172
+ point: any;
173
+ radius: number;
174
+ roughness: number;
175
+ seed: number;
176
+ through: boolean;
177
+ }[];
178
+ meshEdits: {
179
+ deltas: any;
180
+ meshIndex: any;
181
+ }[];
182
+ meshOperationOrder: any[];
183
+ meshSnapshots: any[];
33
184
  };
34
185
  /**
35
186
  * Creates one rock piece. Accepts a registered piece-preset name, or a
@@ -79,31 +230,175 @@ export function createRockDocument(options?: any): {
79
230
  pieces: any[];
80
231
  preset: string;
81
232
  reference: {
82
- archetype: string;
83
- catalogVersion: number;
84
- family: string;
85
- id: string;
86
- lodRatios: any;
87
- lodTriangles: any;
88
- meshEdits: {
89
- deltas: any;
90
- meshIndex: number;
91
- }[];
233
+ variationSettings?: {
234
+ version: number;
235
+ scope: string;
236
+ anchorBase: boolean;
237
+ locks: {};
238
+ };
92
239
  role: string;
93
240
  series: string;
94
241
  sourceMode: string;
95
- surfacePackage: {
242
+ surfacePackage: any;
243
+ surfaceMode: string;
244
+ targetTriangles: number;
245
+ topFinish: any;
246
+ variation: number;
247
+ variationSeed: number;
248
+ authoritySourceId?: string;
249
+ customMeshSource?: {
250
+ authority: string;
251
+ control: {
252
+ boundsMetres: {
253
+ max: any[];
254
+ min: any[];
255
+ };
256
+ byteLength: number;
257
+ contentHash: any;
258
+ coordinateSystem: string;
259
+ dimensionsMetres: any[];
260
+ geometryAudit: {
261
+ topologyHash: any;
262
+ meshVertexCounts: any;
263
+ triangleCount: number;
264
+ vertexCount: number;
265
+ };
266
+ id: string;
267
+ metreUnitScale: number;
268
+ mimeType: string;
269
+ role: any;
270
+ sourceRevision: number;
271
+ topologyHash: any;
272
+ unit: string;
273
+ uri: string;
274
+ };
275
+ editEnvelope: {
276
+ maximumDisplacementMetres: number;
277
+ maximumVariationStrength: number;
278
+ mode: string;
279
+ };
280
+ highDetail: {
281
+ boundsMetres: {
282
+ max: any[];
283
+ min: any[];
284
+ };
285
+ byteLength: number;
286
+ contentHash: any;
287
+ coordinateSystem: string;
288
+ dimensionsMetres: any[];
289
+ geometryAudit: {
290
+ topologyHash: any;
291
+ meshVertexCounts: any;
292
+ triangleCount: number;
293
+ vertexCount: number;
294
+ };
295
+ id: string;
296
+ metreUnitScale: number;
297
+ mimeType: string;
298
+ role: any;
299
+ sourceRevision: number;
300
+ topologyHash: any;
301
+ unit: string;
302
+ uri: string;
303
+ };
304
+ schema: string;
305
+ semanticRegions: {
306
+ id: string;
307
+ label: string;
308
+ landmarkIds: any;
309
+ role: string;
310
+ selector: {
311
+ attribute: string;
312
+ kind: string;
313
+ value: number;
314
+ };
315
+ }[];
316
+ version: number;
317
+ };
318
+ derivedArtifactState?: {
319
+ surfaceReprojection: {
320
+ authoritySourceId: any;
321
+ contentHash: any;
322
+ geometrySourceId: any;
323
+ method: any;
324
+ sourceRevision: any;
325
+ status: string;
326
+ surfaceSourceId: any;
327
+ trueHighToLowBake: boolean;
328
+ reason?: undefined;
329
+ } | {
330
+ authoritySourceId: any;
331
+ contentHash: any;
332
+ geometrySourceId: any;
333
+ reason: string;
334
+ sourceRevision: any;
335
+ status: string;
336
+ surfaceSourceId: any;
337
+ trueHighToLowBake: boolean;
338
+ method?: undefined;
339
+ };
340
+ };
341
+ geology?: string;
342
+ geometrySourceId?: string;
343
+ identityLandmarks?: {
344
+ id: string;
345
+ positionMetres: any[];
346
+ role: string;
347
+ }[];
348
+ label?: string;
349
+ sourceRevision?: number;
350
+ surfaceSourceId?: string;
351
+ surfaceReprojection?: {
352
+ reprojectionContentId: string;
353
+ authoritySourceId: any;
354
+ controlContentHash: any;
355
+ dimensionsMetres: any[];
356
+ editOperationCount: any;
96
357
  geology: string;
358
+ geometrySourceId: any;
97
359
  mapResolution: number;
360
+ method: string;
361
+ projection: Readonly<{
362
+ characteristicMetres: number;
363
+ dimensionsMetres: readonly number[];
364
+ mode: "world-metre-triplanar-isotropic";
365
+ nearDetailScaleMetres: number;
366
+ scaleMetres: number;
367
+ axisScale: readonly number[];
368
+ tileSpan: readonly number[];
369
+ }>;
98
370
  schema: string;
99
371
  seed: number;
372
+ sourceContentId: any;
373
+ sourceId: any;
374
+ sourceRevision: any;
375
+ surfaceSourceId: any;
376
+ trueHighToLowBake: boolean;
100
377
  version: number;
101
378
  };
102
- surfaceMode: string;
103
- targetTriangles: number;
104
- topFinish: any;
105
- variation: number;
106
- variationSeed: number;
379
+ thumbnailUrl?: string;
380
+ archetype: string;
381
+ catalogVersion: number;
382
+ family: string;
383
+ id: string;
384
+ lodRatios: any;
385
+ lodTriangles: any;
386
+ meshCuts: {
387
+ depth: number;
388
+ meshIndex: number;
389
+ normal: any;
390
+ point: any;
391
+ radius: number;
392
+ roughness: number;
393
+ seed: number;
394
+ through: boolean;
395
+ }[];
396
+ meshEdits: {
397
+ deltas: any;
398
+ meshIndex: any;
399
+ }[];
400
+ meshOperationOrder: any[];
401
+ meshSnapshots: any[];
107
402
  };
108
403
  revision: number;
109
404
  schemaVersion: number;
@@ -124,31 +419,175 @@ export function rebaseRockDocumentStyle(document: any, style?: string): {
124
419
  pieces: any[];
125
420
  preset: string;
126
421
  reference: {
127
- archetype: string;
128
- catalogVersion: number;
129
- family: string;
130
- id: string;
131
- lodRatios: any;
132
- lodTriangles: any;
133
- meshEdits: {
134
- deltas: any;
135
- meshIndex: number;
136
- }[];
422
+ variationSettings?: {
423
+ version: number;
424
+ scope: string;
425
+ anchorBase: boolean;
426
+ locks: {};
427
+ };
137
428
  role: string;
138
429
  series: string;
139
430
  sourceMode: string;
140
- surfacePackage: {
431
+ surfacePackage: any;
432
+ surfaceMode: string;
433
+ targetTriangles: number;
434
+ topFinish: any;
435
+ variation: number;
436
+ variationSeed: number;
437
+ authoritySourceId?: string;
438
+ customMeshSource?: {
439
+ authority: string;
440
+ control: {
441
+ boundsMetres: {
442
+ max: any[];
443
+ min: any[];
444
+ };
445
+ byteLength: number;
446
+ contentHash: any;
447
+ coordinateSystem: string;
448
+ dimensionsMetres: any[];
449
+ geometryAudit: {
450
+ topologyHash: any;
451
+ meshVertexCounts: any;
452
+ triangleCount: number;
453
+ vertexCount: number;
454
+ };
455
+ id: string;
456
+ metreUnitScale: number;
457
+ mimeType: string;
458
+ role: any;
459
+ sourceRevision: number;
460
+ topologyHash: any;
461
+ unit: string;
462
+ uri: string;
463
+ };
464
+ editEnvelope: {
465
+ maximumDisplacementMetres: number;
466
+ maximumVariationStrength: number;
467
+ mode: string;
468
+ };
469
+ highDetail: {
470
+ boundsMetres: {
471
+ max: any[];
472
+ min: any[];
473
+ };
474
+ byteLength: number;
475
+ contentHash: any;
476
+ coordinateSystem: string;
477
+ dimensionsMetres: any[];
478
+ geometryAudit: {
479
+ topologyHash: any;
480
+ meshVertexCounts: any;
481
+ triangleCount: number;
482
+ vertexCount: number;
483
+ };
484
+ id: string;
485
+ metreUnitScale: number;
486
+ mimeType: string;
487
+ role: any;
488
+ sourceRevision: number;
489
+ topologyHash: any;
490
+ unit: string;
491
+ uri: string;
492
+ };
493
+ schema: string;
494
+ semanticRegions: {
495
+ id: string;
496
+ label: string;
497
+ landmarkIds: any;
498
+ role: string;
499
+ selector: {
500
+ attribute: string;
501
+ kind: string;
502
+ value: number;
503
+ };
504
+ }[];
505
+ version: number;
506
+ };
507
+ derivedArtifactState?: {
508
+ surfaceReprojection: {
509
+ authoritySourceId: any;
510
+ contentHash: any;
511
+ geometrySourceId: any;
512
+ method: any;
513
+ sourceRevision: any;
514
+ status: string;
515
+ surfaceSourceId: any;
516
+ trueHighToLowBake: boolean;
517
+ reason?: undefined;
518
+ } | {
519
+ authoritySourceId: any;
520
+ contentHash: any;
521
+ geometrySourceId: any;
522
+ reason: string;
523
+ sourceRevision: any;
524
+ status: string;
525
+ surfaceSourceId: any;
526
+ trueHighToLowBake: boolean;
527
+ method?: undefined;
528
+ };
529
+ };
530
+ geology?: string;
531
+ geometrySourceId?: string;
532
+ identityLandmarks?: {
533
+ id: string;
534
+ positionMetres: any[];
535
+ role: string;
536
+ }[];
537
+ label?: string;
538
+ sourceRevision?: number;
539
+ surfaceSourceId?: string;
540
+ surfaceReprojection?: {
541
+ reprojectionContentId: string;
542
+ authoritySourceId: any;
543
+ controlContentHash: any;
544
+ dimensionsMetres: any[];
545
+ editOperationCount: any;
141
546
  geology: string;
547
+ geometrySourceId: any;
142
548
  mapResolution: number;
549
+ method: string;
550
+ projection: Readonly<{
551
+ characteristicMetres: number;
552
+ dimensionsMetres: readonly number[];
553
+ mode: "world-metre-triplanar-isotropic";
554
+ nearDetailScaleMetres: number;
555
+ scaleMetres: number;
556
+ axisScale: readonly number[];
557
+ tileSpan: readonly number[];
558
+ }>;
143
559
  schema: string;
144
560
  seed: number;
561
+ sourceContentId: any;
562
+ sourceId: any;
563
+ sourceRevision: any;
564
+ surfaceSourceId: any;
565
+ trueHighToLowBake: boolean;
145
566
  version: number;
146
567
  };
147
- surfaceMode: string;
148
- targetTriangles: number;
149
- topFinish: any;
150
- variation: number;
151
- variationSeed: number;
568
+ thumbnailUrl?: string;
569
+ archetype: string;
570
+ catalogVersion: number;
571
+ family: string;
572
+ id: string;
573
+ lodRatios: any;
574
+ lodTriangles: any;
575
+ meshCuts: {
576
+ depth: number;
577
+ meshIndex: number;
578
+ normal: any;
579
+ point: any;
580
+ radius: number;
581
+ roughness: number;
582
+ seed: number;
583
+ through: boolean;
584
+ }[];
585
+ meshEdits: {
586
+ deltas: any;
587
+ meshIndex: any;
588
+ }[];
589
+ meshOperationOrder: any[];
590
+ meshSnapshots: any[];
152
591
  };
153
592
  revision: number;
154
593
  schemaVersion: number;
@@ -197,31 +636,175 @@ export function deserializeRockDocument(jsonOrObject: any): {
197
636
  pieces: any[];
198
637
  preset: string;
199
638
  reference: {
200
- archetype: string;
201
- catalogVersion: number;
202
- family: string;
203
- id: string;
204
- lodRatios: any;
205
- lodTriangles: any;
206
- meshEdits: {
207
- deltas: any;
208
- meshIndex: number;
209
- }[];
639
+ variationSettings?: {
640
+ version: number;
641
+ scope: string;
642
+ anchorBase: boolean;
643
+ locks: {};
644
+ };
210
645
  role: string;
211
646
  series: string;
212
647
  sourceMode: string;
213
- surfacePackage: {
648
+ surfacePackage: any;
649
+ surfaceMode: string;
650
+ targetTriangles: number;
651
+ topFinish: any;
652
+ variation: number;
653
+ variationSeed: number;
654
+ authoritySourceId?: string;
655
+ customMeshSource?: {
656
+ authority: string;
657
+ control: {
658
+ boundsMetres: {
659
+ max: any[];
660
+ min: any[];
661
+ };
662
+ byteLength: number;
663
+ contentHash: any;
664
+ coordinateSystem: string;
665
+ dimensionsMetres: any[];
666
+ geometryAudit: {
667
+ topologyHash: any;
668
+ meshVertexCounts: any;
669
+ triangleCount: number;
670
+ vertexCount: number;
671
+ };
672
+ id: string;
673
+ metreUnitScale: number;
674
+ mimeType: string;
675
+ role: any;
676
+ sourceRevision: number;
677
+ topologyHash: any;
678
+ unit: string;
679
+ uri: string;
680
+ };
681
+ editEnvelope: {
682
+ maximumDisplacementMetres: number;
683
+ maximumVariationStrength: number;
684
+ mode: string;
685
+ };
686
+ highDetail: {
687
+ boundsMetres: {
688
+ max: any[];
689
+ min: any[];
690
+ };
691
+ byteLength: number;
692
+ contentHash: any;
693
+ coordinateSystem: string;
694
+ dimensionsMetres: any[];
695
+ geometryAudit: {
696
+ topologyHash: any;
697
+ meshVertexCounts: any;
698
+ triangleCount: number;
699
+ vertexCount: number;
700
+ };
701
+ id: string;
702
+ metreUnitScale: number;
703
+ mimeType: string;
704
+ role: any;
705
+ sourceRevision: number;
706
+ topologyHash: any;
707
+ unit: string;
708
+ uri: string;
709
+ };
710
+ schema: string;
711
+ semanticRegions: {
712
+ id: string;
713
+ label: string;
714
+ landmarkIds: any;
715
+ role: string;
716
+ selector: {
717
+ attribute: string;
718
+ kind: string;
719
+ value: number;
720
+ };
721
+ }[];
722
+ version: number;
723
+ };
724
+ derivedArtifactState?: {
725
+ surfaceReprojection: {
726
+ authoritySourceId: any;
727
+ contentHash: any;
728
+ geometrySourceId: any;
729
+ method: any;
730
+ sourceRevision: any;
731
+ status: string;
732
+ surfaceSourceId: any;
733
+ trueHighToLowBake: boolean;
734
+ reason?: undefined;
735
+ } | {
736
+ authoritySourceId: any;
737
+ contentHash: any;
738
+ geometrySourceId: any;
739
+ reason: string;
740
+ sourceRevision: any;
741
+ status: string;
742
+ surfaceSourceId: any;
743
+ trueHighToLowBake: boolean;
744
+ method?: undefined;
745
+ };
746
+ };
747
+ geology?: string;
748
+ geometrySourceId?: string;
749
+ identityLandmarks?: {
750
+ id: string;
751
+ positionMetres: any[];
752
+ role: string;
753
+ }[];
754
+ label?: string;
755
+ sourceRevision?: number;
756
+ surfaceSourceId?: string;
757
+ surfaceReprojection?: {
758
+ reprojectionContentId: string;
759
+ authoritySourceId: any;
760
+ controlContentHash: any;
761
+ dimensionsMetres: any[];
762
+ editOperationCount: any;
214
763
  geology: string;
764
+ geometrySourceId: any;
215
765
  mapResolution: number;
766
+ method: string;
767
+ projection: Readonly<{
768
+ characteristicMetres: number;
769
+ dimensionsMetres: readonly number[];
770
+ mode: "world-metre-triplanar-isotropic";
771
+ nearDetailScaleMetres: number;
772
+ scaleMetres: number;
773
+ axisScale: readonly number[];
774
+ tileSpan: readonly number[];
775
+ }>;
216
776
  schema: string;
217
777
  seed: number;
778
+ sourceContentId: any;
779
+ sourceId: any;
780
+ sourceRevision: any;
781
+ surfaceSourceId: any;
782
+ trueHighToLowBake: boolean;
218
783
  version: number;
219
784
  };
220
- surfaceMode: string;
221
- targetTriangles: number;
222
- topFinish: any;
223
- variation: number;
224
- variationSeed: number;
785
+ thumbnailUrl?: string;
786
+ archetype: string;
787
+ catalogVersion: number;
788
+ family: string;
789
+ id: string;
790
+ lodRatios: any;
791
+ lodTriangles: any;
792
+ meshCuts: {
793
+ depth: number;
794
+ meshIndex: number;
795
+ normal: any;
796
+ point: any;
797
+ radius: number;
798
+ roughness: number;
799
+ seed: number;
800
+ through: boolean;
801
+ }[];
802
+ meshEdits: {
803
+ deltas: any;
804
+ meshIndex: any;
805
+ }[];
806
+ meshOperationOrder: any[];
807
+ meshSnapshots: any[];
225
808
  };
226
809
  revision: number;
227
810
  schemaVersion: number;
@@ -234,10 +817,10 @@ export function deserializeRockDocument(jsonOrObject: any): {
234
817
  /** Document type tag stamped on saved rockgen project JSON. */
235
818
  export const ROCKGEN_PROJECT_DOCUMENT_TYPE: "toonlab/rockgen-project";
236
819
  /** Current schema version for rockgen project documents. */
237
- export const ROCKGEN_PROJECT_SCHEMA_VERSION: 6;
238
- /** Sparse source-mesh edits are packed into the portable document so normal
239
- * sculpting remains below the hosted creation-document limit. Runtime state
240
- * is still the convenient array form consumed by the editor and compiler. */
820
+ export const ROCKGEN_PROJECT_SCHEMA_VERSION: 9;
821
+ /** Legacy MCP request budgets. The interactive Rock Lab editor no longer uses
822
+ * these as sculpt, drill, persistence, or replay ceilings. */
241
823
  export const ROCKGEN_MAX_MESH_EDIT_OPERATIONS: 200;
242
824
  export const ROCKGEN_MAX_MESH_EDIT_DELTAS: 10000;
825
+ export const ROCKGEN_MAX_MESH_CUT_OPERATIONS: 64;
243
826
  export const ROCKGEN_MESH_EDIT_ENCODING: "base64-f32le-v1";