@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.
Files changed (84) hide show
  1. package/LICENSE +21 -0
  2. package/NOTICE.md +15 -0
  3. package/README.md +91 -0
  4. package/dist/capture/THIRD-PARTY-NOTICES.md +223 -0
  5. package/dist/capture/basis/LICENSE.txt +55 -0
  6. package/dist/capture/basis/basis_transcoder.js +19 -0
  7. package/dist/capture/basis/basis_transcoder.wasm +0 -0
  8. package/dist/capture/capture.html +15 -0
  9. package/dist/capture/harness.js +4671 -0
  10. package/dist/capture/worldgen-preview.html +15 -0
  11. package/dist/capture/worldgen-preview.js +4617 -0
  12. package/dist/cli.d.mts +1 -0
  13. package/dist/cli.mjs +1276 -0
  14. package/dist/docs-src/guide/3d-art-guidelines.md +157 -0
  15. package/dist/docs-src/guide/3d-model-assets.md +286 -0
  16. package/dist/docs-src/guide/adaptive-performance.md +89 -0
  17. package/dist/docs-src/guide/agent-loop.md +156 -0
  18. package/dist/docs-src/guide/aircraft.md +225 -0
  19. package/dist/docs-src/guide/browser-mount.md +185 -0
  20. package/dist/docs-src/guide/building-interiors.md +175 -0
  21. package/dist/docs-src/guide/capability-authoring.md +69 -0
  22. package/dist/docs-src/guide/determinism.md +285 -0
  23. package/dist/docs-src/guide/entities.md +47 -0
  24. package/dist/docs-src/guide/examples.md +58 -0
  25. package/dist/docs-src/guide/experience-playback.md +57 -0
  26. package/dist/docs-src/guide/figures.md +164 -0
  27. package/dist/docs-src/guide/game-samples.md +100 -0
  28. package/dist/docs-src/guide/graphics-performance.md +167 -0
  29. package/dist/docs-src/guide/input.md +205 -0
  30. package/dist/docs-src/guide/materials.md +125 -0
  31. package/dist/docs-src/guide/project.md +157 -0
  32. package/dist/docs-src/guide/quickstart.md +63 -0
  33. package/dist/docs-src/guide/recognizable-places.md +158 -0
  34. package/dist/docs-src/guide/rendering-backends.md +231 -0
  35. package/dist/docs-src/guide/scripting.md +330 -0
  36. package/dist/docs-src/guide/sky.md +192 -0
  37. package/dist/docs-src/guide/source-bundles.md +42 -0
  38. package/dist/docs-src/guide/structure-library.md +114 -0
  39. package/dist/docs-src/guide/surface-rendering.md +203 -0
  40. package/dist/docs-src/guide/terrain.md +389 -0
  41. package/dist/docs-src/guide/three-surface.md +70 -0
  42. package/dist/docs-src/guide/vehicle-interiors.md +126 -0
  43. package/dist/docs-src/guide/vehicles.md +110 -0
  44. package/dist/docs-src/guide/weather.md +123 -0
  45. package/dist/docs-src/guide/worldgen.md +434 -0
  46. package/dist/docs-src/llms.txt +129 -0
  47. package/dist/docs-src/schemas/README.md +36 -0
  48. package/dist/docs-src/schemas/archstyle.md +2340 -0
  49. package/dist/docs-src/schemas/assert.md +169 -0
  50. package/dist/docs-src/schemas/asset.md +543 -0
  51. package/dist/docs-src/schemas/business-catalog.md +162 -0
  52. package/dist/docs-src/schemas/cameratrack.md +132 -0
  53. package/dist/docs-src/schemas/command.md +112 -0
  54. package/dist/docs-src/schemas/components.md +5826 -0
  55. package/dist/docs-src/schemas/delta.md +204 -0
  56. package/dist/docs-src/schemas/experience-play.md +452 -0
  57. package/dist/docs-src/schemas/figure.md +290 -0
  58. package/dist/docs-src/schemas/interior-catalog.md +230 -0
  59. package/dist/docs-src/schemas/keyframe.md +314 -0
  60. package/dist/docs-src/schemas/landmark-catalog.md +56 -0
  61. package/dist/docs-src/schemas/landmark.md +293 -0
  62. package/dist/docs-src/schemas/matgraph.md +1163 -0
  63. package/dist/docs-src/schemas/pack-index.md +82 -0
  64. package/dist/docs-src/schemas/pack-source.md +139 -0
  65. package/dist/docs-src/schemas/pack.md +225 -0
  66. package/dist/docs-src/schemas/pixelgrid.md +108 -0
  67. package/dist/docs-src/schemas/prefab.md +106 -0
  68. package/dist/docs-src/schemas/project.md +271 -0
  69. package/dist/docs-src/schemas/region-atlas.md +612 -0
  70. package/dist/docs-src/schemas/replay.md +807 -0
  71. package/dist/docs-src/schemas/scatter.md +541 -0
  72. package/dist/docs-src/schemas/scene.md +1152 -0
  73. package/dist/docs-src/schemas/source-bundle.md +266 -0
  74. package/dist/docs-src/schemas/stylepack.md +420 -0
  75. package/dist/docs-src/schemas/terrain-package.md +731 -0
  76. package/dist/docs-src/schemas/terrain.md +313 -0
  77. package/dist/docs-src/schemas/types.md +218 -0
  78. package/dist/docs-src/schemas/uvpaint.md +149 -0
  79. package/dist/docs-src/schemas/worldgen-batch.md +743 -0
  80. package/dist/index.d.mts +1271 -0
  81. package/dist/index.mjs +78 -0
  82. package/dist/mcp-BFnCWrg0.mjs +796 -0
  83. package/dist/ops-BGxhSP6w.mjs +7246 -0
  84. package/package.json +96 -0
