@bendyline/molen-tooling 0.0.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/LICENSE +21 -0
- package/NOTICE.md +15 -0
- package/README.md +91 -0
- package/dist/capture/THIRD-PARTY-NOTICES.md +223 -0
- package/dist/capture/basis/LICENSE.txt +55 -0
- package/dist/capture/basis/basis_transcoder.js +19 -0
- package/dist/capture/basis/basis_transcoder.wasm +0 -0
- package/dist/capture/capture.html +15 -0
- package/dist/capture/harness.js +4671 -0
- package/dist/capture/worldgen-preview.html +15 -0
- package/dist/capture/worldgen-preview.js +4617 -0
- package/dist/cli.d.mts +1 -0
- package/dist/cli.mjs +1276 -0
- package/dist/docs-src/guide/3d-art-guidelines.md +157 -0
- package/dist/docs-src/guide/3d-model-assets.md +286 -0
- package/dist/docs-src/guide/adaptive-performance.md +89 -0
- package/dist/docs-src/guide/agent-loop.md +156 -0
- package/dist/docs-src/guide/aircraft.md +225 -0
- package/dist/docs-src/guide/browser-mount.md +185 -0
- package/dist/docs-src/guide/building-interiors.md +175 -0
- package/dist/docs-src/guide/capability-authoring.md +69 -0
- package/dist/docs-src/guide/determinism.md +285 -0
- package/dist/docs-src/guide/entities.md +47 -0
- package/dist/docs-src/guide/examples.md +58 -0
- package/dist/docs-src/guide/experience-playback.md +57 -0
- package/dist/docs-src/guide/figures.md +164 -0
- package/dist/docs-src/guide/game-samples.md +100 -0
- package/dist/docs-src/guide/graphics-performance.md +167 -0
- package/dist/docs-src/guide/input.md +205 -0
- package/dist/docs-src/guide/materials.md +125 -0
- package/dist/docs-src/guide/project.md +157 -0
- package/dist/docs-src/guide/quickstart.md +63 -0
- package/dist/docs-src/guide/recognizable-places.md +158 -0
- package/dist/docs-src/guide/rendering-backends.md +231 -0
- package/dist/docs-src/guide/scripting.md +330 -0
- package/dist/docs-src/guide/sky.md +192 -0
- package/dist/docs-src/guide/source-bundles.md +42 -0
- package/dist/docs-src/guide/structure-library.md +114 -0
- package/dist/docs-src/guide/surface-rendering.md +203 -0
- package/dist/docs-src/guide/terrain.md +389 -0
- package/dist/docs-src/guide/three-surface.md +70 -0
- package/dist/docs-src/guide/vehicle-interiors.md +126 -0
- package/dist/docs-src/guide/vehicles.md +110 -0
- package/dist/docs-src/guide/weather.md +123 -0
- package/dist/docs-src/guide/worldgen.md +434 -0
- package/dist/docs-src/llms.txt +129 -0
- package/dist/docs-src/schemas/README.md +36 -0
- package/dist/docs-src/schemas/archstyle.md +2340 -0
- package/dist/docs-src/schemas/assert.md +169 -0
- package/dist/docs-src/schemas/asset.md +543 -0
- package/dist/docs-src/schemas/business-catalog.md +162 -0
- package/dist/docs-src/schemas/cameratrack.md +132 -0
- package/dist/docs-src/schemas/command.md +112 -0
- package/dist/docs-src/schemas/components.md +5826 -0
- package/dist/docs-src/schemas/delta.md +204 -0
- package/dist/docs-src/schemas/experience-play.md +452 -0
- package/dist/docs-src/schemas/figure.md +290 -0
- package/dist/docs-src/schemas/interior-catalog.md +230 -0
- package/dist/docs-src/schemas/keyframe.md +314 -0
- package/dist/docs-src/schemas/landmark-catalog.md +56 -0
- package/dist/docs-src/schemas/landmark.md +293 -0
- package/dist/docs-src/schemas/matgraph.md +1163 -0
- package/dist/docs-src/schemas/pack-index.md +82 -0
- package/dist/docs-src/schemas/pack-source.md +139 -0
- package/dist/docs-src/schemas/pack.md +225 -0
- package/dist/docs-src/schemas/pixelgrid.md +108 -0
- package/dist/docs-src/schemas/prefab.md +106 -0
- package/dist/docs-src/schemas/project.md +271 -0
- package/dist/docs-src/schemas/region-atlas.md +612 -0
- package/dist/docs-src/schemas/replay.md +807 -0
- package/dist/docs-src/schemas/scatter.md +541 -0
- package/dist/docs-src/schemas/scene.md +1152 -0
- package/dist/docs-src/schemas/source-bundle.md +266 -0
- package/dist/docs-src/schemas/stylepack.md +420 -0
- package/dist/docs-src/schemas/terrain-package.md +731 -0
- package/dist/docs-src/schemas/terrain.md +313 -0
- package/dist/docs-src/schemas/types.md +218 -0
- package/dist/docs-src/schemas/uvpaint.md +149 -0
- package/dist/docs-src/schemas/worldgen-batch.md +743 -0
- package/dist/index.d.mts +1271 -0
- package/dist/index.mjs +78 -0
- package/dist/mcp-BFnCWrg0.mjs +796 -0
- package/dist/ops-BGxhSP6w.mjs +7246 -0
- package/package.json +96 -0
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
# Terrain descriptor (`molen/terrain@2`)
|
|
2
|
+
|
|
3
|
+
Streamed heightmap terrain: tiles, chunk grid, height range, layers, LOD, and residency budgets.
|
|
4
|
+
|
|
5
|
+
## Example
|
|
6
|
+
|
|
7
|
+
```json
|
|
8
|
+
{
|
|
9
|
+
"format": "molen/terrain@2",
|
|
10
|
+
"name": "island",
|
|
11
|
+
"chunkSize": 128,
|
|
12
|
+
"tileResolution": 129,
|
|
13
|
+
"gridSize": [
|
|
14
|
+
4,
|
|
15
|
+
4
|
|
16
|
+
],
|
|
17
|
+
"height": {
|
|
18
|
+
"min": 0,
|
|
19
|
+
"max": 200
|
|
20
|
+
},
|
|
21
|
+
"tiles": {
|
|
22
|
+
"heightUrl": "tiles/h_{x}_{z}.png"
|
|
23
|
+
},
|
|
24
|
+
"layers": [
|
|
25
|
+
{
|
|
26
|
+
"name": "grass",
|
|
27
|
+
"tiling": 8
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"name": "rock",
|
|
31
|
+
"tiling": 6,
|
|
32
|
+
"auto": {
|
|
33
|
+
"slopeMin": 0.6
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"name": "snow",
|
|
38
|
+
"tiling": 4,
|
|
39
|
+
"auto": {
|
|
40
|
+
"heightMin": 150
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## JSON Schema
|
|
48
|
+
|
|
49
|
+
```json
|
|
50
|
+
{
|
|
51
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
52
|
+
"type": "object",
|
|
53
|
+
"properties": {
|
|
54
|
+
"name": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"minLength": 1,
|
|
57
|
+
"description": "Terrain name."
|
|
58
|
+
},
|
|
59
|
+
"origin": {
|
|
60
|
+
"default": [
|
|
61
|
+
0,
|
|
62
|
+
0
|
|
63
|
+
],
|
|
64
|
+
"minItems": 2,
|
|
65
|
+
"maxItems": 2,
|
|
66
|
+
"type": "array",
|
|
67
|
+
"items": {
|
|
68
|
+
"type": "number"
|
|
69
|
+
},
|
|
70
|
+
"description": "World [x, z] in meters of the corner of chunk (0, 0); default [0, 0]."
|
|
71
|
+
},
|
|
72
|
+
"chunkSize": {
|
|
73
|
+
"default": 128,
|
|
74
|
+
"type": "number",
|
|
75
|
+
"exclusiveMinimum": 0,
|
|
76
|
+
"description": "Chunk edge length in meters (default 128)."
|
|
77
|
+
},
|
|
78
|
+
"tileResolution": {
|
|
79
|
+
"default": 129,
|
|
80
|
+
"type": "integer",
|
|
81
|
+
"minimum": 2,
|
|
82
|
+
"maximum": 1025,
|
|
83
|
+
"description": "Height samples per chunk edge, borders shared with neighbors (default 129)."
|
|
84
|
+
},
|
|
85
|
+
"gridSize": {
|
|
86
|
+
"default": [
|
|
87
|
+
1,
|
|
88
|
+
1
|
|
89
|
+
],
|
|
90
|
+
"minItems": 2,
|
|
91
|
+
"maxItems": 2,
|
|
92
|
+
"type": "array",
|
|
93
|
+
"items": {
|
|
94
|
+
"type": "integer",
|
|
95
|
+
"exclusiveMinimum": 0,
|
|
96
|
+
"maximum": 9007199254740991
|
|
97
|
+
},
|
|
98
|
+
"description": "Number of chunks along [x, z]; default [1, 1]."
|
|
99
|
+
},
|
|
100
|
+
"height": {
|
|
101
|
+
"type": "object",
|
|
102
|
+
"properties": {
|
|
103
|
+
"min": {
|
|
104
|
+
"type": "number",
|
|
105
|
+
"description": "Height in meters encoded by sample value 0."
|
|
106
|
+
},
|
|
107
|
+
"max": {
|
|
108
|
+
"type": "number",
|
|
109
|
+
"description": "Height in meters encoded by the maximum sample value."
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"required": [
|
|
113
|
+
"min",
|
|
114
|
+
"max"
|
|
115
|
+
],
|
|
116
|
+
"additionalProperties": false,
|
|
117
|
+
"description": "Height range in meters the PNG16 samples map onto."
|
|
118
|
+
},
|
|
119
|
+
"tiles": {
|
|
120
|
+
"type": "object",
|
|
121
|
+
"properties": {
|
|
122
|
+
"heightUrl": {
|
|
123
|
+
"type": "string",
|
|
124
|
+
"minLength": 1,
|
|
125
|
+
"description": "PNG16 height tile URL template with {x}/{z} chunk placeholders, e.g. 'tiles/h_{x}_{z}.png'; relative to the descriptor."
|
|
126
|
+
},
|
|
127
|
+
"splatUrl": {
|
|
128
|
+
"type": "string",
|
|
129
|
+
"minLength": 1,
|
|
130
|
+
"description": "Optional splat-weight tile URL template with {x}/{z} placeholders."
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"required": [
|
|
134
|
+
"heightUrl"
|
|
135
|
+
],
|
|
136
|
+
"additionalProperties": false,
|
|
137
|
+
"description": "Tile sources."
|
|
138
|
+
},
|
|
139
|
+
"layers": {
|
|
140
|
+
"default": [],
|
|
141
|
+
"type": "array",
|
|
142
|
+
"items": {
|
|
143
|
+
"type": "object",
|
|
144
|
+
"properties": {
|
|
145
|
+
"name": {
|
|
146
|
+
"type": "string",
|
|
147
|
+
"minLength": 1,
|
|
148
|
+
"description": "Layer name, e.g. 'grass' or 'rock'."
|
|
149
|
+
},
|
|
150
|
+
"materialRef": {
|
|
151
|
+
"type": "string",
|
|
152
|
+
"minLength": 1,
|
|
153
|
+
"description": "Material reference for the layer surface (project material doc id)."
|
|
154
|
+
},
|
|
155
|
+
"color": {
|
|
156
|
+
"type": "string",
|
|
157
|
+
"pattern": "^#[0-9a-fA-F]{6}$",
|
|
158
|
+
"description": "Flat '#rrggbb' color used for vertex-color splat banding (v1 shading)."
|
|
159
|
+
},
|
|
160
|
+
"tiling": {
|
|
161
|
+
"default": 8,
|
|
162
|
+
"type": "number",
|
|
163
|
+
"exclusiveMinimum": 0,
|
|
164
|
+
"description": "Texture repeats per chunk edge for the layer material (default 8)."
|
|
165
|
+
},
|
|
166
|
+
"auto": {
|
|
167
|
+
"type": "object",
|
|
168
|
+
"properties": {
|
|
169
|
+
"heightMin": {
|
|
170
|
+
"type": "number",
|
|
171
|
+
"description": "Lowest height in meters at which the layer applies."
|
|
172
|
+
},
|
|
173
|
+
"heightMax": {
|
|
174
|
+
"type": "number",
|
|
175
|
+
"description": "Highest height in meters at which the layer applies."
|
|
176
|
+
},
|
|
177
|
+
"slopeMin": {
|
|
178
|
+
"type": "number",
|
|
179
|
+
"description": "Minimum slope 0..1 (0 = flat, 1 = vertical) at which the layer applies."
|
|
180
|
+
},
|
|
181
|
+
"slopeMax": {
|
|
182
|
+
"type": "number",
|
|
183
|
+
"description": "Maximum slope 0..1 (0 = flat, 1 = vertical) at which the layer applies."
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
"additionalProperties": false,
|
|
187
|
+
"description": "Automatic height/slope banding that selects where the layer paints."
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
"required": [
|
|
191
|
+
"name"
|
|
192
|
+
],
|
|
193
|
+
"additionalProperties": false
|
|
194
|
+
},
|
|
195
|
+
"description": "Surface layers painted by splat weights or auto banding, in order."
|
|
196
|
+
},
|
|
197
|
+
"lod": {
|
|
198
|
+
"default": {
|
|
199
|
+
"levels": 4,
|
|
200
|
+
"distanceBands": [
|
|
201
|
+
256,
|
|
202
|
+
512,
|
|
203
|
+
1024,
|
|
204
|
+
2048
|
|
205
|
+
],
|
|
206
|
+
"skirts": true
|
|
207
|
+
},
|
|
208
|
+
"type": "object",
|
|
209
|
+
"properties": {
|
|
210
|
+
"levels": {
|
|
211
|
+
"default": 4,
|
|
212
|
+
"type": "integer",
|
|
213
|
+
"minimum": 1,
|
|
214
|
+
"maximum": 6,
|
|
215
|
+
"description": "Number of LOD levels (each halves the sample density; default 4)."
|
|
216
|
+
},
|
|
217
|
+
"distanceBands": {
|
|
218
|
+
"default": [
|
|
219
|
+
256,
|
|
220
|
+
512,
|
|
221
|
+
1024,
|
|
222
|
+
2048
|
|
223
|
+
],
|
|
224
|
+
"type": "array",
|
|
225
|
+
"items": {
|
|
226
|
+
"type": "number",
|
|
227
|
+
"exclusiveMinimum": 0
|
|
228
|
+
},
|
|
229
|
+
"description": "Camera distances in meters (strictly increasing) beyond which each coarser LOD level applies."
|
|
230
|
+
},
|
|
231
|
+
"skirts": {
|
|
232
|
+
"default": true,
|
|
233
|
+
"type": "boolean",
|
|
234
|
+
"description": "Add vertical skirts along chunk edges to hide LOD cracks (default true)."
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
"additionalProperties": false,
|
|
238
|
+
"description": "Level-of-detail settings."
|
|
239
|
+
},
|
|
240
|
+
"collision": {
|
|
241
|
+
"default": {
|
|
242
|
+
"enabled": false
|
|
243
|
+
},
|
|
244
|
+
"type": "object",
|
|
245
|
+
"properties": {
|
|
246
|
+
"enabled": {
|
|
247
|
+
"default": false,
|
|
248
|
+
"type": "boolean",
|
|
249
|
+
"description": "Register the heightfield as the scene's ground/collision (default false)."
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
"additionalProperties": false,
|
|
253
|
+
"description": "Headless ground/collision settings."
|
|
254
|
+
},
|
|
255
|
+
"format": {
|
|
256
|
+
"type": "string",
|
|
257
|
+
"const": "molen/terrain@2",
|
|
258
|
+
"description": "Format envelope; always 'molen/terrain@2'."
|
|
259
|
+
},
|
|
260
|
+
"metersPerUnit": {
|
|
261
|
+
"type": "number",
|
|
262
|
+
"exclusiveMinimum": 0,
|
|
263
|
+
"description": "World meters per unit of the source projected space (origin/chunkSize are pre-multiplied); absent = 1."
|
|
264
|
+
},
|
|
265
|
+
"streaming": {
|
|
266
|
+
"default": {
|
|
267
|
+
"loadRadius": 3,
|
|
268
|
+
"unloadRadius": 4,
|
|
269
|
+
"maxConcurrentLoads": 4,
|
|
270
|
+
"maxResidentTiles": 96
|
|
271
|
+
},
|
|
272
|
+
"type": "object",
|
|
273
|
+
"properties": {
|
|
274
|
+
"loadRadius": {
|
|
275
|
+
"default": 3,
|
|
276
|
+
"type": "number",
|
|
277
|
+
"exclusiveMinimum": 0,
|
|
278
|
+
"description": "Radius around the camera, in chunks, that is kept resident (default 3)."
|
|
279
|
+
},
|
|
280
|
+
"unloadRadius": {
|
|
281
|
+
"default": 4,
|
|
282
|
+
"type": "number",
|
|
283
|
+
"exclusiveMinimum": 0,
|
|
284
|
+
"description": "Hysteresis radius in chunks; resident tiles outside it may be evicted (>= loadRadius; default 4)."
|
|
285
|
+
},
|
|
286
|
+
"maxConcurrentLoads": {
|
|
287
|
+
"default": 4,
|
|
288
|
+
"type": "integer",
|
|
289
|
+
"exclusiveMinimum": 0,
|
|
290
|
+
"maximum": 32,
|
|
291
|
+
"description": "Maximum height-tile requests in flight at once (default 4)."
|
|
292
|
+
},
|
|
293
|
+
"maxResidentTiles": {
|
|
294
|
+
"default": 96,
|
|
295
|
+
"type": "integer",
|
|
296
|
+
"exclusiveMinimum": 0,
|
|
297
|
+
"maximum": 4096,
|
|
298
|
+
"description": "Hard ceiling on decoded resident tiles and their meshes (default 96)."
|
|
299
|
+
}
|
|
300
|
+
},
|
|
301
|
+
"additionalProperties": false,
|
|
302
|
+
"description": "Tile residency budgets."
|
|
303
|
+
}
|
|
304
|
+
},
|
|
305
|
+
"required": [
|
|
306
|
+
"name",
|
|
307
|
+
"height",
|
|
308
|
+
"tiles",
|
|
309
|
+
"format"
|
|
310
|
+
],
|
|
311
|
+
"additionalProperties": false
|
|
312
|
+
}
|
|
313
|
+
```
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
# Entity type registry (`molen/types@1`)
|
|
2
|
+
|
|
3
|
+
Namespaced entity types with doc strings, default components, inheritance, and asset refs. Scenes instantiate them; reservations in project.json partition the id space between agents.
|
|
4
|
+
|
|
5
|
+
## Example
|
|
6
|
+
|
|
7
|
+
```json
|
|
8
|
+
{
|
|
9
|
+
"format": "molen/types@1",
|
|
10
|
+
"namespace": "train",
|
|
11
|
+
"owner": "agent:layout",
|
|
12
|
+
"types": {
|
|
13
|
+
"train.car": {
|
|
14
|
+
"doc": "A generic rail vehicle.",
|
|
15
|
+
"components": {
|
|
16
|
+
"transform": {
|
|
17
|
+
"pos": [
|
|
18
|
+
0,
|
|
19
|
+
0,
|
|
20
|
+
0
|
|
21
|
+
],
|
|
22
|
+
"rot": [
|
|
23
|
+
0,
|
|
24
|
+
0,
|
|
25
|
+
0,
|
|
26
|
+
1
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
"renderable": {
|
|
30
|
+
"kind": "primitive",
|
|
31
|
+
"ref": "box",
|
|
32
|
+
"materialRef": "palette:#8a5a2b"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"train.locomotive": {
|
|
37
|
+
"doc": "Powered engine at the head of a consist.",
|
|
38
|
+
"extends": "train.car",
|
|
39
|
+
"components": {
|
|
40
|
+
"renderable": {
|
|
41
|
+
"materialRef": "palette:#2b2b2b"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## JSON Schema
|
|
50
|
+
|
|
51
|
+
```json
|
|
52
|
+
{
|
|
53
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
54
|
+
"type": "object",
|
|
55
|
+
"properties": {
|
|
56
|
+
"format": {
|
|
57
|
+
"type": "string",
|
|
58
|
+
"const": "molen/types@1",
|
|
59
|
+
"description": "Format envelope; always 'molen/types@1'."
|
|
60
|
+
},
|
|
61
|
+
"namespace": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"pattern": "^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$",
|
|
64
|
+
"description": "Namespace every type id in this file lives under (dotted lower_snake, e.g. 'train')."
|
|
65
|
+
},
|
|
66
|
+
"owner": {
|
|
67
|
+
"type": "string",
|
|
68
|
+
"minLength": 1,
|
|
69
|
+
"description": "Owning agent or package label, e.g. 'agent:layout'."
|
|
70
|
+
},
|
|
71
|
+
"doc": {
|
|
72
|
+
"type": "string",
|
|
73
|
+
"description": "Human/agent description of this type collection."
|
|
74
|
+
},
|
|
75
|
+
"types": {
|
|
76
|
+
"default": {},
|
|
77
|
+
"type": "object",
|
|
78
|
+
"propertyNames": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"pattern": "^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+$"
|
|
81
|
+
},
|
|
82
|
+
"additionalProperties": {
|
|
83
|
+
"type": "object",
|
|
84
|
+
"properties": {
|
|
85
|
+
"doc": {
|
|
86
|
+
"type": "string",
|
|
87
|
+
"description": "Human/agent description of the type."
|
|
88
|
+
},
|
|
89
|
+
"extends": {
|
|
90
|
+
"type": "string",
|
|
91
|
+
"pattern": "^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+$",
|
|
92
|
+
"description": "Parent type id whose components this type inherits (deep-merged)."
|
|
93
|
+
},
|
|
94
|
+
"components": {
|
|
95
|
+
"default": {},
|
|
96
|
+
"type": "object",
|
|
97
|
+
"propertyNames": {
|
|
98
|
+
"type": "string"
|
|
99
|
+
},
|
|
100
|
+
"additionalProperties": {
|
|
101
|
+
"type": "object",
|
|
102
|
+
"propertyNames": {
|
|
103
|
+
"type": "string"
|
|
104
|
+
},
|
|
105
|
+
"additionalProperties": {
|
|
106
|
+
"$ref": "#/$defs/__schema0"
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"description": "Default component map for entities of this type (a partial when extends is set)."
|
|
110
|
+
},
|
|
111
|
+
"assets": {
|
|
112
|
+
"default": [],
|
|
113
|
+
"type": "array",
|
|
114
|
+
"items": {
|
|
115
|
+
"type": "string",
|
|
116
|
+
"pattern": "^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"
|
|
117
|
+
},
|
|
118
|
+
"description": "Project asset ids this type references (e.g. its gltf model)."
|
|
119
|
+
},
|
|
120
|
+
"scripts": {
|
|
121
|
+
"default": [],
|
|
122
|
+
"type": "array",
|
|
123
|
+
"items": {
|
|
124
|
+
"type": "object",
|
|
125
|
+
"properties": {
|
|
126
|
+
"checkpoint": {
|
|
127
|
+
"type": "string",
|
|
128
|
+
"const": "state",
|
|
129
|
+
"description": "Opt into checkpoint restore: keep all durable state in molen.state, components, or snapshot providers, never mutable closures. Without this declaration replay seeks from the beginning."
|
|
130
|
+
},
|
|
131
|
+
"id": {
|
|
132
|
+
"type": "string",
|
|
133
|
+
"minLength": 1,
|
|
134
|
+
"description": "Script id, unique within the scene."
|
|
135
|
+
},
|
|
136
|
+
"code": {
|
|
137
|
+
"type": "string",
|
|
138
|
+
"minLength": 1,
|
|
139
|
+
"description": "Inline JavaScript source (exactly one of code or path)."
|
|
140
|
+
},
|
|
141
|
+
"path": {
|
|
142
|
+
"type": "string",
|
|
143
|
+
"minLength": 1,
|
|
144
|
+
"allOf": [
|
|
145
|
+
{
|
|
146
|
+
"pattern": "^(?![A-Za-z]:|[/\\\\])(?!.*\\\\)(?!.*(?:^|\\/)\\.\\.(?:\\/|$)).+$"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"pattern": "\\.(?:js|ts)$"
|
|
150
|
+
}
|
|
151
|
+
],
|
|
152
|
+
"description": "Scene-relative path to a script file, .js or .ts (exactly one of code or path). A .ts file has its types erased when the scene is loaded."
|
|
153
|
+
},
|
|
154
|
+
"config": {
|
|
155
|
+
"default": {},
|
|
156
|
+
"type": "object",
|
|
157
|
+
"propertyNames": {
|
|
158
|
+
"type": "string"
|
|
159
|
+
},
|
|
160
|
+
"additionalProperties": {
|
|
161
|
+
"$ref": "#/$defs/__schema0"
|
|
162
|
+
},
|
|
163
|
+
"description": "Frozen JSON config exposed to the script as `config`."
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
"required": [
|
|
167
|
+
"id"
|
|
168
|
+
],
|
|
169
|
+
"additionalProperties": false
|
|
170
|
+
},
|
|
171
|
+
"description": "Deterministic type behavior, installed once per world with config.type set to this type id."
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
"additionalProperties": false
|
|
175
|
+
},
|
|
176
|
+
"description": "Type id to definition; every id must start with '<namespace>.'."
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
"required": [
|
|
180
|
+
"format",
|
|
181
|
+
"namespace"
|
|
182
|
+
],
|
|
183
|
+
"additionalProperties": false,
|
|
184
|
+
"$defs": {
|
|
185
|
+
"__schema0": {
|
|
186
|
+
"anyOf": [
|
|
187
|
+
{
|
|
188
|
+
"type": "string"
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"type": "number"
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"type": "boolean"
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"type": "null"
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"type": "array",
|
|
201
|
+
"items": {
|
|
202
|
+
"$ref": "#/$defs/__schema0"
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
"type": "object",
|
|
207
|
+
"propertyNames": {
|
|
208
|
+
"type": "string"
|
|
209
|
+
},
|
|
210
|
+
"additionalProperties": {
|
|
211
|
+
"$ref": "#/$defs/__schema0"
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
]
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
```
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
# UV paint sidecar (`molen/uvpaint@1`)
|
|
2
|
+
|
|
3
|
+
Island annotations pairing a paint-by-numbers template with a model for re-import.
|
|
4
|
+
|
|
5
|
+
## Example
|
|
6
|
+
|
|
7
|
+
```json
|
|
8
|
+
{
|
|
9
|
+
"format": "molen/uvpaint@1",
|
|
10
|
+
"model": "models/scout.glb",
|
|
11
|
+
"atlasSize": [
|
|
12
|
+
1024,
|
|
13
|
+
1024
|
|
14
|
+
],
|
|
15
|
+
"islands": [
|
|
16
|
+
{
|
|
17
|
+
"id": 1,
|
|
18
|
+
"label": "head",
|
|
19
|
+
"color": "#e6194b",
|
|
20
|
+
"uvBBox": [
|
|
21
|
+
0.02,
|
|
22
|
+
0.05,
|
|
23
|
+
0.31,
|
|
24
|
+
0.4
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## JSON Schema
|
|
32
|
+
|
|
33
|
+
```json
|
|
34
|
+
{
|
|
35
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
36
|
+
"type": "object",
|
|
37
|
+
"properties": {
|
|
38
|
+
"format": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"const": "molen/uvpaint@1",
|
|
41
|
+
"description": "Format envelope; always 'molen/uvpaint@1'."
|
|
42
|
+
},
|
|
43
|
+
"model": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"minLength": 1,
|
|
46
|
+
"description": "Sidecar-relative path of the model the template was unwrapped from."
|
|
47
|
+
},
|
|
48
|
+
"atlasSize": {
|
|
49
|
+
"default": [
|
|
50
|
+
1024,
|
|
51
|
+
1024
|
|
52
|
+
],
|
|
53
|
+
"minItems": 2,
|
|
54
|
+
"maxItems": 2,
|
|
55
|
+
"type": "array",
|
|
56
|
+
"items": {
|
|
57
|
+
"type": "integer",
|
|
58
|
+
"exclusiveMinimum": 0,
|
|
59
|
+
"maximum": 9007199254740991
|
|
60
|
+
},
|
|
61
|
+
"description": "Template/atlas size [width, height] in pixels (default [1024, 1024])."
|
|
62
|
+
},
|
|
63
|
+
"texelDensity": {
|
|
64
|
+
"default": 128,
|
|
65
|
+
"type": "number",
|
|
66
|
+
"exclusiveMinimum": 0,
|
|
67
|
+
"description": "Texels per meter of model surface the atlas was laid out at (default 128)."
|
|
68
|
+
},
|
|
69
|
+
"islands": {
|
|
70
|
+
"default": [],
|
|
71
|
+
"type": "array",
|
|
72
|
+
"items": {
|
|
73
|
+
"type": "object",
|
|
74
|
+
"properties": {
|
|
75
|
+
"id": {
|
|
76
|
+
"type": "integer",
|
|
77
|
+
"minimum": 0,
|
|
78
|
+
"maximum": 9007199254740991,
|
|
79
|
+
"description": "Island number as printed on the template."
|
|
80
|
+
},
|
|
81
|
+
"label": {
|
|
82
|
+
"default": "",
|
|
83
|
+
"type": "string",
|
|
84
|
+
"description": "Human label for the island, e.g. 'head'."
|
|
85
|
+
},
|
|
86
|
+
"color": {
|
|
87
|
+
"type": "string",
|
|
88
|
+
"pattern": "^#[0-9a-fA-F]{6}$",
|
|
89
|
+
"description": "'#rrggbb' key color of the island in the island map."
|
|
90
|
+
},
|
|
91
|
+
"uvBBox": {
|
|
92
|
+
"minItems": 4,
|
|
93
|
+
"maxItems": 4,
|
|
94
|
+
"type": "array",
|
|
95
|
+
"items": {
|
|
96
|
+
"type": "number"
|
|
97
|
+
},
|
|
98
|
+
"description": "Island bounds [minU, minV, maxU, maxV] in 0..1 UV space."
|
|
99
|
+
},
|
|
100
|
+
"notes": {
|
|
101
|
+
"default": "",
|
|
102
|
+
"type": "string",
|
|
103
|
+
"description": "Free-form painting notes."
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"required": [
|
|
107
|
+
"id",
|
|
108
|
+
"color",
|
|
109
|
+
"uvBBox"
|
|
110
|
+
],
|
|
111
|
+
"additionalProperties": false
|
|
112
|
+
},
|
|
113
|
+
"description": "UV islands annotated on the template."
|
|
114
|
+
},
|
|
115
|
+
"paintedImage": {
|
|
116
|
+
"type": "string",
|
|
117
|
+
"description": "Sidecar-relative path of the painted template image to re-import."
|
|
118
|
+
},
|
|
119
|
+
"importRules": {
|
|
120
|
+
"default": {
|
|
121
|
+
"maskToIslands": true,
|
|
122
|
+
"dilationPx": 8
|
|
123
|
+
},
|
|
124
|
+
"type": "object",
|
|
125
|
+
"properties": {
|
|
126
|
+
"maskToIslands": {
|
|
127
|
+
"default": true,
|
|
128
|
+
"type": "boolean",
|
|
129
|
+
"description": "Clip paint to the island shapes on import (default true)."
|
|
130
|
+
},
|
|
131
|
+
"dilationPx": {
|
|
132
|
+
"default": 8,
|
|
133
|
+
"type": "integer",
|
|
134
|
+
"minimum": 0,
|
|
135
|
+
"maximum": 9007199254740991,
|
|
136
|
+
"description": "Gutter dilation in pixels applied after masking (default 8)."
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
"additionalProperties": false,
|
|
140
|
+
"description": "How the painted image is turned back into a texture."
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
"required": [
|
|
144
|
+
"format",
|
|
145
|
+
"model"
|
|
146
|
+
],
|
|
147
|
+
"additionalProperties": false
|
|
148
|
+
}
|
|
149
|
+
```
|