@chanmeng666/archlang-3d 0.0.0-stage → 0.1.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,578 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://example.invalid/archlang-3d/scene3d.schema.json",
4
+ "title": "Scene3D (v0)",
5
+ "description": "Renderer-independent 2.5D building scene read off a resolved ArchLang plan. Plan-aligned: footprints use plan axes (x right, y DOWN); z is height, UP. Every length is integer micrometres (mm x 1000). Handedness is resolved only by exporters.",
6
+ "type": "object",
7
+ "required": ["version", "kind", "meta", "levels"],
8
+ "additionalProperties": false,
9
+ "properties": {
10
+ "version": {
11
+ "const": 0
12
+ },
13
+ "kind": {
14
+ "const": "scene3d"
15
+ },
16
+ "meta": {
17
+ "$ref": "#/$defs/meta"
18
+ },
19
+ "levels": {
20
+ "type": "array",
21
+ "minItems": 1,
22
+ "items": {
23
+ "$ref": "#/$defs/level"
24
+ }
25
+ }
26
+ },
27
+ "$defs": {
28
+ "um": {
29
+ "type": "integer",
30
+ "description": "Length in integer micrometres (mm x 1000)."
31
+ },
32
+ "pt": {
33
+ "type": "array",
34
+ "prefixItems": [
35
+ {
36
+ "$ref": "#/$defs/um"
37
+ },
38
+ {
39
+ "$ref": "#/$defs/um"
40
+ }
41
+ ],
42
+ "minItems": 2,
43
+ "maxItems": 2
44
+ },
45
+ "ring": {
46
+ "type": "array",
47
+ "minItems": 3,
48
+ "items": {
49
+ "$ref": "#/$defs/pt"
50
+ }
51
+ },
52
+ "polygon": {
53
+ "type": "object",
54
+ "required": ["outer"],
55
+ "additionalProperties": false,
56
+ "properties": {
57
+ "outer": {
58
+ "$ref": "#/$defs/ring"
59
+ },
60
+ "holes": {
61
+ "type": "array",
62
+ "items": {
63
+ "$ref": "#/$defs/ring"
64
+ }
65
+ }
66
+ }
67
+ },
68
+ "id": {
69
+ "type": "string",
70
+ "minLength": 1
71
+ },
72
+ "provenance": {
73
+ "enum": ["authored", "derived", "default", "user-param"]
74
+ },
75
+ "source": {
76
+ "type": "object",
77
+ "required": ["kind", "id"],
78
+ "additionalProperties": false,
79
+ "properties": {
80
+ "kind": {
81
+ "type": "string"
82
+ },
83
+ "id": {
84
+ "type": "string"
85
+ },
86
+ "span": {
87
+ "type": "array",
88
+ "items": {
89
+ "type": "integer"
90
+ },
91
+ "minItems": 2,
92
+ "maxItems": 2
93
+ }
94
+ }
95
+ },
96
+ "assumption": {
97
+ "type": "object",
98
+ "required": ["kind", "field", "value", "provenance", "rule"],
99
+ "additionalProperties": false,
100
+ "properties": {
101
+ "kind": {
102
+ "type": "string"
103
+ },
104
+ "id": {
105
+ "type": "string"
106
+ },
107
+ "field": {
108
+ "type": "string"
109
+ },
110
+ "value": {},
111
+ "provenance": {
112
+ "$ref": "#/$defs/provenance"
113
+ },
114
+ "rule": {
115
+ "type": "string"
116
+ }
117
+ }
118
+ },
119
+ "meta": {
120
+ "type": "object",
121
+ "required": ["name", "units", "tool", "assumptions"],
122
+ "additionalProperties": false,
123
+ "properties": {
124
+ "name": {
125
+ "type": "string"
126
+ },
127
+ "units": {
128
+ "const": "mm"
129
+ },
130
+ "tool": {
131
+ "type": "object",
132
+ "required": ["archlang3d", "archlang"],
133
+ "additionalProperties": false,
134
+ "properties": {
135
+ "archlang3d": {
136
+ "type": "string"
137
+ },
138
+ "archlang": {
139
+ "type": "string"
140
+ }
141
+ }
142
+ },
143
+ "north": {
144
+ "oneOf": [
145
+ {
146
+ "enum": ["up", "down", "left", "right"]
147
+ },
148
+ {
149
+ "type": "number"
150
+ }
151
+ ]
152
+ },
153
+ "siteBoundary": {
154
+ "$ref": "#/$defs/ring"
155
+ },
156
+ "params": {
157
+ "type": "object"
158
+ },
159
+ "assumptions": {
160
+ "type": "array",
161
+ "items": {
162
+ "$ref": "#/$defs/assumption"
163
+ }
164
+ }
165
+ }
166
+ },
167
+ "level": {
168
+ "type": "object",
169
+ "required": [
170
+ "level",
171
+ "elevation",
172
+ "storeyHeight",
173
+ "footprint",
174
+ "floors",
175
+ "walls",
176
+ "openings",
177
+ "furniture",
178
+ "stairs",
179
+ "voids",
180
+ "columns",
181
+ "outdoor",
182
+ "fences",
183
+ "roofs"
184
+ ],
185
+ "additionalProperties": false,
186
+ "properties": {
187
+ "level": {
188
+ "type": "integer"
189
+ },
190
+ "name": {
191
+ "type": "string"
192
+ },
193
+ "elevation": {
194
+ "$ref": "#/$defs/um"
195
+ },
196
+ "storeyHeight": {
197
+ "$ref": "#/$defs/um"
198
+ },
199
+ "footprint": {
200
+ "type": "array",
201
+ "items": {
202
+ "$ref": "#/$defs/ring"
203
+ }
204
+ },
205
+ "floors": {
206
+ "type": "array",
207
+ "items": {
208
+ "$ref": "#/$defs/floor"
209
+ }
210
+ },
211
+ "walls": {
212
+ "type": "array",
213
+ "items": {
214
+ "$ref": "#/$defs/wall"
215
+ }
216
+ },
217
+ "demolished": {
218
+ "type": "array",
219
+ "description": "The storey's status-demolish walls, read from the plan as drawn and joined among themselves only; they host nothing. Absent when none.",
220
+ "items": {
221
+ "$ref": "#/$defs/wall"
222
+ }
223
+ },
224
+ "openings": {
225
+ "type": "array",
226
+ "items": {
227
+ "$ref": "#/$defs/opening"
228
+ }
229
+ },
230
+ "furniture": {
231
+ "type": "array",
232
+ "items": {
233
+ "$ref": "#/$defs/furniture"
234
+ }
235
+ },
236
+ "stairs": {
237
+ "type": "array",
238
+ "items": {
239
+ "$ref": "#/$defs/stair"
240
+ }
241
+ },
242
+ "voids": {
243
+ "type": "array",
244
+ "items": {
245
+ "$ref": "#/$defs/box"
246
+ }
247
+ },
248
+ "columns": {
249
+ "type": "array",
250
+ "items": {
251
+ "$ref": "#/$defs/box"
252
+ }
253
+ },
254
+ "outdoor": {
255
+ "type": "array",
256
+ "items": {
257
+ "$ref": "#/$defs/outdoor"
258
+ }
259
+ },
260
+ "fences": {
261
+ "type": "array",
262
+ "items": {
263
+ "$ref": "#/$defs/fence"
264
+ }
265
+ },
266
+ "roofs": {
267
+ "type": "array",
268
+ "items": {
269
+ "$ref": "#/$defs/roof"
270
+ }
271
+ }
272
+ }
273
+ },
274
+ "floor": {
275
+ "type": "object",
276
+ "required": ["id", "source", "polygon"],
277
+ "additionalProperties": false,
278
+ "properties": {
279
+ "id": {
280
+ "$ref": "#/$defs/id"
281
+ },
282
+ "source": {
283
+ "$ref": "#/$defs/source"
284
+ },
285
+ "polygon": {
286
+ "$ref": "#/$defs/polygon"
287
+ },
288
+ "uses": {
289
+ "type": "array",
290
+ "items": {
291
+ "type": "string"
292
+ }
293
+ },
294
+ "lift": {
295
+ "$ref": "#/$defs/um",
296
+ "description": "Lift of the floor finish over an earlier overlapping room's (V-GEO-05): 500 um per step; absent when none."
297
+ }
298
+ }
299
+ },
300
+ "wall": {
301
+ "type": "object",
302
+ "required": ["id", "source", "footprint", "body", "height", "thickness", "cuts"],
303
+ "additionalProperties": false,
304
+ "properties": {
305
+ "id": {
306
+ "$ref": "#/$defs/id"
307
+ },
308
+ "source": {
309
+ "$ref": "#/$defs/source"
310
+ },
311
+ "category": {
312
+ "type": "string"
313
+ },
314
+ "material": {
315
+ "type": "string"
316
+ },
317
+ "footprint": {
318
+ "type": "array",
319
+ "items": {
320
+ "$ref": "#/$defs/polygon"
321
+ },
322
+ "description": "Owned region after the core's joinery, one polygon per connected piece; openings NOT removed (see cuts)."
323
+ },
324
+ "body": {
325
+ "type": "array",
326
+ "items": {
327
+ "$ref": "#/$defs/polygon"
328
+ },
329
+ "description": "The owned pieces with every opening cut removed."
330
+ },
331
+ "height": {
332
+ "$ref": "#/$defs/um"
333
+ },
334
+ "thickness": {
335
+ "$ref": "#/$defs/um"
336
+ },
337
+ "cuts": {
338
+ "type": "array",
339
+ "items": {
340
+ "type": "string"
341
+ },
342
+ "description": "Ids of the openings this wall hosts."
343
+ }
344
+ }
345
+ },
346
+ "opening": {
347
+ "type": "object",
348
+ "required": ["id", "source", "kind", "host", "cut", "centre", "jambs", "width", "sill", "head"],
349
+ "additionalProperties": false,
350
+ "properties": {
351
+ "id": {
352
+ "$ref": "#/$defs/id"
353
+ },
354
+ "source": {
355
+ "$ref": "#/$defs/source"
356
+ },
357
+ "kind": {
358
+ "enum": ["door", "window", "opening"]
359
+ },
360
+ "doorKind": {
361
+ "enum": ["hinged", "sliding", "barn", "bifold", "pocket", "garage", "double"]
362
+ },
363
+ "host": {
364
+ "type": "string"
365
+ },
366
+ "cut": {
367
+ "$ref": "#/$defs/ring"
368
+ },
369
+ "centre": {
370
+ "$ref": "#/$defs/pt"
371
+ },
372
+ "jambs": {
373
+ "type": "array",
374
+ "items": {
375
+ "$ref": "#/$defs/pt"
376
+ },
377
+ "minItems": 2,
378
+ "maxItems": 2
379
+ },
380
+ "leaves": {
381
+ "type": "array",
382
+ "items": {
383
+ "type": "array",
384
+ "items": {
385
+ "$ref": "#/$defs/pt"
386
+ },
387
+ "minItems": 2,
388
+ "maxItems": 3
389
+ }
390
+ },
391
+ "width": {
392
+ "$ref": "#/$defs/um"
393
+ },
394
+ "sill": {
395
+ "$ref": "#/$defs/um"
396
+ },
397
+ "head": {
398
+ "$ref": "#/$defs/um"
399
+ },
400
+ "hinge": {
401
+ "enum": ["left", "right"]
402
+ },
403
+ "swing": {
404
+ "enum": ["in", "out"]
405
+ },
406
+ "slide": {
407
+ "enum": ["left", "right"]
408
+ }
409
+ }
410
+ },
411
+ "furniture": {
412
+ "type": "object",
413
+ "required": ["id", "source", "category", "centre", "size", "yawDeg", "asset"],
414
+ "additionalProperties": false,
415
+ "properties": {
416
+ "id": {
417
+ "$ref": "#/$defs/id"
418
+ },
419
+ "source": {
420
+ "$ref": "#/$defs/source"
421
+ },
422
+ "category": {
423
+ "type": "string"
424
+ },
425
+ "room": {
426
+ "type": "string"
427
+ },
428
+ "centre": {
429
+ "$ref": "#/$defs/pt"
430
+ },
431
+ "size": {
432
+ "type": "object",
433
+ "required": ["w", "d"],
434
+ "additionalProperties": false,
435
+ "properties": {
436
+ "w": {
437
+ "$ref": "#/$defs/um"
438
+ },
439
+ "d": {
440
+ "$ref": "#/$defs/um"
441
+ }
442
+ }
443
+ },
444
+ "yawDeg": {
445
+ "type": "integer"
446
+ },
447
+ "asset": {
448
+ "type": "string",
449
+ "description": "What the mesh builds it with: t0:<family> (a parametric generator) or greybox."
450
+ }
451
+ }
452
+ },
453
+ "box": {
454
+ "type": "object",
455
+ "required": ["id", "source", "at", "size"],
456
+ "additionalProperties": false,
457
+ "properties": {
458
+ "id": {
459
+ "$ref": "#/$defs/id"
460
+ },
461
+ "source": {
462
+ "$ref": "#/$defs/source"
463
+ },
464
+ "at": {
465
+ "$ref": "#/$defs/pt"
466
+ },
467
+ "size": {
468
+ "type": "object",
469
+ "required": ["w", "h"],
470
+ "additionalProperties": false,
471
+ "properties": {
472
+ "w": {
473
+ "$ref": "#/$defs/um"
474
+ },
475
+ "h": {
476
+ "$ref": "#/$defs/um"
477
+ }
478
+ }
479
+ }
480
+ }
481
+ },
482
+ "stair": {
483
+ "type": "object",
484
+ "required": ["id", "source", "box", "dir", "width"],
485
+ "additionalProperties": false,
486
+ "properties": {
487
+ "id": {
488
+ "$ref": "#/$defs/id"
489
+ },
490
+ "source": {
491
+ "$ref": "#/$defs/source"
492
+ },
493
+ "box": {
494
+ "$ref": "#/$defs/box"
495
+ },
496
+ "dir": {
497
+ "enum": ["up", "down"]
498
+ },
499
+ "width": {
500
+ "$ref": "#/$defs/um"
501
+ }
502
+ }
503
+ },
504
+ "outdoor": {
505
+ "type": "object",
506
+ "required": ["id", "source", "surface", "polygon"],
507
+ "additionalProperties": false,
508
+ "properties": {
509
+ "id": {
510
+ "$ref": "#/$defs/id"
511
+ },
512
+ "source": {
513
+ "$ref": "#/$defs/source"
514
+ },
515
+ "surface": {
516
+ "type": "string"
517
+ },
518
+ "polygon": {
519
+ "$ref": "#/$defs/polygon"
520
+ },
521
+ "rail": {
522
+ "type": "array",
523
+ "items": {
524
+ "type": "string"
525
+ }
526
+ }
527
+ }
528
+ },
529
+ "fence": {
530
+ "type": "object",
531
+ "required": ["id", "source", "style", "points", "closed"],
532
+ "additionalProperties": false,
533
+ "properties": {
534
+ "id": {
535
+ "$ref": "#/$defs/id"
536
+ },
537
+ "source": {
538
+ "$ref": "#/$defs/source"
539
+ },
540
+ "style": {
541
+ "type": "string"
542
+ },
543
+ "points": {
544
+ "type": "array",
545
+ "items": {
546
+ "$ref": "#/$defs/pt"
547
+ },
548
+ "minItems": 2
549
+ },
550
+ "closed": {
551
+ "type": "boolean"
552
+ }
553
+ }
554
+ },
555
+ "roof": {
556
+ "type": "object",
557
+ "required": ["id", "source", "form", "ring", "provenance"],
558
+ "additionalProperties": false,
559
+ "properties": {
560
+ "id": {
561
+ "$ref": "#/$defs/id"
562
+ },
563
+ "source": {
564
+ "$ref": "#/$defs/source"
565
+ },
566
+ "form": {
567
+ "const": "flat"
568
+ },
569
+ "ring": {
570
+ "$ref": "#/$defs/ring"
571
+ },
572
+ "provenance": {
573
+ "$ref": "#/$defs/provenance"
574
+ }
575
+ }
576
+ }
577
+ }
578
+ }