@@ -0,0 +1,82 @@
1
+ # Content pack index (`molen/pack-index@1`)
2
+
3
+ Lists the current built file of each pack in a directory, so a host can publish several packs and clients can find them by id.
4
+
5
+ ## Example
6
+
7
+ ```json
8
+ {
9
+ "format": "molen/pack-index@1",
10
+ "packs": {
11
+ "example.vehicles": {
12
+ "version": "1.0.0",
13
+ "file": "example.vehicles-0123456789ab.zip",
14
+ "contentHash": "sha256:0000000000000000000000000000000000000000000000000000000000000000",
15
+ "size": 91234
16
+ }
17
+ }
18
+ }
19
+ ```
20
+
21
+ ## JSON Schema
22
+
23
+ ```json
24
+ {
25
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
26
+ "type": "object",
27
+ "properties": {
28
+ "format": {
29
+ "type": "string",
30
+ "const": "molen/pack-index@1",
31
+ "description": "Format envelope; always 'molen/pack-index@1'."
32
+ },
33
+ "packs": {
34
+ "type": "object",
35
+ "propertyNames": {
36
+ "type": "string",
37
+ "pattern": "^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"
38
+ },
39
+ "additionalProperties": {
40
+ "type": "object",
41
+ "properties": {
42
+ "version": {
43
+ "type": "string",
44
+ "minLength": 1,
45
+ "description": "Pack version."
46
+ },
47
+ "file": {
48
+ "type": "string",
49
+ "minLength": 1,
50
+ "pattern": "^(?![A-Za-z]:|[/\\\\])(?!.*\\\\)(?!.*(?:^|\\/)\\.\\.?(?:\\/|$)).+$",
51
+ "description": "Pack file, relative to the index."
52
+ },
53
+ "contentHash": {
54
+ "type": "string",
55
+ "pattern": "^sha256:[0-9a-f]{64}$",
56
+ "description": "The pack manifest's contentHash."
57
+ },
58
+ "size": {
59
+ "type": "integer",
60
+ "minimum": 0,
61
+ "maximum": 9007199254740991,
62
+ "description": "File size in bytes."
63
+ }
64
+ },
65
+ "required": [
66
+ "version",
67
+ "file",
68
+ "contentHash",
69
+ "size"
70
+ ],
71
+ "additionalProperties": false
72
+ },
73
+ "description": "Pack id to its current built file."
74
+ }
75
+ },
76
+ "required": [
77
+ "format",
78
+ "packs"
79
+ ],
80
+ "additionalProperties": false
81
+ }
82
+ ```
@@ -0,0 +1,139 @@
1
+ # Content pack source (`molen/pack-source@1`)
2
+
3
+ Build settings for a content pack, kept as molen-pack.source.json in the directory `molen pack build` turns into a pack.
4
+
5
+ ## Example
6
+
7
+ ```json
8
+ {
9
+ "format": "molen/pack-source@1",
10
+ "id": "example.vehicles",
11
+ "version": "1.0.0",
12
+ "license": "CC0-1.0",
13
+ "notice": "NOTICE.md",
14
+ "include": [
15
+ "**"
16
+ ],
17
+ "exclude": [
18
+ "**/*.psd"
19
+ ],
20
+ "ids": {},
21
+ "provides": {
22
+ "types": "types/vehicles.types.json"
23
+ },
24
+ "solid": true
25
+ }
26
+ ```
27
+
28
+ ## JSON Schema
29
+
30
+ ```json
31
+ {
32
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
33
+ "type": "object",
34
+ "properties": {
35
+ "format": {
36
+ "type": "string",
37
+ "const": "molen/pack-source@1",
38
+ "description": "Format envelope; always 'molen/pack-source@1'."
39
+ },
40
+ "id": {
41
+ "type": "string",
42
+ "pattern": "^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$",
43
+ "description": "Stable pack id, e.g. molen.entities."
44
+ },
45
+ "version": {
46
+ "type": "string",
47
+ "minLength": 1,
48
+ "description": "Pack version."
49
+ },
50
+ "title": {
51
+ "type": "string",
52
+ "minLength": 1,
53
+ "description": "Human-readable pack name."
54
+ },
55
+ "license": {
56
+ "type": "string",
57
+ "minLength": 1,
58
+ "description": "SPDX expression for the pack's content."
59
+ },
60
+ "notice": {
61
+ "type": "string",
62
+ "minLength": 1,
63
+ "pattern": "^(?![A-Za-z]:|[/\\\\])(?!.*\\\\)(?!.*(?:^|\\/)\\.\\.?(?:\\/|$)).+$",
64
+ "description": "File that carries the attribution notice."
65
+ },
66
+ "include": {
67
+ "default": [
68
+ "**"
69
+ ],
70
+ "type": "array",
71
+ "items": {
72
+ "type": "string",
73
+ "minLength": 1
74
+ },
75
+ "description": "Globs (*, **, ?) of files to include, relative to the source directory."
76
+ },
77
+ "exclude": {
78
+ "default": [],
79
+ "type": "array",
80
+ "items": {
81
+ "type": "string",
82
+ "minLength": 1
83
+ },
84
+ "description": "Globs of files to leave out."
85
+ },
86
+ "ids": {
87
+ "default": {},
88
+ "type": "object",
89
+ "propertyNames": {
90
+ "type": "string",
91
+ "pattern": "^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"
92
+ },
93
+ "additionalProperties": {
94
+ "type": "string",
95
+ "minLength": 1,
96
+ "pattern": "^(?![A-Za-z]:|[/\\\\])(?!.*\\\\)(?!.*(?:^|\\/)\\.\\.?(?:\\/|$)).+$"
97
+ },
98
+ "description": "Extra asset id to file mappings. Ids declared by molen/asset@1 sidecars are added automatically."
99
+ },
100
+ "provides": {
101
+ "default": {},
102
+ "type": "object",
103
+ "propertyNames": {
104
+ "type": "string",
105
+ "pattern": "^[a-z][a-z0-9-]*$"
106
+ },
107
+ "additionalProperties": {
108
+ "anyOf": [
109
+ {
110
+ "type": "string",
111
+ "minLength": 1,
112
+ "pattern": "^(?![A-Za-z]:|[/\\\\])(?!.*\\\\)(?!.*(?:^|\\/)\\.\\.?(?:\\/|$)).+$"
113
+ },
114
+ {
115
+ "type": "array",
116
+ "items": {
117
+ "type": "string",
118
+ "minLength": 1,
119
+ "pattern": "^(?![A-Za-z]:|[/\\\\])(?!.*\\\\)(?!.*(?:^|\\/)\\.\\.?(?:\\/|$)).+$"
120
+ }
121
+ }
122
+ ]
123
+ },
124
+ "description": "Role (e.g. types, stylepack, stars) to the file or files that provide it."
125
+ },
126
+ "solid": {
127
+ "default": true,
128
+ "type": "boolean",
129
+ "description": "Group small text files into compressed solid blocks (default true)."
130
+ }
131
+ },
132
+ "required": [
133
+ "format",
134
+ "id",
135
+ "version"
136
+ ],
137
+ "additionalProperties": false
138
+ }
139
+ ```
@@ -0,0 +1,225 @@
1
+ # Content pack manifest (`molen/pack@1`)
2
+
3
+ Manifest inside a content pack: a zip file carrying models, documents and catalogs outside the code packages. It lists every logical file with its size and hash, the asset ids it provides, and the roles (types, stylepack, stars, ...) its files fill.
4
+
5
+ ## Example
6
+
7
+ ```json
8
+ {
9
+ "format": "molen/pack@1",
10
+ "id": "example.vehicles",
11
+ "version": "1.0.0",
12
+ "license": "CC0-1.0",
13
+ "notice": "NOTICE.md",
14
+ "contentHash": "sha256:0000000000000000000000000000000000000000000000000000000000000000",
15
+ "provides": {
16
+ "types": [
17
+ "types/vehicles.types.json"
18
+ ]
19
+ },
20
+ "ids": {
21
+ "example.vehicle.roadster": "models/roadster/model.glb"
22
+ },
23
+ "blocks": {
24
+ "types": {
25
+ "entry": "molen-pack/blocks/types.blk",
26
+ "size": 2400
27
+ }
28
+ },
29
+ "entries": {
30
+ "NOTICE.md": {
31
+ "size": 180,
32
+ "sha256": "sha256:0000000000000000000000000000000000000000000000000000000000000000",
33
+ "mediaType": "text/markdown"
34
+ },
35
+ "models/roadster/model.glb": {
36
+ "size": 88120,
37
+ "sha256": "sha256:0000000000000000000000000000000000000000000000000000000000000000",
38
+ "mediaType": "model/gltf-binary"
39
+ },
40
+ "types/vehicles.types.json": {
41
+ "size": 2400,
42
+ "sha256": "sha256:0000000000000000000000000000000000000000000000000000000000000000",
43
+ "mediaType": "application/json",
44
+ "block": "types",
45
+ "offset": 0
46
+ }
47
+ }
48
+ }
49
+ ```
50
+
51
+ ## JSON Schema
52
+
53
+ ```json
54
+ {
55
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
56
+ "type": "object",
57
+ "properties": {
58
+ "format": {
59
+ "type": "string",
60
+ "const": "molen/pack@1",
61
+ "description": "Format envelope; always 'molen/pack@1'."
62
+ },
63
+ "id": {
64
+ "type": "string",
65
+ "pattern": "^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$",
66
+ "description": "Stable pack id, e.g. molen.entities."
67
+ },
68
+ "version": {
69
+ "type": "string",
70
+ "minLength": 1,
71
+ "description": "Pack version."
72
+ },
73
+ "title": {
74
+ "type": "string",
75
+ "minLength": 1,
76
+ "description": "Human-readable pack name."
77
+ },
78
+ "license": {
79
+ "type": "string",
80
+ "minLength": 1,
81
+ "description": "SPDX expression for the pack's content."
82
+ },
83
+ "notice": {
84
+ "type": "string",
85
+ "minLength": 1,
86
+ "pattern": "^(?![A-Za-z]:|[/\\\\])(?!.*\\\\)(?!.*(?:^|\\/)\\.\\.?(?:\\/|$)).+$",
87
+ "description": "Entry that carries the attribution notice."
88
+ },
89
+ "contentHash": {
90
+ "type": "string",
91
+ "pattern": "^sha256:[0-9a-f]{64}$",
92
+ "description": "sha256 over every logical file (path and content), independent of the zip layout."
93
+ },
94
+ "provides": {
95
+ "default": {},
96
+ "type": "object",
97
+ "propertyNames": {
98
+ "type": "string",
99
+ "pattern": "^[a-z][a-z0-9-]*$"
100
+ },
101
+ "additionalProperties": {
102
+ "type": "array",
103
+ "items": {
104
+ "type": "string",
105
+ "minLength": 1,
106
+ "pattern": "^(?![A-Za-z]:|[/\\\\])(?!.*\\\\)(?!.*(?:^|\\/)\\.\\.?(?:\\/|$)).+$"
107
+ }
108
+ },
109
+ "description": "Role (e.g. types, stylepack, stars) to the entry paths that provide it."
110
+ },
111
+ "ids": {
112
+ "default": {},
113
+ "type": "object",
114
+ "propertyNames": {
115
+ "type": "string",
116
+ "pattern": "^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"
117
+ },
118
+ "additionalProperties": {
119
+ "type": "string",
120
+ "minLength": 1,
121
+ "pattern": "^(?![A-Za-z]:|[/\\\\])(?!.*\\\\)(?!.*(?:^|\\/)\\.\\.?(?:\\/|$)).+$"
122
+ },
123
+ "description": "Asset id to the entry path of its runtime file."
124
+ },
125
+ "blocks": {
126
+ "default": {},
127
+ "type": "object",
128
+ "propertyNames": {
129
+ "type": "string",
130
+ "minLength": 1
131
+ },
132
+ "additionalProperties": {
133
+ "type": "object",
134
+ "properties": {
135
+ "entry": {
136
+ "type": "string",
137
+ "minLength": 1,
138
+ "description": "Zip member holding the block."
139
+ },
140
+ "size": {
141
+ "type": "integer",
142
+ "minimum": 0,
143
+ "maximum": 9007199254740991,
144
+ "description": "Uncompressed block size in bytes."
145
+ }
146
+ },
147
+ "required": [
148
+ "entry",
149
+ "size"
150
+ ],
151
+ "additionalProperties": false
152
+ },
153
+ "description": "Solid blocks: many small files compressed together as one zip member."
154
+ },
155
+ "entries": {
156
+ "type": "object",
157
+ "propertyNames": {
158
+ "type": "string",
159
+ "minLength": 1,
160
+ "pattern": "^(?![A-Za-z]:|[/\\\\])(?!.*\\\\)(?!.*(?:^|\\/)\\.\\.?(?:\\/|$)).+$"
161
+ },
162
+ "additionalProperties": {
163
+ "type": "object",
164
+ "properties": {
165
+ "size": {
166
+ "type": "integer",
167
+ "minimum": 0,
168
+ "maximum": 9007199254740991,
169
+ "description": "Uncompressed size in bytes."
170
+ },
171
+ "sha256": {
172
+ "type": "string",
173
+ "pattern": "^sha256:[0-9a-f]{64}$",
174
+ "description": "sha256 of the uncompressed content."
175
+ },
176
+ "mediaType": {
177
+ "type": "string",
178
+ "minLength": 1,
179
+ "description": "Media type, e.g. model/gltf-binary."
180
+ },
181
+ "block": {
182
+ "type": "string",
183
+ "minLength": 1,
184
+ "description": "Solid block holding this file; absent when it is its own zip member."
185
+ },
186
+ "offset": {
187
+ "type": "integer",
188
+ "minimum": 0,
189
+ "maximum": 9007199254740991,
190
+ "description": "Byte offset inside the block."
191
+ },
192
+ "variants": {
193
+ "type": "object",
194
+ "propertyNames": {
195
+ "type": "string",
196
+ "pattern": "^[a-z0-9][a-z0-9-]*$"
197
+ },
198
+ "additionalProperties": {
199
+ "type": "string",
200
+ "minLength": 1,
201
+ "pattern": "^(?![A-Za-z]:|[/\\\\])(?!.*\\\\)(?!.*(?:^|\\/)\\.\\.?(?:\\/|$)).+$"
202
+ },
203
+ "description": "Alternative encodings of the same content, variant name to entry path."
204
+ }
205
+ },
206
+ "required": [
207
+ "size",
208
+ "sha256",
209
+ "mediaType"
210
+ ],
211
+ "additionalProperties": false
212
+ },
213
+ "description": "Every logical file in the pack, by path."
214
+ }
215
+ },
216
+ "required": [
217
+ "format",
218
+ "id",
219
+ "version",
220
+ "contentHash",
221
+ "entries"
222
+ ],
223
+ "additionalProperties": false
224
+ }
225
+ ```
@@ -0,0 +1,108 @@
1
+ # Pixel-grid texture (`molen/pixelgrid@1`)
2
+
3
+ Indexed palette + rows of characters rasterized to a pixel-art texture.
4
+
5
+ ## Example
6
+
7
+ ```json
8
+ {
9
+ "format": "molen/pixelgrid@1",
10
+ "size": [
11
+ 4,
12
+ 4
13
+ ],
14
+ "palette": {
15
+ ".": "transparent",
16
+ "X": "#222222",
17
+ "o": "#e6b84a"
18
+ },
19
+ "rows": [
20
+ ".XX.",
21
+ "XooX",
22
+ "XooX",
23
+ ".XX."
24
+ ]
25
+ }
26
+ ```
27
+
28
+ ## JSON Schema
29
+
30
+ ```json
31
+ {
32
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
33
+ "type": "object",
34
+ "properties": {
35
+ "format": {
36
+ "type": "string",
37
+ "const": "molen/pixelgrid@1",
38
+ "description": "Format envelope; always 'molen/pixelgrid@1'."
39
+ },
40
+ "size": {
41
+ "minItems": 2,
42
+ "maxItems": 2,
43
+ "type": "array",
44
+ "items": {
45
+ "type": "integer",
46
+ "minimum": 1,
47
+ "maximum": 256
48
+ },
49
+ "description": "Grid size [width, height] in pixels, 1..256."
50
+ },
51
+ "palette": {
52
+ "type": "object",
53
+ "propertyNames": {
54
+ "type": "string"
55
+ },
56
+ "additionalProperties": {
57
+ "type": "string"
58
+ },
59
+ "description": "Single-character key to 'transparent' or '#rrggbb[aa]' color."
60
+ },
61
+ "rows": {
62
+ "minItems": 1,
63
+ "type": "array",
64
+ "items": {
65
+ "type": "string"
66
+ },
67
+ "description": "One string per row (top to bottom), each `width` palette characters long."
68
+ },
69
+ "slots": {
70
+ "default": {
71
+ "baseColor": true,
72
+ "emissive": false
73
+ },
74
+ "type": "object",
75
+ "properties": {
76
+ "baseColor": {
77
+ "default": true,
78
+ "type": "boolean",
79
+ "description": "Emit the baseColor texture (default true)."
80
+ },
81
+ "emissive": {
82
+ "default": false,
83
+ "type": "boolean",
84
+ "description": "Also emit the grid as an emissive texture (default false)."
85
+ }
86
+ },
87
+ "additionalProperties": false,
88
+ "description": "Which material texture slots the grid is rasterized into."
89
+ },
90
+ "filter": {
91
+ "default": "nearest",
92
+ "type": "string",
93
+ "enum": [
94
+ "nearest",
95
+ "linear"
96
+ ],
97
+ "description": "Texture sampling filter: nearest (crisp pixels, default) or linear."
98
+ }
99
+ },
100
+ "required": [
101
+ "format",
102
+ "size",
103
+ "palette",
104
+ "rows"
105
+ ],
106
+ "additionalProperties": false
107
+ }
108
+ ```
@@ -0,0 +1,106 @@
1
+ # Prefab (`molen/prefab@1`)
2
+
3
+ Declarative entity template: component name to pure-JSON component data.
4
+
5
+ ## Example
6
+
7
+ ```json
8
+ {
9
+ "format": "molen/prefab@1",
10
+ "components": {
11
+ "transform": {
12
+ "pos": [
13
+ 0,
14
+ 0,
15
+ 0
16
+ ],
17
+ "rot": [
18
+ 0,
19
+ 0,
20
+ 0,
21
+ 1
22
+ ]
23
+ },
24
+ "health": {
25
+ "hp": 10
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/prefab@1",
41
+ "description": "Format envelope 'molen/prefab@1' (optional when the prefab is inlined in a scene)."
42
+ },
43
+ "extends": {
44
+ "type": "string",
45
+ "minLength": 1,
46
+ "description": "Name of a prefab in the same manifest to inherit components from (deep-merged)."
47
+ },
48
+ "type": {
49
+ "type": "string",
50
+ "pattern": "^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+$",
51
+ "description": "Project-registry type id this prefab specializes, e.g. 'train.locomotive'."
52
+ },
53
+ "components": {
54
+ "default": {},
55
+ "type": "object",
56
+ "propertyNames": {
57
+ "type": "string"
58
+ },
59
+ "additionalProperties": {
60
+ "type": "object",
61
+ "propertyNames": {
62
+ "type": "string"
63
+ },
64
+ "additionalProperties": {
65
+ "$ref": "#/$defs/__schema0"
66
+ }
67
+ },
68
+ "description": "Component name to pure-JSON component data (deep-merged over the extends/type base)."
69
+ }
70
+ },
71
+ "additionalProperties": false,
72
+ "$defs": {
73
+ "__schema0": {
74
+ "anyOf": [
75
+ {
76
+ "type": "string"
77
+ },
78
+ {
79
+ "type": "number"
80
+ },
81
+ {
82
+ "type": "boolean"
83
+ },
84
+ {
85
+ "type": "null"
86
+ },
87
+ {
88
+ "type": "array",
89
+ "items": {
90
+ "$ref": "#/$defs/__schema0"
91
+ }
92
+ },
93
+ {
94
+ "type": "object",
95
+ "propertyNames": {
96
+ "type": "string"
97
+ },
98
+ "additionalProperties": {
99
+ "$ref": "#/$defs/__schema0"
100
+ }
101
+ }
102
+ ]
103
+ }
104
+ }
105
+ }
106
+ ```