@hyprune/schema 0.5.2 → 0.7.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.
@@ -0,0 +1,1713 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://hyprune.com/schema/v0.10/object.schema.json",
4
+ "title": "Hyprune object manifest 0.10 (DRAFT until world format 0.10): adds the mover trait, the RFC-0013 machine trait and the slot additions",
5
+ "type": "object",
6
+ "properties": {
7
+ "formatVersion": {
8
+ "const": "0.10"
9
+ },
10
+ "id": {
11
+ "$ref": "../v0.8/common.schema.json#/$defs/slug"
12
+ },
13
+ "version": {
14
+ "$ref": "../v0.8/common.schema.json#/$defs/version"
15
+ },
16
+ "name": {
17
+ "type": "string",
18
+ "minLength": 1,
19
+ "maxLength": 64,
20
+ "pattern": "^[^\\u0000-\\u001f\\u007f]+$"
21
+ },
22
+ "description": {
23
+ "type": "string",
24
+ "maxLength": 512
25
+ },
26
+ "category": {
27
+ "enum": [
28
+ "furniture",
29
+ "lighting",
30
+ "plants",
31
+ "signage",
32
+ "machines",
33
+ "decor",
34
+ "characters",
35
+ "vehicles",
36
+ "other"
37
+ ]
38
+ },
39
+ "tags": {
40
+ "type": "array",
41
+ "items": {
42
+ "$ref": "../v0.8/common.schema.json#/$defs/slug"
43
+ },
44
+ "minItems": 0,
45
+ "maxItems": 8,
46
+ "uniqueItems": true
47
+ },
48
+ "scene": {
49
+ "allOf": [
50
+ {
51
+ "$ref": "../v0.8/common.schema.json#/$defs/path"
52
+ },
53
+ {
54
+ "type": "string",
55
+ "pattern": "\\.(gltf|glb)$"
56
+ }
57
+ ]
58
+ },
59
+ "license": {
60
+ "type": "string",
61
+ "minLength": 1,
62
+ "maxLength": 256
63
+ },
64
+ "attribution": {
65
+ "type": "array",
66
+ "items": {
67
+ "type": "object",
68
+ "properties": {
69
+ "path": {
70
+ "anyOf": [
71
+ {
72
+ "$ref": "../v0.8/common.schema.json#/$defs/path"
73
+ },
74
+ {
75
+ "const": "."
76
+ }
77
+ ]
78
+ },
79
+ "author": {
80
+ "type": "string",
81
+ "minLength": 1,
82
+ "maxLength": 256
83
+ },
84
+ "license": {
85
+ "type": "string",
86
+ "minLength": 1,
87
+ "maxLength": 256
88
+ },
89
+ "source": {
90
+ "type": "string",
91
+ "minLength": 1,
92
+ "maxLength": 2048,
93
+ "pattern": "^https://"
94
+ }
95
+ },
96
+ "required": [
97
+ "path",
98
+ "author",
99
+ "license"
100
+ ],
101
+ "additionalProperties": false
102
+ },
103
+ "minItems": 1,
104
+ "maxItems": 64
105
+ },
106
+ "bounds": {
107
+ "type": "object",
108
+ "properties": {
109
+ "min": {
110
+ "$ref": "../v0.8/common.schema.json#/$defs/vec3"
111
+ },
112
+ "max": {
113
+ "$ref": "../v0.8/common.schema.json#/$defs/vec3"
114
+ }
115
+ },
116
+ "required": [
117
+ "min",
118
+ "max"
119
+ ],
120
+ "additionalProperties": false,
121
+ "description": "Rest-pose AABB in asset space (metres, +Y up, front +Z)."
122
+ },
123
+ "thumbnail": {
124
+ "allOf": [
125
+ {
126
+ "$ref": "../v0.8/common.schema.json#/$defs/path"
127
+ },
128
+ {
129
+ "type": "string",
130
+ "pattern": "\\.png$"
131
+ }
132
+ ],
133
+ "description": "PNG, 256 x 256, at most 256 KiB."
134
+ },
135
+ "lighting": {
136
+ "type": "object",
137
+ "properties": {
138
+ "mode": {
139
+ "enum": [
140
+ "probe",
141
+ "unlit"
142
+ ]
143
+ }
144
+ },
145
+ "required": [
146
+ "mode"
147
+ ],
148
+ "additionalProperties": false
149
+ },
150
+ "traits": {
151
+ "type": "object",
152
+ "properties": {
153
+ "decorative": {
154
+ "type": "object",
155
+ "properties": {
156
+ "animations": {
157
+ "type": "array",
158
+ "items": {
159
+ "$ref": "#/$defs/animation"
160
+ },
161
+ "minItems": 1,
162
+ "maxItems": 16
163
+ }
164
+ },
165
+ "required": [
166
+ "animations"
167
+ ],
168
+ "additionalProperties": false
169
+ },
170
+ "collidable": {
171
+ "type": "object",
172
+ "properties": {
173
+ "node": {
174
+ "type": "string",
175
+ "minLength": 1,
176
+ "maxLength": 128
177
+ }
178
+ },
179
+ "required": [
180
+ "node"
181
+ ],
182
+ "additionalProperties": false,
183
+ "description": "The 0.8 static collision proxy: a mesh node, not animated, not in an animated subtree."
184
+ },
185
+ "movable": {
186
+ "type": "object",
187
+ "properties": {
188
+ "surfaces": {
189
+ "type": "array",
190
+ "items": {
191
+ "enum": [
192
+ "floor",
193
+ "wall",
194
+ "ceiling",
195
+ "any"
196
+ ]
197
+ },
198
+ "minItems": 1,
199
+ "maxItems": 4,
200
+ "uniqueItems": true
201
+ },
202
+ "upright": {
203
+ "type": "boolean"
204
+ },
205
+ "scale": {
206
+ "type": "array",
207
+ "items": {
208
+ "type": "number",
209
+ "maximum": 4,
210
+ "minimum": 0.25
211
+ },
212
+ "minItems": 2,
213
+ "maxItems": 2
214
+ }
215
+ },
216
+ "additionalProperties": false,
217
+ "description": "Offered for user placement. Defaults: surfaces [\"floor\"], upright true for floor and ceiling, scale [1, 1]."
218
+ },
219
+ "character": {
220
+ "type": "object",
221
+ "properties": {
222
+ "clips": {
223
+ "type": "object",
224
+ "propertyNames": {
225
+ "type": "string",
226
+ "minLength": 1,
227
+ "maxLength": 64,
228
+ "pattern": "^[a-z][a-z0-9_]*$"
229
+ },
230
+ "properties": {
231
+ "walk": {
232
+ "type": "object",
233
+ "properties": {
234
+ "speed": {
235
+ "type": "number",
236
+ "maximum": 15,
237
+ "exclusiveMinimum": 0.05
238
+ },
239
+ "seatHeight": {
240
+ "type": "number",
241
+ "maximum": 1,
242
+ "minimum": 0.2
243
+ }
244
+ },
245
+ "additionalProperties": false,
246
+ "description": "Values the import step measured; speed must match the clip's extras.speed within 2%."
247
+ },
248
+ "idle": {
249
+ "type": "object",
250
+ "properties": {
251
+ "speed": {
252
+ "type": "number",
253
+ "maximum": 15,
254
+ "exclusiveMinimum": 0.05
255
+ },
256
+ "seatHeight": {
257
+ "type": "number",
258
+ "maximum": 1,
259
+ "minimum": 0.2
260
+ }
261
+ },
262
+ "additionalProperties": false,
263
+ "description": "Values the import step measured; speed must match the clip's extras.speed within 2%."
264
+ }
265
+ },
266
+ "additionalProperties": {
267
+ "type": "object",
268
+ "properties": {
269
+ "speed": {
270
+ "type": "number",
271
+ "maximum": 15,
272
+ "exclusiveMinimum": 0.05
273
+ },
274
+ "seatHeight": {
275
+ "type": "number",
276
+ "maximum": 1,
277
+ "minimum": 0.2
278
+ }
279
+ },
280
+ "additionalProperties": false,
281
+ "description": "Values the import step measured; speed must match the clip's extras.speed within 2%."
282
+ },
283
+ "required": [
284
+ "walk",
285
+ "idle"
286
+ ],
287
+ "maxProperties": 64
288
+ },
289
+ "height": {
290
+ "type": "number",
291
+ "maximum": 2.2,
292
+ "minimum": 1.2
293
+ },
294
+ "radius": {
295
+ "type": "number",
296
+ "maximum": 0.5,
297
+ "minimum": 0.25
298
+ },
299
+ "accent": {
300
+ "type": "boolean"
301
+ },
302
+ "interactions": {
303
+ "type": "array",
304
+ "items": {
305
+ "$ref": "#/$defs/interaction"
306
+ },
307
+ "minItems": 1,
308
+ "maxItems": 8
309
+ }
310
+ },
311
+ "required": [
312
+ "clips",
313
+ "height"
314
+ ],
315
+ "additionalProperties": false,
316
+ "description": "RFC-0010 character: clips with measured values (walk and idle required), height and radius in metres."
317
+ },
318
+ "seat": {
319
+ "type": "object",
320
+ "properties": {
321
+ "anchors": {
322
+ "type": "array",
323
+ "items": {
324
+ "$ref": "#/$defs/seatAnchor"
325
+ },
326
+ "minItems": 1,
327
+ "maxItems": 8
328
+ },
329
+ "capacity": {
330
+ "type": "integer",
331
+ "minimum": 1,
332
+ "maximum": 8
333
+ }
334
+ },
335
+ "required": [
336
+ "anchors"
337
+ ],
338
+ "additionalProperties": false
339
+ },
340
+ "mover": {
341
+ "type": "object",
342
+ "properties": {
343
+ "speed": {
344
+ "type": "number",
345
+ "maximum": 30,
346
+ "exclusiveMinimum": 0.05
347
+ },
348
+ "accel": {
349
+ "type": "number",
350
+ "maximum": 20,
351
+ "minimum": 0.1
352
+ },
353
+ "bank": {
354
+ "type": "object",
355
+ "properties": {
356
+ "max": {
357
+ "type": "number",
358
+ "maximum": 45,
359
+ "minimum": 0
360
+ },
361
+ "gain": {
362
+ "type": "number",
363
+ "maximum": 10,
364
+ "minimum": 0
365
+ }
366
+ },
367
+ "required": [
368
+ "max",
369
+ "gain"
370
+ ],
371
+ "additionalProperties": false
372
+ },
373
+ "pitch": {
374
+ "enum": [
375
+ "follow",
376
+ "level"
377
+ ]
378
+ },
379
+ "offset": {
380
+ "$ref": "../v0.8/common.schema.json#/$defs/vec3"
381
+ },
382
+ "item": {
383
+ "type": "boolean"
384
+ }
385
+ },
386
+ "required": [
387
+ "speed"
388
+ ],
389
+ "additionalProperties": false,
390
+ "description": "Rides track paths; item: true makes it a pooled item (at most 2,000 triangles, 1 MiB)."
391
+ },
392
+ "machine": {
393
+ "type": "object",
394
+ "properties": {
395
+ "primary": {
396
+ "type": "string",
397
+ "minLength": 1,
398
+ "maxLength": 32,
399
+ "pattern": "^[a-z][A-Za-z0-9]*$"
400
+ },
401
+ "inputs": {
402
+ "type": "array",
403
+ "items": {
404
+ "$ref": "#/$defs/input"
405
+ },
406
+ "minItems": 1,
407
+ "maxItems": 16
408
+ },
409
+ "drives": {
410
+ "type": "array",
411
+ "items": {
412
+ "type": "object",
413
+ "properties": {
414
+ "input": {
415
+ "type": "string",
416
+ "minLength": 1,
417
+ "maxLength": 40,
418
+ "pattern": "^[a-z][A-Za-z0-9]*(\\.[1-9][0-9]?)?$"
419
+ },
420
+ "target": {
421
+ "type": "string",
422
+ "maxLength": 160,
423
+ "pattern": "^(animation|state|emission|label|visible|count|spawn|effect|position):[^:\\s]{1,128}$"
424
+ },
425
+ "map": {
426
+ "$ref": "#/$defs/mapping"
427
+ }
428
+ },
429
+ "required": [
430
+ "input",
431
+ "target"
432
+ ],
433
+ "additionalProperties": false
434
+ },
435
+ "minItems": 0,
436
+ "maxItems": 32
437
+ },
438
+ "positions": {
439
+ "type": "array",
440
+ "items": {
441
+ "type": "object",
442
+ "properties": {
443
+ "node": {
444
+ "type": "string",
445
+ "minLength": 1,
446
+ "maxLength": 128
447
+ },
448
+ "range": {
449
+ "type": "array",
450
+ "items": {
451
+ "type": "number",
452
+ "maximum": 4,
453
+ "minimum": 0
454
+ },
455
+ "minItems": 2,
456
+ "maxItems": 2
457
+ }
458
+ },
459
+ "required": [
460
+ "node",
461
+ "range"
462
+ ],
463
+ "additionalProperties": false
464
+ },
465
+ "minItems": 1,
466
+ "maxItems": 16
467
+ },
468
+ "recipes": {
469
+ "type": "array",
470
+ "items": {
471
+ "type": "object",
472
+ "properties": {
473
+ "name": {
474
+ "type": "string",
475
+ "minLength": 1,
476
+ "maxLength": 64,
477
+ "pattern": "^[^\\u0000-\\u001f\\u007f]+$"
478
+ },
479
+ "fields": {
480
+ "type": "object",
481
+ "propertyNames": {
482
+ "type": "string",
483
+ "minLength": 1,
484
+ "maxLength": 40,
485
+ "pattern": "^[a-z][A-Za-z0-9]*(\\.[1-9][0-9]?)?$"
486
+ },
487
+ "additionalProperties": {
488
+ "oneOf": [
489
+ {
490
+ "type": "string",
491
+ "maxLength": 256,
492
+ "pattern": "^(/.*)?$"
493
+ },
494
+ {
495
+ "type": "object",
496
+ "properties": {
497
+ "length": {
498
+ "type": "string",
499
+ "maxLength": 256,
500
+ "pattern": "^(/.*)?$"
501
+ }
502
+ },
503
+ "required": [
504
+ "length"
505
+ ],
506
+ "additionalProperties": false
507
+ },
508
+ {
509
+ "type": "object",
510
+ "properties": {
511
+ "countWhere": {
512
+ "type": "object",
513
+ "properties": {
514
+ "array": {
515
+ "type": "string",
516
+ "maxLength": 256,
517
+ "pattern": "^(/.*)?$"
518
+ },
519
+ "pointer": {
520
+ "type": "string",
521
+ "maxLength": 256,
522
+ "pattern": "^(/.*)?$"
523
+ },
524
+ "equals": {
525
+ "anyOf": [
526
+ {
527
+ "type": "string",
528
+ "maxLength": 256
529
+ },
530
+ {
531
+ "type": "number"
532
+ },
533
+ {
534
+ "type": "boolean"
535
+ }
536
+ ]
537
+ }
538
+ },
539
+ "required": [
540
+ "array",
541
+ "pointer",
542
+ "equals"
543
+ ],
544
+ "additionalProperties": false
545
+ }
546
+ },
547
+ "required": [
548
+ "countWhere"
549
+ ],
550
+ "additionalProperties": false
551
+ },
552
+ {
553
+ "type": "object",
554
+ "properties": {
555
+ "first": {
556
+ "type": "object",
557
+ "properties": {
558
+ "array": {
559
+ "type": "string",
560
+ "maxLength": 256,
561
+ "pattern": "^(/.*)?$"
562
+ },
563
+ "pointer": {
564
+ "type": "string",
565
+ "maxLength": 256,
566
+ "pattern": "^(/.*)?$"
567
+ },
568
+ "equals": {
569
+ "anyOf": [
570
+ {
571
+ "type": "string",
572
+ "maxLength": 256
573
+ },
574
+ {
575
+ "type": "number"
576
+ },
577
+ {
578
+ "type": "boolean"
579
+ }
580
+ ]
581
+ },
582
+ "select": {
583
+ "type": "string",
584
+ "maxLength": 256,
585
+ "pattern": "^(/.*)?$"
586
+ }
587
+ },
588
+ "required": [
589
+ "array",
590
+ "pointer",
591
+ "equals",
592
+ "select"
593
+ ],
594
+ "additionalProperties": false
595
+ }
596
+ },
597
+ "required": [
598
+ "first"
599
+ ],
600
+ "additionalProperties": false
601
+ }
602
+ ]
603
+ },
604
+ "minProperties": 1,
605
+ "maxProperties": 16
606
+ },
607
+ "maps": {
608
+ "type": "object",
609
+ "propertyNames": {
610
+ "type": "string",
611
+ "minLength": 1,
612
+ "maxLength": 40,
613
+ "pattern": "^[a-z][A-Za-z0-9]*(\\.[1-9][0-9]?)?$"
614
+ },
615
+ "additionalProperties": {
616
+ "$ref": "#/$defs/mapping"
617
+ },
618
+ "maxProperties": 16
619
+ }
620
+ },
621
+ "required": [
622
+ "name",
623
+ "fields"
624
+ ],
625
+ "additionalProperties": false
626
+ },
627
+ "minItems": 1,
628
+ "maxItems": 8
629
+ }
630
+ },
631
+ "required": [
632
+ "inputs",
633
+ "drives"
634
+ ],
635
+ "additionalProperties": false,
636
+ "description": "RFC-0013 machine (draft): typed inputs, drives from inputs to slot targets, value-driven positions and source recipes."
637
+ },
638
+ "mount": {
639
+ "description": "Reserved (RFC-0011 P4): a prop that holds a window. Rejected in object format 0.10.",
640
+ "not": {}
641
+ },
642
+ "interactive": {
643
+ "description": "Reserved (RFC-0011 P4): use actions on ordinary objects. Rejected in object format 0.10.",
644
+ "not": {}
645
+ }
646
+ },
647
+ "additionalProperties": false,
648
+ "description": "Trait name to trait data. Unknown or reserved names reject the object."
649
+ },
650
+ "slots": {
651
+ "type": "object",
652
+ "properties": {
653
+ "states": {
654
+ "type": "array",
655
+ "items": {
656
+ "type": "object",
657
+ "properties": {
658
+ "id": {
659
+ "$ref": "../v0.8/common.schema.json#/$defs/slug"
660
+ },
661
+ "materials": {
662
+ "type": "array",
663
+ "items": {
664
+ "type": "string",
665
+ "minLength": 1,
666
+ "maxLength": 128
667
+ },
668
+ "minItems": 1,
669
+ "maxItems": 16,
670
+ "uniqueItems": true
671
+ },
672
+ "nodes": {
673
+ "type": "array",
674
+ "items": {
675
+ "type": "string",
676
+ "minLength": 1,
677
+ "maxLength": 128
678
+ },
679
+ "minItems": 1,
680
+ "maxItems": 16,
681
+ "uniqueItems": true
682
+ },
683
+ "palette": {
684
+ "type": "array",
685
+ "items": {
686
+ "type": "object",
687
+ "properties": {
688
+ "id": {
689
+ "$ref": "../v0.8/common.schema.json#/$defs/slug"
690
+ },
691
+ "colour": {
692
+ "type": "array",
693
+ "items": {
694
+ "type": "number",
695
+ "maximum": 1,
696
+ "minimum": 0
697
+ },
698
+ "minItems": 3,
699
+ "maxItems": 3,
700
+ "description": "Linear RGB, 0-1."
701
+ },
702
+ "emission": {
703
+ "type": "number",
704
+ "maximum": 16,
705
+ "minimum": 0
706
+ }
707
+ },
708
+ "required": [
709
+ "id",
710
+ "colour",
711
+ "emission"
712
+ ],
713
+ "additionalProperties": false
714
+ },
715
+ "minItems": 1,
716
+ "maxItems": 16
717
+ }
718
+ },
719
+ "required": [
720
+ "id",
721
+ "palette"
722
+ ],
723
+ "additionalProperties": false,
724
+ "oneOf": [
725
+ {
726
+ "properties": {
727
+ "materials": {
728
+ "type": "array"
729
+ }
730
+ },
731
+ "required": [
732
+ "materials"
733
+ ]
734
+ },
735
+ {
736
+ "properties": {
737
+ "nodes": {
738
+ "type": "array"
739
+ }
740
+ },
741
+ "required": [
742
+ "nodes"
743
+ ]
744
+ }
745
+ ]
746
+ },
747
+ "minItems": 1,
748
+ "maxItems": 8
749
+ },
750
+ "labels": {
751
+ "type": "array",
752
+ "items": {
753
+ "type": "object",
754
+ "properties": {
755
+ "id": {
756
+ "$ref": "../v0.8/common.schema.json#/$defs/slug"
757
+ },
758
+ "pose": {
759
+ "$ref": "#/$defs/slotPose"
760
+ },
761
+ "size": {
762
+ "type": "array",
763
+ "items": {
764
+ "type": "number",
765
+ "maximum": 16,
766
+ "exclusiveMinimum": 0
767
+ },
768
+ "minItems": 2,
769
+ "maxItems": 2
770
+ },
771
+ "maxChars": {
772
+ "type": "integer",
773
+ "minimum": 1,
774
+ "maximum": 64
775
+ },
776
+ "font": {
777
+ "enum": [
778
+ "sans",
779
+ "mono"
780
+ ]
781
+ },
782
+ "align": {
783
+ "enum": [
784
+ "left",
785
+ "center",
786
+ "right"
787
+ ]
788
+ },
789
+ "colour": {
790
+ "type": "array",
791
+ "items": {
792
+ "type": "number",
793
+ "maximum": 1,
794
+ "minimum": 0
795
+ },
796
+ "minItems": 3,
797
+ "maxItems": 3,
798
+ "description": "Linear RGB, 0-1."
799
+ },
800
+ "plate": {
801
+ "type": "array",
802
+ "items": {
803
+ "type": "number",
804
+ "maximum": 1,
805
+ "minimum": 0
806
+ },
807
+ "minItems": 3,
808
+ "maxItems": 3,
809
+ "description": "Linear RGB, 0-1."
810
+ }
811
+ },
812
+ "required": [
813
+ "id",
814
+ "pose",
815
+ "size",
816
+ "maxChars"
817
+ ],
818
+ "additionalProperties": false
819
+ },
820
+ "minItems": 1,
821
+ "maxItems": 8
822
+ },
823
+ "spawns": {
824
+ "type": "array",
825
+ "items": {
826
+ "type": "object",
827
+ "properties": {
828
+ "id": {
829
+ "$ref": "../v0.8/common.schema.json#/$defs/slug"
830
+ },
831
+ "pose": {
832
+ "$ref": "#/$defs/slotPose"
833
+ },
834
+ "track": {
835
+ "$ref": "../v0.8/common.schema.json#/$defs/slug"
836
+ },
837
+ "items": {
838
+ "type": "array",
839
+ "items": {
840
+ "$ref": "../v0.8/common.schema.json#/$defs/slug"
841
+ },
842
+ "minItems": 1,
843
+ "maxItems": 16,
844
+ "uniqueItems": true
845
+ },
846
+ "maxRate": {
847
+ "type": "number",
848
+ "maximum": 10,
849
+ "exclusiveMinimum": 0
850
+ }
851
+ },
852
+ "required": [
853
+ "id",
854
+ "pose"
855
+ ],
856
+ "additionalProperties": false
857
+ },
858
+ "minItems": 1,
859
+ "maxItems": 8
860
+ },
861
+ "effects": {
862
+ "type": "array",
863
+ "items": {
864
+ "type": "object",
865
+ "properties": {
866
+ "id": {
867
+ "$ref": "../v0.8/common.schema.json#/$defs/slug"
868
+ },
869
+ "pose": {
870
+ "$ref": "#/$defs/slotPose"
871
+ },
872
+ "kind": {
873
+ "enum": [
874
+ "burst",
875
+ "pulse",
876
+ "flash",
877
+ "ring"
878
+ ]
879
+ },
880
+ "colour": {
881
+ "type": "array",
882
+ "items": {
883
+ "type": "number",
884
+ "maximum": 1,
885
+ "minimum": 0
886
+ },
887
+ "minItems": 3,
888
+ "maxItems": 3,
889
+ "description": "Linear RGB, 0-1."
890
+ },
891
+ "durationMs": {
892
+ "type": "integer",
893
+ "minimum": 200,
894
+ "maximum": 3000
895
+ }
896
+ },
897
+ "required": [
898
+ "id",
899
+ "pose"
900
+ ],
901
+ "additionalProperties": false
902
+ },
903
+ "minItems": 1,
904
+ "maxItems": 8
905
+ },
906
+ "tracks": {
907
+ "type": "array",
908
+ "items": {
909
+ "type": "object",
910
+ "properties": {
911
+ "id": {
912
+ "$ref": "../v0.8/common.schema.json#/$defs/slug"
913
+ },
914
+ "points": {
915
+ "type": "array",
916
+ "items": {
917
+ "type": "object",
918
+ "properties": {
919
+ "position": {
920
+ "$ref": "../v0.8/common.schema.json#/$defs/vec3"
921
+ },
922
+ "type": {
923
+ "enum": [
924
+ "line",
925
+ "curve",
926
+ "arc"
927
+ ]
928
+ }
929
+ },
930
+ "required": [
931
+ "position",
932
+ "type"
933
+ ],
934
+ "additionalProperties": false
935
+ },
936
+ "minItems": 2,
937
+ "maxItems": 32
938
+ },
939
+ "speed": {
940
+ "type": "number",
941
+ "maximum": 30,
942
+ "minimum": 0.1
943
+ },
944
+ "items": {
945
+ "type": "object",
946
+ "properties": {
947
+ "assets": {
948
+ "type": "array",
949
+ "items": {
950
+ "$ref": "../v0.8/common.schema.json#/$defs/slug"
951
+ },
952
+ "minItems": 1,
953
+ "maxItems": 16,
954
+ "uniqueItems": true
955
+ },
956
+ "max": {
957
+ "type": "integer",
958
+ "minimum": 1,
959
+ "maximum": 256
960
+ },
961
+ "spacing": {
962
+ "type": "number",
963
+ "maximum": 10,
964
+ "exclusiveMinimum": 0
965
+ },
966
+ "overflow": {
967
+ "enum": [
968
+ "refuse",
969
+ "drop-oldest"
970
+ ]
971
+ }
972
+ },
973
+ "required": [
974
+ "assets",
975
+ "max"
976
+ ],
977
+ "additionalProperties": false
978
+ },
979
+ "sink": {
980
+ "type": "boolean"
981
+ }
982
+ },
983
+ "required": [
984
+ "id",
985
+ "points"
986
+ ],
987
+ "additionalProperties": false
988
+ },
989
+ "minItems": 1,
990
+ "maxItems": 4
991
+ },
992
+ "stacks": {
993
+ "type": "array",
994
+ "items": {
995
+ "type": "object",
996
+ "properties": {
997
+ "id": {
998
+ "$ref": "../v0.8/common.schema.json#/$defs/slug"
999
+ },
1000
+ "node": {
1001
+ "type": "string",
1002
+ "minLength": 1,
1003
+ "maxLength": 128
1004
+ },
1005
+ "cap": {
1006
+ "type": "integer",
1007
+ "minimum": 1,
1008
+ "maximum": 64
1009
+ },
1010
+ "layout": {
1011
+ "type": "object",
1012
+ "properties": {
1013
+ "grid": {
1014
+ "type": "array",
1015
+ "items": {
1016
+ "type": "integer",
1017
+ "minimum": 1,
1018
+ "maximum": 64
1019
+ },
1020
+ "minItems": 3,
1021
+ "maxItems": 3
1022
+ },
1023
+ "spacing": {
1024
+ "type": "array",
1025
+ "items": {
1026
+ "type": "number",
1027
+ "maximum": 10,
1028
+ "minimum": 0
1029
+ },
1030
+ "minItems": 3,
1031
+ "maxItems": 3
1032
+ },
1033
+ "fill": {
1034
+ "enum": [
1035
+ "xyz",
1036
+ "xzy",
1037
+ "yxz",
1038
+ "yzx",
1039
+ "zxy",
1040
+ "zyx"
1041
+ ]
1042
+ }
1043
+ },
1044
+ "required": [
1045
+ "grid",
1046
+ "spacing",
1047
+ "fill"
1048
+ ],
1049
+ "additionalProperties": false
1050
+ }
1051
+ },
1052
+ "required": [
1053
+ "id",
1054
+ "node",
1055
+ "layout",
1056
+ "cap"
1057
+ ],
1058
+ "additionalProperties": false
1059
+ },
1060
+ "minItems": 1,
1061
+ "maxItems": 8
1062
+ },
1063
+ "toggles": {
1064
+ "type": "array",
1065
+ "items": {
1066
+ "type": "object",
1067
+ "properties": {
1068
+ "id": {
1069
+ "$ref": "../v0.8/common.schema.json#/$defs/slug"
1070
+ },
1071
+ "nodes": {
1072
+ "type": "array",
1073
+ "items": {
1074
+ "type": "string",
1075
+ "minLength": 1,
1076
+ "maxLength": 128
1077
+ },
1078
+ "minItems": 1,
1079
+ "maxItems": 16,
1080
+ "uniqueItems": true
1081
+ }
1082
+ },
1083
+ "required": [
1084
+ "id",
1085
+ "nodes"
1086
+ ],
1087
+ "additionalProperties": false
1088
+ },
1089
+ "minItems": 1,
1090
+ "maxItems": 8
1091
+ },
1092
+ "ports": {
1093
+ "type": "array",
1094
+ "items": {
1095
+ "type": "object",
1096
+ "properties": {
1097
+ "id": {
1098
+ "$ref": "../v0.8/common.schema.json#/$defs/slug"
1099
+ },
1100
+ "pose": {
1101
+ "$ref": "#/$defs/slotPose"
1102
+ },
1103
+ "direction": {
1104
+ "enum": [
1105
+ "in",
1106
+ "out"
1107
+ ]
1108
+ }
1109
+ },
1110
+ "required": [
1111
+ "id",
1112
+ "pose",
1113
+ "direction"
1114
+ ],
1115
+ "additionalProperties": false
1116
+ },
1117
+ "minItems": 1,
1118
+ "maxItems": 8
1119
+ }
1120
+ },
1121
+ "additionalProperties": false,
1122
+ "description": "Authored parts that RFC-0013 drives."
1123
+ }
1124
+ },
1125
+ "required": [
1126
+ "formatVersion",
1127
+ "id",
1128
+ "version",
1129
+ "name",
1130
+ "category",
1131
+ "scene",
1132
+ "license",
1133
+ "attribution",
1134
+ "bounds",
1135
+ "traits"
1136
+ ],
1137
+ "additionalProperties": false,
1138
+ "$defs": {
1139
+ "animation": {
1140
+ "type": "object",
1141
+ "properties": {
1142
+ "node": {
1143
+ "type": "string",
1144
+ "minLength": 1,
1145
+ "maxLength": 128
1146
+ },
1147
+ "type": {
1148
+ "enum": [
1149
+ "spin",
1150
+ "orbit",
1151
+ "bob"
1152
+ ]
1153
+ },
1154
+ "axis": {
1155
+ "type": "array",
1156
+ "items": {
1157
+ "type": "number",
1158
+ "maximum": 1.001,
1159
+ "minimum": -1.001
1160
+ },
1161
+ "minItems": 3,
1162
+ "maxItems": 3
1163
+ },
1164
+ "pivot": {
1165
+ "type": "array",
1166
+ "items": {
1167
+ "type": "number",
1168
+ "maximum": 10000,
1169
+ "minimum": -10000
1170
+ },
1171
+ "minItems": 3,
1172
+ "maxItems": 3
1173
+ },
1174
+ "amplitude": {
1175
+ "type": "number",
1176
+ "maximum": 10,
1177
+ "exclusiveMinimum": 0
1178
+ },
1179
+ "period": {
1180
+ "type": "number",
1181
+ "maximum": 3600,
1182
+ "minimum": 0.5
1183
+ },
1184
+ "phase": {
1185
+ "type": "number",
1186
+ "minimum": 0,
1187
+ "exclusiveMaximum": 1
1188
+ }
1189
+ },
1190
+ "required": [
1191
+ "node",
1192
+ "type",
1193
+ "axis",
1194
+ "period"
1195
+ ],
1196
+ "additionalProperties": false,
1197
+ "description": "A world 0.8 declarative node animation (spin, orbit or bob)."
1198
+ },
1199
+ "slotPose": {
1200
+ "$ref": "../v0.8/common.schema.json#/$defs/pose"
1201
+ },
1202
+ "interaction": {
1203
+ "type": "object",
1204
+ "properties": {
1205
+ "id": {
1206
+ "$ref": "../v0.8/common.schema.json#/$defs/slug"
1207
+ },
1208
+ "label": {
1209
+ "type": "string",
1210
+ "minLength": 1,
1211
+ "maxLength": 32,
1212
+ "pattern": "^[^\\u0000-\\u001f\\u007f]+$"
1213
+ },
1214
+ "prompt": {
1215
+ "type": "string",
1216
+ "minLength": 1,
1217
+ "maxLength": 64,
1218
+ "pattern": "^[^\\u0000-\\u001f\\u007f]+$"
1219
+ },
1220
+ "action": {
1221
+ "oneOf": [
1222
+ {
1223
+ "type": "object",
1224
+ "properties": {
1225
+ "type": {
1226
+ "const": "say"
1227
+ },
1228
+ "lines": {
1229
+ "type": "array",
1230
+ "items": {
1231
+ "type": "string",
1232
+ "minLength": 1,
1233
+ "maxLength": 160,
1234
+ "pattern": "^[^\\u0000-\\u001f\\u007f]+$"
1235
+ },
1236
+ "minItems": 1,
1237
+ "maxItems": 8
1238
+ }
1239
+ },
1240
+ "required": [
1241
+ "type",
1242
+ "lines"
1243
+ ],
1244
+ "additionalProperties": false
1245
+ },
1246
+ {
1247
+ "type": "object",
1248
+ "properties": {
1249
+ "type": {
1250
+ "const": "panel"
1251
+ },
1252
+ "panel": {
1253
+ "$ref": "../v0.8/common.schema.json#/$defs/slug"
1254
+ }
1255
+ },
1256
+ "required": [
1257
+ "type",
1258
+ "panel"
1259
+ ],
1260
+ "additionalProperties": false
1261
+ }
1262
+ ]
1263
+ }
1264
+ },
1265
+ "required": [
1266
+ "id",
1267
+ "label",
1268
+ "action"
1269
+ ],
1270
+ "additionalProperties": false,
1271
+ "description": "Asset-level character interaction: only say and panel, which reference nothing in a world."
1272
+ },
1273
+ "seatAnchor": {
1274
+ "type": "object",
1275
+ "properties": {
1276
+ "id": {
1277
+ "$ref": "../v0.8/common.schema.json#/$defs/slug"
1278
+ },
1279
+ "position": {
1280
+ "$ref": "../v0.8/common.schema.json#/$defs/vec3"
1281
+ },
1282
+ "yaw": {
1283
+ "type": "number",
1284
+ "maximum": 360,
1285
+ "minimum": -360
1286
+ },
1287
+ "height": {
1288
+ "type": "number",
1289
+ "maximum": 1,
1290
+ "minimum": 0.2
1291
+ },
1292
+ "use": {
1293
+ "type": "array",
1294
+ "items": {
1295
+ "enum": [
1296
+ "sit"
1297
+ ]
1298
+ },
1299
+ "minItems": 1,
1300
+ "maxItems": 1,
1301
+ "uniqueItems": true
1302
+ },
1303
+ "approach": {
1304
+ "type": "number",
1305
+ "maximum": 2,
1306
+ "minimum": 0.3
1307
+ }
1308
+ },
1309
+ "required": [
1310
+ "id",
1311
+ "position",
1312
+ "yaw",
1313
+ "height"
1314
+ ],
1315
+ "additionalProperties": false,
1316
+ "description": "Where the sitter's root stands at the start of sit (asset space), facing yaw degrees about +Y from +Z. perch, lean and ground uses are reserved."
1317
+ },
1318
+ "mapping": {
1319
+ "type": "object",
1320
+ "properties": {
1321
+ "cases": {
1322
+ "type": "array",
1323
+ "items": {
1324
+ "type": "object",
1325
+ "properties": {
1326
+ "equals": {
1327
+ "anyOf": [
1328
+ {
1329
+ "type": "string",
1330
+ "maxLength": 256
1331
+ },
1332
+ {
1333
+ "type": "number"
1334
+ },
1335
+ {
1336
+ "type": "boolean"
1337
+ }
1338
+ ]
1339
+ },
1340
+ "in": {
1341
+ "type": "array",
1342
+ "items": {
1343
+ "anyOf": [
1344
+ {
1345
+ "type": "string",
1346
+ "maxLength": 256
1347
+ },
1348
+ {
1349
+ "type": "number"
1350
+ },
1351
+ {
1352
+ "type": "boolean"
1353
+ }
1354
+ ]
1355
+ },
1356
+ "minItems": 1,
1357
+ "maxItems": 16
1358
+ },
1359
+ "to": {
1360
+ "anyOf": [
1361
+ {
1362
+ "type": "string",
1363
+ "maxLength": 256
1364
+ },
1365
+ {
1366
+ "type": "number"
1367
+ },
1368
+ {
1369
+ "type": "boolean"
1370
+ }
1371
+ ]
1372
+ }
1373
+ },
1374
+ "required": [
1375
+ "to"
1376
+ ],
1377
+ "additionalProperties": false,
1378
+ "oneOf": [
1379
+ {
1380
+ "properties": {
1381
+ "equals": {}
1382
+ },
1383
+ "required": [
1384
+ "equals"
1385
+ ]
1386
+ },
1387
+ {
1388
+ "properties": {
1389
+ "in": {}
1390
+ },
1391
+ "required": [
1392
+ "in"
1393
+ ]
1394
+ }
1395
+ ]
1396
+ },
1397
+ "minItems": 1,
1398
+ "maxItems": 16
1399
+ },
1400
+ "thresholds": {
1401
+ "type": "array",
1402
+ "items": {
1403
+ "type": "object",
1404
+ "properties": {
1405
+ "below": {
1406
+ "type": "number"
1407
+ },
1408
+ "atLeast": {
1409
+ "type": "number"
1410
+ },
1411
+ "to": {
1412
+ "anyOf": [
1413
+ {
1414
+ "type": "string",
1415
+ "maxLength": 256
1416
+ },
1417
+ {
1418
+ "type": "number"
1419
+ },
1420
+ {
1421
+ "type": "boolean"
1422
+ }
1423
+ ]
1424
+ }
1425
+ },
1426
+ "required": [
1427
+ "to"
1428
+ ],
1429
+ "additionalProperties": false,
1430
+ "oneOf": [
1431
+ {
1432
+ "properties": {
1433
+ "below": {}
1434
+ },
1435
+ "required": [
1436
+ "below"
1437
+ ]
1438
+ },
1439
+ {
1440
+ "properties": {
1441
+ "atLeast": {}
1442
+ },
1443
+ "required": [
1444
+ "atLeast"
1445
+ ]
1446
+ }
1447
+ ]
1448
+ },
1449
+ "minItems": 1,
1450
+ "maxItems": 16
1451
+ },
1452
+ "else": {
1453
+ "anyOf": [
1454
+ {
1455
+ "type": "string",
1456
+ "maxLength": 256
1457
+ },
1458
+ {
1459
+ "type": "number"
1460
+ },
1461
+ {
1462
+ "type": "boolean"
1463
+ }
1464
+ ]
1465
+ },
1466
+ "scale": {
1467
+ "type": "object",
1468
+ "properties": {
1469
+ "from": {
1470
+ "type": "array",
1471
+ "items": {
1472
+ "type": "number"
1473
+ },
1474
+ "minItems": 2,
1475
+ "maxItems": 2
1476
+ },
1477
+ "to": {
1478
+ "type": "array",
1479
+ "items": {
1480
+ "type": "number"
1481
+ },
1482
+ "minItems": 2,
1483
+ "maxItems": 2
1484
+ }
1485
+ },
1486
+ "required": [
1487
+ "from",
1488
+ "to"
1489
+ ],
1490
+ "additionalProperties": false
1491
+ },
1492
+ "clamp": {
1493
+ "type": "boolean"
1494
+ },
1495
+ "round": {
1496
+ "enum": [
1497
+ "floor",
1498
+ "ceil",
1499
+ "nearest"
1500
+ ]
1501
+ },
1502
+ "becomes": {
1503
+ "anyOf": [
1504
+ {
1505
+ "type": "string",
1506
+ "maxLength": 256
1507
+ },
1508
+ {
1509
+ "type": "number"
1510
+ },
1511
+ {
1512
+ "type": "boolean"
1513
+ }
1514
+ ]
1515
+ },
1516
+ "from": {
1517
+ "anyOf": [
1518
+ {
1519
+ "type": "string",
1520
+ "maxLength": 256
1521
+ },
1522
+ {
1523
+ "type": "number"
1524
+ },
1525
+ {
1526
+ "type": "boolean"
1527
+ }
1528
+ ]
1529
+ },
1530
+ "counter": {
1531
+ "const": true
1532
+ },
1533
+ "format": {
1534
+ "type": "object",
1535
+ "properties": {
1536
+ "decimals": {
1537
+ "type": "integer",
1538
+ "minimum": 0,
1539
+ "maximum": 6
1540
+ },
1541
+ "compact": {
1542
+ "type": "boolean"
1543
+ },
1544
+ "unit": {
1545
+ "type": "string",
1546
+ "maxLength": 16,
1547
+ "pattern": "^[^\\u0000-\\u001f\\u007f]*$"
1548
+ }
1549
+ },
1550
+ "additionalProperties": false
1551
+ }
1552
+ },
1553
+ "additionalProperties": false,
1554
+ "description": "RFC-0013 mapping language: direct ({}), cases, thresholds, scale, becomes, counter or format."
1555
+ },
1556
+ "input": {
1557
+ "type": "object",
1558
+ "properties": {
1559
+ "id": {
1560
+ "type": "string",
1561
+ "minLength": 1,
1562
+ "maxLength": 32,
1563
+ "pattern": "^[a-z][A-Za-z0-9]*$"
1564
+ },
1565
+ "type": {
1566
+ "enum": [
1567
+ "enum",
1568
+ "int",
1569
+ "number",
1570
+ "bool",
1571
+ "text",
1572
+ "event",
1573
+ "items"
1574
+ ]
1575
+ },
1576
+ "label": {
1577
+ "type": "string",
1578
+ "minLength": 1,
1579
+ "maxLength": 64,
1580
+ "pattern": "^[^\\u0000-\\u001f\\u007f]+$"
1581
+ },
1582
+ "explain": {
1583
+ "type": "string",
1584
+ "minLength": 1,
1585
+ "maxLength": 256,
1586
+ "pattern": "^[^\\u0000-\\u001f\\u007f]+$"
1587
+ },
1588
+ "default": {
1589
+ "anyOf": [
1590
+ {
1591
+ "type": "string",
1592
+ "maxLength": 256
1593
+ },
1594
+ {
1595
+ "type": "number"
1596
+ },
1597
+ {
1598
+ "type": "boolean"
1599
+ }
1600
+ ]
1601
+ },
1602
+ "repeat": {
1603
+ "type": "integer",
1604
+ "minimum": 2,
1605
+ "maximum": 16
1606
+ },
1607
+ "values": {
1608
+ "type": "array",
1609
+ "items": {
1610
+ "$ref": "../v0.8/common.schema.json#/$defs/slug"
1611
+ },
1612
+ "minItems": 1,
1613
+ "maxItems": 16,
1614
+ "uniqueItems": true
1615
+ },
1616
+ "min": {
1617
+ "type": "number"
1618
+ },
1619
+ "max": {
1620
+ "type": "number"
1621
+ },
1622
+ "maxLength": {
1623
+ "type": "integer",
1624
+ "minimum": 1,
1625
+ "maximum": 64
1626
+ },
1627
+ "states": {
1628
+ "type": "array",
1629
+ "items": {
1630
+ "$ref": "../v0.8/common.schema.json#/$defs/slug"
1631
+ },
1632
+ "minItems": 1,
1633
+ "maxItems": 16,
1634
+ "uniqueItems": true
1635
+ }
1636
+ },
1637
+ "required": [
1638
+ "id",
1639
+ "type",
1640
+ "label",
1641
+ "explain"
1642
+ ],
1643
+ "additionalProperties": false,
1644
+ "allOf": [
1645
+ {
1646
+ "if": {
1647
+ "properties": {
1648
+ "type": {
1649
+ "const": "enum"
1650
+ }
1651
+ }
1652
+ },
1653
+ "then": {
1654
+ "properties": {
1655
+ "values": {
1656
+ "type": "array"
1657
+ }
1658
+ },
1659
+ "required": [
1660
+ "values"
1661
+ ]
1662
+ }
1663
+ },
1664
+ {
1665
+ "if": {
1666
+ "properties": {
1667
+ "type": {
1668
+ "enum": [
1669
+ "int",
1670
+ "number"
1671
+ ]
1672
+ }
1673
+ }
1674
+ },
1675
+ "then": {
1676
+ "properties": {
1677
+ "min": {
1678
+ "type": "number"
1679
+ },
1680
+ "max": {
1681
+ "type": "number"
1682
+ }
1683
+ },
1684
+ "required": [
1685
+ "min",
1686
+ "max"
1687
+ ]
1688
+ }
1689
+ },
1690
+ {
1691
+ "if": {
1692
+ "properties": {
1693
+ "type": {
1694
+ "const": "items"
1695
+ }
1696
+ }
1697
+ },
1698
+ "then": {
1699
+ "properties": {
1700
+ "states": {
1701
+ "type": "array"
1702
+ }
1703
+ },
1704
+ "required": [
1705
+ "states"
1706
+ ]
1707
+ }
1708
+ }
1709
+ ],
1710
+ "description": "A typed machine input (RFC-0013). repeat makes indexed inputs id.1 ... id.N."
1711
+ }
1712
+ }
1713
+ }