@ludic-labs/assembly 0.0.0-stage → 0.4.0

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 (78) hide show
  1. package/CHANGELOG.md +78 -0
  2. package/LICENSE +2 -0
  3. package/README.md +50 -2
  4. package/dist/bake.d.ts +80 -0
  5. package/dist/bake.js +214 -0
  6. package/dist/browser.d.ts +89 -0
  7. package/dist/browser.js +534 -0
  8. package/dist/compat.d.ts +17 -0
  9. package/dist/compat.js +153 -0
  10. package/dist/compiler.d.ts +18 -0
  11. package/dist/compiler.js +1264 -0
  12. package/dist/diagnostics.d.ts +5 -0
  13. package/dist/diagnostics.js +8 -0
  14. package/dist/export.d.ts +54 -0
  15. package/dist/export.js +272 -0
  16. package/dist/index.d.ts +4 -0
  17. package/dist/index.js +3 -0
  18. package/dist/legacy.d.ts +36 -0
  19. package/dist/legacy.js +180 -0
  20. package/dist/math.d.ts +16 -0
  21. package/dist/math.js +62 -0
  22. package/dist/mesh.d.ts +11 -0
  23. package/dist/mesh.js +153 -0
  24. package/dist/motion.d.ts +63 -0
  25. package/dist/motion.js +1476 -0
  26. package/dist/pixel.d.ts +268 -0
  27. package/dist/pixel.js +942 -0
  28. package/dist/required.d.ts +2 -0
  29. package/dist/required.js +6 -0
  30. package/dist/shapes.d.ts +71 -0
  31. package/dist/shapes.js +396 -0
  32. package/dist/sprite-brief.d.ts +5 -0
  33. package/dist/sprite-brief.js +47 -0
  34. package/dist/sprite-compiler.d.ts +62 -0
  35. package/dist/sprite-compiler.js +1745 -0
  36. package/dist/sprite-decompile.d.ts +68 -0
  37. package/dist/sprite-decompile.js +786 -0
  38. package/dist/sprite-format.d.ts +4 -0
  39. package/dist/sprite-format.js +155 -0
  40. package/dist/sprite-guide.d.ts +40 -0
  41. package/dist/sprite-guide.js +330 -0
  42. package/dist/sprite-scene.d.ts +277 -0
  43. package/dist/sprite-scene.js +664 -0
  44. package/dist/sprite-types.d.ts +110 -0
  45. package/dist/sprite-types.js +1 -0
  46. package/dist/sprite.d.ts +8 -0
  47. package/dist/sprite.js +8 -0
  48. package/dist/svg/schema.d.ts +71 -0
  49. package/dist/svg/schema.js +217 -0
  50. package/dist/svg/types.d.ts +148 -0
  51. package/dist/svg/types.js +1 -0
  52. package/dist/svg.d.ts +26 -0
  53. package/dist/svg.js +539 -0
  54. package/dist/text.d.ts +12 -0
  55. package/dist/text.js +75 -0
  56. package/dist/types.d.ts +478 -0
  57. package/dist/types.js +1 -0
  58. package/docs/svg/README.md +150 -0
  59. package/docs/svg/specification.md +108 -0
  60. package/examples/svg/arcane-shield.json +261 -0
  61. package/examples/svg/aurora-ribbon.json +158 -0
  62. package/examples/svg/bouncing-ember.json +76 -0
  63. package/examples/svg/ember-fountain.json +224 -0
  64. package/examples/svg/lantern-keeper.json +1159 -0
  65. package/examples/svg/night-workshop.json +1120 -0
  66. package/examples/svg/waygate-platform.json +64 -0
  67. package/examples/svg/waygate-spark.json +92 -0
  68. package/examples/svg/waygate-wisp.json +105 -0
  69. package/examples/svg/waygate.json +485 -0
  70. package/package.json +132 -4
  71. package/schemas/asset-assembly-0.1.schema.json +354 -0
  72. package/schemas/asset-assembly-0.2.schema.json +429 -0
  73. package/schemas/asset-assembly-0.3.schema.json +572 -0
  74. package/schemas/motion-set-0.1.schema.json +178 -0
  75. package/schemas/pixel-sprite-0.1.schema.json +892 -0
  76. package/schemas/pixel-sprite-scene-0.1.schema.json +149 -0
  77. package/schemas/svg-asset-0.1.schema.json +1157 -0
  78. package/tools/svg-asset.mjs +106 -0
