@hyprune/schema 0.6.0 → 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,739 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://hyprune.com/schema/v0.9/object.schema.json",
4
+ "title": "Hyprune object manifest 0.9 (object.json, RFC-0011): an object asset directory with traits and RFC-0013 slots (validated, inert)",
5
+ "type": "object",
6
+ "properties": {
7
+ "formatVersion": {
8
+ "const": "0.9"
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
+ "mount": {
341
+ "description": "Reserved (RFC-0011 P4): a prop that holds a window. Rejected in object format 0.9.",
342
+ "not": {}
343
+ },
344
+ "machine": {
345
+ "description": "Reserved for RFC-0013 (live objects). Rejected in object format 0.9.",
346
+ "not": {}
347
+ },
348
+ "interactive": {
349
+ "description": "Reserved (RFC-0011 P4): use actions on ordinary objects. Rejected in object format 0.9.",
350
+ "not": {}
351
+ },
352
+ "mover": {
353
+ "description": "Object format 0.10 (RFC-0011 P3). Rejected in object format 0.9.",
354
+ "not": {}
355
+ }
356
+ },
357
+ "additionalProperties": false,
358
+ "description": "Trait name to trait data. Unknown or reserved names reject the object."
359
+ },
360
+ "slots": {
361
+ "type": "object",
362
+ "properties": {
363
+ "states": {
364
+ "type": "array",
365
+ "items": {
366
+ "type": "object",
367
+ "properties": {
368
+ "id": {
369
+ "$ref": "../v0.8/common.schema.json#/$defs/slug"
370
+ },
371
+ "materials": {
372
+ "type": "array",
373
+ "items": {
374
+ "type": "string",
375
+ "minLength": 1,
376
+ "maxLength": 128
377
+ },
378
+ "minItems": 1,
379
+ "maxItems": 16,
380
+ "uniqueItems": true
381
+ },
382
+ "nodes": {
383
+ "type": "array",
384
+ "items": {
385
+ "type": "string",
386
+ "minLength": 1,
387
+ "maxLength": 128
388
+ },
389
+ "minItems": 1,
390
+ "maxItems": 16,
391
+ "uniqueItems": true
392
+ },
393
+ "palette": {
394
+ "type": "array",
395
+ "items": {
396
+ "type": "object",
397
+ "properties": {
398
+ "id": {
399
+ "$ref": "../v0.8/common.schema.json#/$defs/slug"
400
+ },
401
+ "colour": {
402
+ "type": "array",
403
+ "items": {
404
+ "type": "number",
405
+ "maximum": 1,
406
+ "minimum": 0
407
+ },
408
+ "minItems": 3,
409
+ "maxItems": 3,
410
+ "description": "Linear RGB, 0-1."
411
+ },
412
+ "emission": {
413
+ "type": "number",
414
+ "maximum": 16,
415
+ "minimum": 0
416
+ }
417
+ },
418
+ "required": [
419
+ "id",
420
+ "colour",
421
+ "emission"
422
+ ],
423
+ "additionalProperties": false
424
+ },
425
+ "minItems": 1,
426
+ "maxItems": 16
427
+ }
428
+ },
429
+ "required": [
430
+ "id",
431
+ "palette"
432
+ ],
433
+ "additionalProperties": false,
434
+ "oneOf": [
435
+ {
436
+ "properties": {
437
+ "materials": {
438
+ "type": "array"
439
+ }
440
+ },
441
+ "required": [
442
+ "materials"
443
+ ]
444
+ },
445
+ {
446
+ "properties": {
447
+ "nodes": {
448
+ "type": "array"
449
+ }
450
+ },
451
+ "required": [
452
+ "nodes"
453
+ ]
454
+ }
455
+ ]
456
+ },
457
+ "minItems": 1,
458
+ "maxItems": 8
459
+ },
460
+ "labels": {
461
+ "type": "array",
462
+ "items": {
463
+ "type": "object",
464
+ "properties": {
465
+ "id": {
466
+ "$ref": "../v0.8/common.schema.json#/$defs/slug"
467
+ },
468
+ "pose": {
469
+ "$ref": "#/$defs/slotPose"
470
+ },
471
+ "size": {
472
+ "type": "array",
473
+ "items": {
474
+ "type": "number",
475
+ "maximum": 16,
476
+ "exclusiveMinimum": 0
477
+ },
478
+ "minItems": 2,
479
+ "maxItems": 2
480
+ },
481
+ "maxChars": {
482
+ "type": "integer",
483
+ "minimum": 1,
484
+ "maximum": 64
485
+ }
486
+ },
487
+ "required": [
488
+ "id",
489
+ "pose",
490
+ "size",
491
+ "maxChars"
492
+ ],
493
+ "additionalProperties": false
494
+ },
495
+ "minItems": 1,
496
+ "maxItems": 8
497
+ },
498
+ "spawns": {
499
+ "type": "array",
500
+ "items": {
501
+ "type": "object",
502
+ "properties": {
503
+ "id": {
504
+ "$ref": "../v0.8/common.schema.json#/$defs/slug"
505
+ },
506
+ "pose": {
507
+ "$ref": "#/$defs/slotPose"
508
+ }
509
+ },
510
+ "required": [
511
+ "id",
512
+ "pose"
513
+ ],
514
+ "additionalProperties": false
515
+ },
516
+ "minItems": 1,
517
+ "maxItems": 8
518
+ },
519
+ "effects": {
520
+ "type": "array",
521
+ "items": {
522
+ "type": "object",
523
+ "properties": {
524
+ "id": {
525
+ "$ref": "../v0.8/common.schema.json#/$defs/slug"
526
+ },
527
+ "pose": {
528
+ "$ref": "#/$defs/slotPose"
529
+ }
530
+ },
531
+ "required": [
532
+ "id",
533
+ "pose"
534
+ ],
535
+ "additionalProperties": false
536
+ },
537
+ "minItems": 1,
538
+ "maxItems": 8
539
+ }
540
+ },
541
+ "additionalProperties": false,
542
+ "description": "Authored parts that RFC-0013 drives. Validated and inert in 0.9."
543
+ }
544
+ },
545
+ "required": [
546
+ "formatVersion",
547
+ "id",
548
+ "version",
549
+ "name",
550
+ "category",
551
+ "scene",
552
+ "license",
553
+ "attribution",
554
+ "bounds",
555
+ "traits"
556
+ ],
557
+ "additionalProperties": false,
558
+ "$defs": {
559
+ "animation": {
560
+ "type": "object",
561
+ "properties": {
562
+ "node": {
563
+ "type": "string",
564
+ "minLength": 1,
565
+ "maxLength": 128
566
+ },
567
+ "type": {
568
+ "enum": [
569
+ "spin",
570
+ "orbit",
571
+ "bob"
572
+ ]
573
+ },
574
+ "axis": {
575
+ "type": "array",
576
+ "items": {
577
+ "type": "number",
578
+ "maximum": 1.001,
579
+ "minimum": -1.001
580
+ },
581
+ "minItems": 3,
582
+ "maxItems": 3
583
+ },
584
+ "pivot": {
585
+ "type": "array",
586
+ "items": {
587
+ "type": "number",
588
+ "maximum": 10000,
589
+ "minimum": -10000
590
+ },
591
+ "minItems": 3,
592
+ "maxItems": 3
593
+ },
594
+ "amplitude": {
595
+ "type": "number",
596
+ "maximum": 10,
597
+ "exclusiveMinimum": 0
598
+ },
599
+ "period": {
600
+ "type": "number",
601
+ "maximum": 3600,
602
+ "minimum": 0.5
603
+ },
604
+ "phase": {
605
+ "type": "number",
606
+ "minimum": 0,
607
+ "exclusiveMaximum": 1
608
+ }
609
+ },
610
+ "required": [
611
+ "node",
612
+ "type",
613
+ "axis",
614
+ "period"
615
+ ],
616
+ "additionalProperties": false,
617
+ "description": "A world 0.8 declarative node animation (spin, orbit or bob)."
618
+ },
619
+ "slotPose": {
620
+ "$ref": "../v0.8/common.schema.json#/$defs/pose"
621
+ },
622
+ "interaction": {
623
+ "type": "object",
624
+ "properties": {
625
+ "id": {
626
+ "$ref": "../v0.8/common.schema.json#/$defs/slug"
627
+ },
628
+ "label": {
629
+ "type": "string",
630
+ "minLength": 1,
631
+ "maxLength": 32,
632
+ "pattern": "^[^\\u0000-\\u001f\\u007f]+$"
633
+ },
634
+ "prompt": {
635
+ "type": "string",
636
+ "minLength": 1,
637
+ "maxLength": 64,
638
+ "pattern": "^[^\\u0000-\\u001f\\u007f]+$"
639
+ },
640
+ "action": {
641
+ "oneOf": [
642
+ {
643
+ "type": "object",
644
+ "properties": {
645
+ "type": {
646
+ "const": "say"
647
+ },
648
+ "lines": {
649
+ "type": "array",
650
+ "items": {
651
+ "type": "string",
652
+ "minLength": 1,
653
+ "maxLength": 160,
654
+ "pattern": "^[^\\u0000-\\u001f\\u007f]+$"
655
+ },
656
+ "minItems": 1,
657
+ "maxItems": 8
658
+ }
659
+ },
660
+ "required": [
661
+ "type",
662
+ "lines"
663
+ ],
664
+ "additionalProperties": false
665
+ },
666
+ {
667
+ "type": "object",
668
+ "properties": {
669
+ "type": {
670
+ "const": "panel"
671
+ },
672
+ "panel": {
673
+ "$ref": "../v0.8/common.schema.json#/$defs/slug"
674
+ }
675
+ },
676
+ "required": [
677
+ "type",
678
+ "panel"
679
+ ],
680
+ "additionalProperties": false
681
+ }
682
+ ]
683
+ }
684
+ },
685
+ "required": [
686
+ "id",
687
+ "label",
688
+ "action"
689
+ ],
690
+ "additionalProperties": false,
691
+ "description": "Asset-level character interaction: only say and panel, which reference nothing in a world."
692
+ },
693
+ "seatAnchor": {
694
+ "type": "object",
695
+ "properties": {
696
+ "id": {
697
+ "$ref": "../v0.8/common.schema.json#/$defs/slug"
698
+ },
699
+ "position": {
700
+ "$ref": "../v0.8/common.schema.json#/$defs/vec3"
701
+ },
702
+ "yaw": {
703
+ "type": "number",
704
+ "maximum": 360,
705
+ "minimum": -360
706
+ },
707
+ "height": {
708
+ "type": "number",
709
+ "maximum": 1,
710
+ "minimum": 0.2
711
+ },
712
+ "use": {
713
+ "type": "array",
714
+ "items": {
715
+ "enum": [
716
+ "sit"
717
+ ]
718
+ },
719
+ "minItems": 1,
720
+ "maxItems": 1,
721
+ "uniqueItems": true
722
+ },
723
+ "approach": {
724
+ "type": "number",
725
+ "maximum": 2,
726
+ "minimum": 0.3
727
+ }
728
+ },
729
+ "required": [
730
+ "id",
731
+ "position",
732
+ "yaw",
733
+ "height"
734
+ ],
735
+ "additionalProperties": false,
736
+ "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."
737
+ }
738
+ }
739
+ }