@@ -0,0 +1,572 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://libraries.ludic-assembly.victorqueiroz.dev/schema-0.3.json",
4
+ "title": "Ludic Assembly 0.3",
5
+ "description": "Structural schema for 0.3 assemblies: everything in 0.2 plus part rotations, line/grid/radial arrays, sided round shapes, spheres, ellipsoids, cones, wedges, lathes and extrusions. Use validateAsset for references, bounds, outlines and geometry.",
6
+ "type": "object",
7
+ "properties": {
8
+ "schema": { "const": "asset-assembly/0.3" },
9
+ "units": { "enum": ["meters", "tiles"] },
10
+ "parameters": {
11
+ "type": "object",
12
+ "minProperties": 0,
13
+ "maxProperties": 256,
14
+ "propertyNames": { "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,79}$" },
15
+ "additionalProperties": { "type": "number" }
16
+ },
17
+ "materials": {
18
+ "type": "object",
19
+ "minProperties": 1,
20
+ "maxProperties": 256,
21
+ "propertyNames": { "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,79}$" },
22
+ "additionalProperties": {
23
+ "type": "object",
24
+ "properties": {
25
+ "color": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" },
26
+ "tintable": { "type": "boolean" }
27
+ },
28
+ "required": ["color"],
29
+ "additionalProperties": false
30
+ }
31
+ },
32
+ "groups": {
33
+ "type": "object",
34
+ "minProperties": 0,
35
+ "maxProperties": 256,
36
+ "propertyNames": { "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,79}$" },
37
+ "additionalProperties": {
38
+ "type": "object",
39
+ "properties": { "parent": { "type": "string" }, "position": { "$ref": "#/$defs/point" } },
40
+ "required": ["position"],
41
+ "additionalProperties": false
42
+ }
43
+ },
44
+ "parts": {
45
+ "type": "object",
46
+ "minProperties": 1,
47
+ "maxProperties": 256,
48
+ "propertyNames": { "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,79}$" },
49
+ "additionalProperties": {
50
+ "type": "object",
51
+ "properties": {
52
+ "shape": {
53
+ "oneOf": [
54
+ {
55
+ "type": "object",
56
+ "properties": {
57
+ "type": { "const": "box" },
58
+ "size": {
59
+ "type": "object",
60
+ "properties": {
61
+ "width": { "$ref": "#/$defs/scalar" },
62
+ "height": { "$ref": "#/$defs/scalar" },
63
+ "depth": { "$ref": "#/$defs/scalar" }
64
+ },
65
+ "required": ["width", "height", "depth"],
66
+ "additionalProperties": false
67
+ },
68
+ "bevel": { "$ref": "#/$defs/scalar" }
69
+ },
70
+ "required": ["type", "size"],
71
+ "additionalProperties": false
72
+ },
73
+ {
74
+ "type": "object",
75
+ "properties": {
76
+ "type": { "const": "cylinder" },
77
+ "radius": { "$ref": "#/$defs/scalar" },
78
+ "height": { "$ref": "#/$defs/scalar" },
79
+ "sides": { "type": "integer", "minimum": 3, "maximum": 32 }
80
+ },
81
+ "required": ["type", "radius", "height"],
82
+ "additionalProperties": false
83
+ },
84
+ {
85
+ "type": "object",
86
+ "properties": {
87
+ "type": { "const": "funnel" },
88
+ "bottomRadius": { "$ref": "#/$defs/scalar" },
89
+ "topRadius": { "$ref": "#/$defs/scalar" },
90
+ "height": { "$ref": "#/$defs/scalar" },
91
+ "sides": { "type": "integer", "minimum": 3, "maximum": 32 }
92
+ },
93
+ "required": ["type", "bottomRadius", "topRadius", "height"],
94
+ "additionalProperties": false
95
+ },
96
+ {
97
+ "type": "object",
98
+ "properties": {
99
+ "type": { "const": "beam" },
100
+ "from": { "$ref": "#/$defs/point" },
101
+ "to": { "$ref": "#/$defs/point" },
102
+ "width": { "$ref": "#/$defs/scalar" }
103
+ },
104
+ "required": ["type", "from", "to", "width"],
105
+ "additionalProperties": false
106
+ },
107
+ {
108
+ "type": "object",
109
+ "properties": {
110
+ "type": { "const": "tube" },
111
+ "from": { "$ref": "#/$defs/point" },
112
+ "to": { "$ref": "#/$defs/point" },
113
+ "radius": { "$ref": "#/$defs/scalar" },
114
+ "sides": { "type": "integer", "minimum": 3, "maximum": 32 }
115
+ },
116
+ "required": ["type", "from", "to", "radius"],
117
+ "additionalProperties": false
118
+ },
119
+ {
120
+ "type": "object",
121
+ "properties": {
122
+ "type": { "const": "coil" },
123
+ "radius": { "$ref": "#/$defs/scalar" },
124
+ "thickness": { "$ref": "#/$defs/scalar" },
125
+ "sides": { "type": "integer", "minimum": 3, "maximum": 32 }
126
+ },
127
+ "required": ["type", "radius", "thickness"],
128
+ "additionalProperties": false
129
+ },
130
+ {
131
+ "type": "object",
132
+ "properties": {
133
+ "type": { "const": "sphere" },
134
+ "radius": { "$ref": "#/$defs/scalar" },
135
+ "sides": { "type": "integer", "minimum": 3, "maximum": 32 }
136
+ },
137
+ "required": ["type", "radius"],
138
+ "additionalProperties": false
139
+ },
140
+ {
141
+ "type": "object",
142
+ "properties": {
143
+ "type": { "const": "ellipsoid" },
144
+ "size": {
145
+ "type": "object",
146
+ "properties": {
147
+ "width": { "$ref": "#/$defs/scalar" },
148
+ "height": { "$ref": "#/$defs/scalar" },
149
+ "depth": { "$ref": "#/$defs/scalar" }
150
+ },
151
+ "required": ["width", "height", "depth"],
152
+ "additionalProperties": false
153
+ },
154
+ "sides": { "type": "integer", "minimum": 3, "maximum": 32 }
155
+ },
156
+ "required": ["type", "size"],
157
+ "additionalProperties": false
158
+ },
159
+ {
160
+ "type": "object",
161
+ "properties": {
162
+ "type": { "const": "cone" },
163
+ "radius": { "$ref": "#/$defs/scalar" },
164
+ "height": { "$ref": "#/$defs/scalar" },
165
+ "sides": { "type": "integer", "minimum": 3, "maximum": 32 }
166
+ },
167
+ "required": ["type", "radius", "height"],
168
+ "additionalProperties": false
169
+ },
170
+ {
171
+ "type": "object",
172
+ "properties": {
173
+ "type": { "const": "wedge" },
174
+ "size": {
175
+ "type": "object",
176
+ "properties": {
177
+ "width": { "$ref": "#/$defs/scalar" },
178
+ "height": { "$ref": "#/$defs/scalar" },
179
+ "depth": { "$ref": "#/$defs/scalar" }
180
+ },
181
+ "required": ["width", "height", "depth"],
182
+ "additionalProperties": false
183
+ }
184
+ },
185
+ "required": ["type", "size"],
186
+ "additionalProperties": false
187
+ },
188
+ {
189
+ "type": "object",
190
+ "properties": {
191
+ "type": { "const": "lathe" },
192
+ "profile": {
193
+ "type": "array",
194
+ "minItems": 2,
195
+ "maxItems": 64,
196
+ "items": {
197
+ "type": "object",
198
+ "properties": {
199
+ "radius": { "$ref": "#/$defs/scalar" },
200
+ "y": { "$ref": "#/$defs/scalar" }
201
+ },
202
+ "required": ["radius", "y"],
203
+ "additionalProperties": false
204
+ }
205
+ },
206
+ "sides": { "type": "integer", "minimum": 3, "maximum": 32 }
207
+ },
208
+ "required": ["type", "profile"],
209
+ "additionalProperties": false
210
+ },
211
+ {
212
+ "type": "object",
213
+ "properties": {
214
+ "type": { "const": "extrude" },
215
+ "outline": {
216
+ "type": "array",
217
+ "minItems": 3,
218
+ "maxItems": 64,
219
+ "items": {
220
+ "type": "object",
221
+ "properties": { "x": { "$ref": "#/$defs/scalar" }, "z": { "$ref": "#/$defs/scalar" } },
222
+ "required": ["x", "z"],
223
+ "additionalProperties": false
224
+ }
225
+ },
226
+ "height": { "$ref": "#/$defs/scalar" }
227
+ },
228
+ "required": ["type", "outline", "height"],
229
+ "additionalProperties": false
230
+ }
231
+ ]
232
+ },
233
+ "material": { "type": "string" },
234
+ "placement": {
235
+ "oneOf": [
236
+ {
237
+ "type": "object",
238
+ "properties": {
239
+ "type": { "const": "absolute" },
240
+ "selfAnchor": { "type": "string" },
241
+ "position": { "$ref": "#/$defs/point" }
242
+ },
243
+ "required": ["type", "selfAnchor", "position"],
244
+ "additionalProperties": false
245
+ },
246
+ {
247
+ "type": "object",
248
+ "properties": {
249
+ "type": { "const": "attach" },
250
+ "selfAnchor": { "type": "string" },
251
+ "target": {
252
+ "type": "object",
253
+ "properties": { "part": { "type": "string" }, "anchor": { "type": "string" } },
254
+ "required": ["part", "anchor"],
255
+ "additionalProperties": false
256
+ },
257
+ "offset": { "$ref": "#/$defs/point" }
258
+ },
259
+ "required": ["type", "selfAnchor", "target"],
260
+ "additionalProperties": false
261
+ },
262
+ {
263
+ "type": "object",
264
+ "properties": {
265
+ "type": { "const": "repeat" },
266
+ "pattern": { "const": "corners" },
267
+ "selfAnchor": { "type": "string" },
268
+ "target": {
269
+ "type": "object",
270
+ "properties": { "part": { "type": "string" }, "face": { "enum": ["top", "bottom"] } },
271
+ "required": ["part", "face"],
272
+ "additionalProperties": false
273
+ },
274
+ "edgeInset": {
275
+ "type": "object",
276
+ "properties": { "x": { "$ref": "#/$defs/scalar" }, "z": { "$ref": "#/$defs/scalar" } },
277
+ "required": ["x", "z"],
278
+ "additionalProperties": false
279
+ }
280
+ },
281
+ "required": ["type", "pattern", "selfAnchor", "target", "edgeInset"],
282
+ "additionalProperties": false
283
+ }
284
+ ]
285
+ },
286
+ "parent": { "type": "string" },
287
+ "anchors": {
288
+ "type": "object",
289
+ "minProperties": 0,
290
+ "maxProperties": 256,
291
+ "propertyNames": { "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,79}$" },
292
+ "additionalProperties": { "$ref": "#/$defs/point" }
293
+ },
294
+ "joint": { "type": "string" },
295
+ "sides": { "const": "both" },
296
+ "slot": { "type": "string" },
297
+ "option": { "type": "string" },
298
+ "when": {
299
+ "type": "object",
300
+ "minProperties": 0,
301
+ "maxProperties": 256,
302
+ "propertyNames": { "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,79}$" },
303
+ "additionalProperties": {
304
+ "type": "array",
305
+ "minItems": 1,
306
+ "uniqueItems": true,
307
+ "items": { "type": "string", "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,79}$" }
308
+ }
309
+ },
310
+ "rotation": {
311
+ "type": "object",
312
+ "properties": {
313
+ "x": { "$ref": "#/$defs/scalar" },
314
+ "y": { "$ref": "#/$defs/scalar" },
315
+ "z": { "$ref": "#/$defs/scalar" }
316
+ },
317
+ "additionalProperties": false,
318
+ "minProperties": 1
319
+ },
320
+ "array": {
321
+ "oneOf": [
322
+ {
323
+ "type": "object",
324
+ "properties": {
325
+ "type": { "const": "line" },
326
+ "count": { "type": "integer", "minimum": 2, "maximum": 256 },
327
+ "step": { "$ref": "#/$defs/point" },
328
+ "centered": { "type": "boolean" }
329
+ },
330
+ "required": ["type", "count", "step"],
331
+ "additionalProperties": false
332
+ },
333
+ {
334
+ "type": "object",
335
+ "properties": {
336
+ "type": { "const": "grid" },
337
+ "count": {
338
+ "type": "object",
339
+ "properties": {
340
+ "x": { "type": "integer", "minimum": 1, "maximum": 256 },
341
+ "y": { "type": "integer", "minimum": 1, "maximum": 256 },
342
+ "z": { "type": "integer", "minimum": 1, "maximum": 256 }
343
+ },
344
+ "additionalProperties": false
345
+ },
346
+ "spacing": {
347
+ "type": "object",
348
+ "properties": {
349
+ "x": { "$ref": "#/$defs/scalar" },
350
+ "y": { "$ref": "#/$defs/scalar" },
351
+ "z": { "$ref": "#/$defs/scalar" }
352
+ },
353
+ "additionalProperties": false
354
+ },
355
+ "centered": { "type": "boolean" }
356
+ },
357
+ "required": ["type", "count", "spacing"],
358
+ "additionalProperties": false
359
+ },
360
+ {
361
+ "type": "object",
362
+ "properties": {
363
+ "type": { "const": "radial" },
364
+ "count": { "type": "integer", "minimum": 2, "maximum": 256 },
365
+ "radius": { "$ref": "#/$defs/scalar" },
366
+ "axis": { "enum": ["x", "y", "z"] },
367
+ "start": { "$ref": "#/$defs/scalar" },
368
+ "sweep": { "$ref": "#/$defs/scalar" },
369
+ "orient": { "type": "boolean" }
370
+ },
371
+ "required": ["type", "count", "radius"],
372
+ "additionalProperties": false
373
+ }
374
+ ]
375
+ }
376
+ },
377
+ "required": ["shape", "material", "placement"],
378
+ "additionalProperties": false,
379
+ "dependentRequired": { "slot": ["option"], "option": ["slot"] }
380
+ }
381
+ },
382
+ "groundPivot": { "$ref": "#/$defs/point" },
383
+ "joints": {
384
+ "type": "object",
385
+ "minProperties": 0,
386
+ "maxProperties": 256,
387
+ "propertyNames": { "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,79}$" },
388
+ "additionalProperties": {
389
+ "type": "object",
390
+ "properties": {
391
+ "parent": { "type": "string" },
392
+ "sides": { "const": "both" },
393
+ "face": { "type": "boolean" },
394
+ "pivot": {
395
+ "oneOf": [
396
+ {
397
+ "type": "object",
398
+ "properties": { "part": { "type": "string" }, "anchor": { "type": "string" } },
399
+ "required": ["part", "anchor"],
400
+ "additionalProperties": false
401
+ },
402
+ {
403
+ "type": "object",
404
+ "properties": { "position": { "$ref": "#/$defs/point" } },
405
+ "required": ["position"],
406
+ "additionalProperties": false
407
+ }
408
+ ]
409
+ },
410
+ "dofs": { "type": "array", "minItems": 1, "maxItems": 3, "items": { "$ref": "#/$defs/dof" } }
411
+ },
412
+ "required": ["pivot", "dofs"],
413
+ "additionalProperties": false
414
+ }
415
+ },
416
+ "limbs": {
417
+ "type": "object",
418
+ "minProperties": 0,
419
+ "maxProperties": 256,
420
+ "propertyNames": { "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,79}$" },
421
+ "additionalProperties": {
422
+ "type": "object",
423
+ "properties": {
424
+ "sides": { "const": "both" },
425
+ "effector": {
426
+ "type": "object",
427
+ "properties": { "part": { "type": "string" }, "anchor": { "type": "string" } },
428
+ "required": ["part", "anchor"],
429
+ "additionalProperties": false
430
+ },
431
+ "reach": { "type": "array", "minItems": 1, "maxItems": 3, "items": { "$ref": "#/$defs/dofRef" } },
432
+ "level": { "$ref": "#/$defs/dofRef" }
433
+ },
434
+ "required": ["effector", "reach"],
435
+ "additionalProperties": false
436
+ }
437
+ },
438
+ "states": {
439
+ "type": "object",
440
+ "minProperties": 0,
441
+ "maxProperties": 256,
442
+ "propertyNames": { "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,79}$" },
443
+ "additionalProperties": {
444
+ "type": "array",
445
+ "minItems": 2,
446
+ "maxItems": 16,
447
+ "uniqueItems": true,
448
+ "items": { "type": "string", "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,79}$" }
449
+ }
450
+ },
451
+ "slots": {
452
+ "type": "object",
453
+ "minProperties": 0,
454
+ "maxProperties": 256,
455
+ "propertyNames": { "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,79}$" },
456
+ "additionalProperties": {
457
+ "type": "array",
458
+ "minItems": 1,
459
+ "maxItems": 32,
460
+ "uniqueItems": true,
461
+ "items": { "type": "string", "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,79}$" }
462
+ }
463
+ },
464
+ "identities": {
465
+ "type": "object",
466
+ "minProperties": 0,
467
+ "maxProperties": 256,
468
+ "propertyNames": { "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,79}$" },
469
+ "additionalProperties": {
470
+ "type": "object",
471
+ "properties": {
472
+ "parameters": {
473
+ "type": "object",
474
+ "minProperties": 0,
475
+ "maxProperties": 256,
476
+ "propertyNames": { "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,79}$" },
477
+ "additionalProperties": { "type": "number" }
478
+ },
479
+ "materials": {
480
+ "type": "object",
481
+ "minProperties": 0,
482
+ "maxProperties": 256,
483
+ "propertyNames": { "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,79}$" },
484
+ "additionalProperties": {
485
+ "type": "object",
486
+ "properties": { "color": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" } },
487
+ "required": ["color"],
488
+ "additionalProperties": false
489
+ }
490
+ },
491
+ "slots": {
492
+ "type": "object",
493
+ "minProperties": 0,
494
+ "maxProperties": 256,
495
+ "propertyNames": { "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,79}$" },
496
+ "additionalProperties": { "type": "string", "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,79}$" }
497
+ }
498
+ },
499
+ "additionalProperties": false
500
+ }
501
+ }
502
+ },
503
+ "required": ["schema", "units", "materials", "parts"],
504
+ "additionalProperties": false,
505
+ "$defs": {
506
+ "scalar": {
507
+ "oneOf": [
508
+ { "type": "number" },
509
+ {
510
+ "type": "object",
511
+ "properties": { "parameter": { "type": "string" } },
512
+ "required": ["parameter"],
513
+ "additionalProperties": false
514
+ }
515
+ ]
516
+ },
517
+ "point": {
518
+ "type": "object",
519
+ "properties": {
520
+ "x": { "$ref": "#/$defs/scalar" },
521
+ "y": { "$ref": "#/$defs/scalar" },
522
+ "z": { "$ref": "#/$defs/scalar" }
523
+ },
524
+ "required": ["x", "y", "z"],
525
+ "additionalProperties": false
526
+ },
527
+ "dofRef": {
528
+ "type": "object",
529
+ "properties": { "joint": { "type": "string" }, "dof": { "type": "string" } },
530
+ "required": ["joint", "dof"],
531
+ "additionalProperties": false
532
+ },
533
+ "dof": {
534
+ "type": "object",
535
+ "properties": {
536
+ "name": { "type": "string", "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,79}$" },
537
+ "axis": { "enum": ["+x", "-x", "+y", "-y", "+z", "-z"] },
538
+ "limits": {
539
+ "type": "array",
540
+ "prefixItems": [
541
+ { "type": "number", "minimum": -3600, "maximum": 0 },
542
+ { "type": "number", "minimum": 0, "maximum": 3600 }
543
+ ],
544
+ "minItems": 2,
545
+ "maxItems": 2
546
+ },
547
+ "continuous": { "type": "boolean" }
548
+ },
549
+ "required": ["name", "axis", "limits"],
550
+ "additionalProperties": false,
551
+ "if": {
552
+ "type": "object",
553
+ "properties": { "continuous": { "const": true } },
554
+ "required": ["continuous"]
555
+ },
556
+ "else": {
557
+ "type": "object",
558
+ "properties": {
559
+ "limits": {
560
+ "type": "array",
561
+ "prefixItems": [
562
+ { "type": "number", "minimum": -360, "maximum": 0 },
563
+ { "type": "number", "minimum": 0, "maximum": 360 }
564
+ ],
565
+ "minItems": 2,
566
+ "maxItems": 2
567
+ }
568
+ }
569
+ }
570
+ }
571
+ }
572
+ }