@pascal-app/core 0.7.0 → 0.8.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.
- package/dist/events/bus.d.ts +9 -6
- package/dist/events/bus.d.ts.map +1 -1
- package/dist/events/bus.js +1 -1
- package/dist/lib/polygon-geometry.d.ts.map +1 -1
- package/dist/lib/space-detection.d.ts.map +1 -1
- package/dist/lib/space-detection.js +10 -8
- package/dist/material-library.d.ts.map +1 -1
- package/dist/material-library.js +20 -1
- package/dist/schema/asset-url.test.js +0 -4
- package/dist/schema/material.d.ts +2 -2
- package/dist/schema/nodes/ceiling.d.ts +1 -1
- package/dist/schema/nodes/column.d.ts +1 -1
- package/dist/schema/nodes/door.d.ts +1 -1
- package/dist/schema/nodes/fence.d.ts +2 -2
- package/dist/schema/nodes/fence.js +2 -2
- package/dist/schema/nodes/item.d.ts +12 -0
- package/dist/schema/nodes/item.d.ts.map +1 -1
- package/dist/schema/nodes/item.js +12 -0
- package/dist/schema/nodes/roof-segment.d.ts +3 -3
- package/dist/schema/nodes/roof.d.ts +6 -6
- package/dist/schema/nodes/roof.d.ts.map +1 -1
- package/dist/schema/nodes/roof.js +5 -5
- package/dist/schema/nodes/site.d.ts +6 -0
- package/dist/schema/nodes/site.d.ts.map +1 -1
- package/dist/schema/nodes/slab.d.ts +1 -1
- package/dist/schema/nodes/stair-segment.d.ts +1 -1
- package/dist/schema/nodes/stair.d.ts +6 -6
- package/dist/schema/nodes/stair.d.ts.map +1 -1
- package/dist/schema/nodes/stair.js +9 -7
- package/dist/schema/nodes/wall.d.ts +3 -3
- package/dist/schema/nodes/window.d.ts +1 -1
- package/dist/schema/types.d.ts +33 -21
- package/dist/schema/types.d.ts.map +1 -1
- package/dist/store/actions/node-actions.d.ts.map +1 -1
- package/dist/store/actions/node-actions.js +7 -5
- package/dist/store/use-scene.d.ts.map +1 -1
- package/dist/store/use-scene.js +11 -5
- package/dist/systems/stair/stair-opening-sync.d.ts.map +1 -1
- package/dist/systems/stair/stair-opening-sync.js +17 -44
- package/dist/systems/stair/stair-opening-sync.test.js +0 -2
- package/dist/systems/wall/wall-curve.d.ts +1 -1
- package/dist/systems/wall/wall-curve.d.ts.map +1 -1
- package/dist/systems/wall/wall-curve.js +1 -1
- package/dist/systems/wall/wall-mitering.d.ts.map +1 -1
- package/dist/systems/wall/wall-mitering.js +2 -6
- package/package.json +4 -3
- package/dist/materials.d.ts +0 -10
- package/dist/materials.d.ts.map +0 -1
- package/dist/materials.js +0 -22
- package/dist/systems/ceiling/ceiling-system.d.ts +0 -8
- package/dist/systems/ceiling/ceiling-system.d.ts.map +0 -1
- package/dist/systems/ceiling/ceiling-system.js +0 -92
- package/dist/systems/door/door-system.d.ts +0 -2
- package/dist/systems/door/door-system.d.ts.map +0 -1
- package/dist/systems/door/door-system.js +0 -195
- package/dist/systems/fence/fence-system.d.ts +0 -2
- package/dist/systems/fence/fence-system.d.ts.map +0 -1
- package/dist/systems/fence/fence-system.js +0 -187
- package/dist/systems/item/item-system.d.ts +0 -2
- package/dist/systems/item/item-system.d.ts.map +0 -1
- package/dist/systems/item/item-system.js +0 -48
- package/dist/systems/roof/roof-system.d.ts +0 -16
- package/dist/systems/roof/roof-system.d.ts.map +0 -1
- package/dist/systems/roof/roof-system.js +0 -797
- package/dist/systems/slab/slab-system.d.ts +0 -8
- package/dist/systems/slab/slab-system.d.ts.map +0 -1
- package/dist/systems/slab/slab-system.js +0 -214
- package/dist/systems/stair/stair-system.d.ts +0 -2
- package/dist/systems/stair/stair-system.d.ts.map +0 -1
- package/dist/systems/stair/stair-system.js +0 -776
- package/dist/systems/wall/wall-system.d.ts +0 -12
- package/dist/systems/wall/wall-system.d.ts.map +0 -1
- package/dist/systems/wall/wall-system.js +0 -455
- package/dist/systems/window/window-system.d.ts +0 -2
- package/dist/systems/window/window-system.d.ts.map +0 -1
- package/dist/systems/window/window-system.js +0 -131
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stair.d.ts","sourceRoot":"","sources":["../../../src/schema/nodes/stair.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"stair.d.ts","sourceRoot":"","sources":["../../../src/schema/nodes/stair.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,KAAK,EAAE,cAAc,IAAI,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAIvE,eAAO,MAAM,gBAAgB;;;;;EAA4C,CAAA;AACzE,eAAO,MAAM,SAAS;;;;EAA2C,CAAA;AACjE,eAAO,MAAM,mBAAmB;;;EAAiC,CAAA;AACjE,eAAO,MAAM,oBAAoB;;;EAAkC,CAAA;AAEnE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAC/D,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAA;AACjD,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AACrE,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AACvE,MAAM,MAAM,wBAAwB,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAA;AACnE,MAAM,MAAM,wBAAwB,GAAG;IACrC,QAAQ,CAAC,EAAE,kBAAkB,CAAA;IAC7B,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB,CAAA;AAED,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA4DrB,CAAA;AAED,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAA;AASjD,wBAAgB,gCAAgC,CAC9C,IAAI,EAAE,SAAS,EACf,IAAI,EAAE,wBAAwB,GAC7B,wBAAwB,CAmE1B"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import dedent from 'dedent';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { BaseNode, nodeType, objectId } from '../base';
|
|
4
|
-
import { MaterialSchema
|
|
4
|
+
import { MaterialSchema } from '../material';
|
|
5
5
|
import { StairSegmentNode } from './stair-segment';
|
|
6
6
|
export const StairRailingMode = z.enum(['none', 'left', 'right', 'both']);
|
|
7
7
|
export const StairType = z.enum(['straight', 'curved', 'spiral']);
|
|
@@ -10,13 +10,13 @@ export const StairSlabOpeningMode = z.enum(['none', 'destination']);
|
|
|
10
10
|
export const StairNode = BaseNode.extend({
|
|
11
11
|
id: objectId('stair'),
|
|
12
12
|
type: nodeType('stair'),
|
|
13
|
-
material:
|
|
13
|
+
material: MaterialSchema.optional(),
|
|
14
14
|
materialPreset: z.string().optional(),
|
|
15
|
-
railingMaterial:
|
|
15
|
+
railingMaterial: MaterialSchema.optional(),
|
|
16
16
|
railingMaterialPreset: z.string().optional(),
|
|
17
|
-
treadMaterial:
|
|
17
|
+
treadMaterial: MaterialSchema.optional(),
|
|
18
18
|
treadMaterialPreset: z.string().optional(),
|
|
19
|
-
sideMaterial:
|
|
19
|
+
sideMaterial: MaterialSchema.optional(),
|
|
20
20
|
sideMaterialPreset: z.string().optional(),
|
|
21
21
|
position: z.tuple([z.number(), z.number(), z.number()]).default([0, 0, 0]),
|
|
22
22
|
// Rotation around Y axis in radians
|
|
@@ -105,10 +105,12 @@ export function getEffectiveStairSurfaceMaterial(node, role) {
|
|
|
105
105
|
material: node.sideMaterial,
|
|
106
106
|
materialPreset: typeof node.sideMaterialPreset === 'string' ? node.sideMaterialPreset : undefined,
|
|
107
107
|
};
|
|
108
|
-
if (role === 'tread' &&
|
|
108
|
+
if (role === 'tread' &&
|
|
109
|
+
(sideFallback.material !== undefined || sideFallback.materialPreset !== undefined)) {
|
|
109
110
|
return sideFallback;
|
|
110
111
|
}
|
|
111
|
-
if (role === 'side' &&
|
|
112
|
+
if (role === 'side' &&
|
|
113
|
+
(treadFallback.material !== undefined || treadFallback.materialPreset !== undefined)) {
|
|
112
114
|
return treadFallback;
|
|
113
115
|
}
|
|
114
116
|
if (role === 'railing') {
|
|
@@ -22,6 +22,7 @@ export declare const WallNode: z.ZodObject<{
|
|
|
22
22
|
material: z.ZodOptional<z.ZodObject<{
|
|
23
23
|
id: z.ZodOptional<z.ZodString>;
|
|
24
24
|
preset: z.ZodOptional<z.ZodEnum<{
|
|
25
|
+
custom: "custom";
|
|
25
26
|
white: "white";
|
|
26
27
|
brick: "brick";
|
|
27
28
|
concrete: "concrete";
|
|
@@ -31,7 +32,6 @@ export declare const WallNode: z.ZodObject<{
|
|
|
31
32
|
plaster: "plaster";
|
|
32
33
|
tile: "tile";
|
|
33
34
|
marble: "marble";
|
|
34
|
-
custom: "custom";
|
|
35
35
|
}>>;
|
|
36
36
|
properties: z.ZodOptional<z.ZodObject<{
|
|
37
37
|
color: z.ZodDefault<z.ZodString>;
|
|
@@ -55,6 +55,7 @@ export declare const WallNode: z.ZodObject<{
|
|
|
55
55
|
interiorMaterial: z.ZodOptional<z.ZodObject<{
|
|
56
56
|
id: z.ZodOptional<z.ZodString>;
|
|
57
57
|
preset: z.ZodOptional<z.ZodEnum<{
|
|
58
|
+
custom: "custom";
|
|
58
59
|
white: "white";
|
|
59
60
|
brick: "brick";
|
|
60
61
|
concrete: "concrete";
|
|
@@ -64,7 +65,6 @@ export declare const WallNode: z.ZodObject<{
|
|
|
64
65
|
plaster: "plaster";
|
|
65
66
|
tile: "tile";
|
|
66
67
|
marble: "marble";
|
|
67
|
-
custom: "custom";
|
|
68
68
|
}>>;
|
|
69
69
|
properties: z.ZodOptional<z.ZodObject<{
|
|
70
70
|
color: z.ZodDefault<z.ZodString>;
|
|
@@ -88,6 +88,7 @@ export declare const WallNode: z.ZodObject<{
|
|
|
88
88
|
exteriorMaterial: z.ZodOptional<z.ZodObject<{
|
|
89
89
|
id: z.ZodOptional<z.ZodString>;
|
|
90
90
|
preset: z.ZodOptional<z.ZodEnum<{
|
|
91
|
+
custom: "custom";
|
|
91
92
|
white: "white";
|
|
92
93
|
brick: "brick";
|
|
93
94
|
concrete: "concrete";
|
|
@@ -97,7 +98,6 @@ export declare const WallNode: z.ZodObject<{
|
|
|
97
98
|
plaster: "plaster";
|
|
98
99
|
tile: "tile";
|
|
99
100
|
marble: "marble";
|
|
100
|
-
custom: "custom";
|
|
101
101
|
}>>;
|
|
102
102
|
properties: z.ZodOptional<z.ZodObject<{
|
|
103
103
|
color: z.ZodDefault<z.ZodString>;
|
|
@@ -33,6 +33,7 @@ export declare const WindowNode: z.ZodObject<{
|
|
|
33
33
|
material: z.ZodOptional<z.ZodObject<{
|
|
34
34
|
id: z.ZodOptional<z.ZodString>;
|
|
35
35
|
preset: z.ZodOptional<z.ZodEnum<{
|
|
36
|
+
custom: "custom";
|
|
36
37
|
white: "white";
|
|
37
38
|
brick: "brick";
|
|
38
39
|
concrete: "concrete";
|
|
@@ -42,7 +43,6 @@ export declare const WindowNode: z.ZodObject<{
|
|
|
42
43
|
plaster: "plaster";
|
|
43
44
|
tile: "tile";
|
|
44
45
|
marble: "marble";
|
|
45
|
-
custom: "custom";
|
|
46
46
|
}>>;
|
|
47
47
|
properties: z.ZodOptional<z.ZodObject<{
|
|
48
48
|
color: z.ZodDefault<z.ZodString>;
|
package/dist/schema/types.d.ts
CHANGED
|
@@ -77,6 +77,12 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
77
77
|
name: z.ZodString;
|
|
78
78
|
thumbnail: z.ZodString;
|
|
79
79
|
floorPlanUrl: z.ZodOptional<z.ZodString>;
|
|
80
|
+
source: z.ZodDefault<z.ZodEnum<{
|
|
81
|
+
library: "library";
|
|
82
|
+
community: "community";
|
|
83
|
+
mine: "mine";
|
|
84
|
+
}>>;
|
|
85
|
+
isDraft: z.ZodOptional<z.ZodBoolean>;
|
|
80
86
|
src: z.ZodString;
|
|
81
87
|
dimensions: z.ZodDefault<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
82
88
|
attachTo: z.ZodOptional<z.ZodEnum<{
|
|
@@ -332,6 +338,7 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
332
338
|
material: z.ZodOptional<z.ZodObject<{
|
|
333
339
|
id: z.ZodOptional<z.ZodString>;
|
|
334
340
|
preset: z.ZodOptional<z.ZodEnum<{
|
|
341
|
+
custom: "custom";
|
|
335
342
|
white: "white";
|
|
336
343
|
brick: "brick";
|
|
337
344
|
concrete: "concrete";
|
|
@@ -341,7 +348,6 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
341
348
|
plaster: "plaster";
|
|
342
349
|
tile: "tile";
|
|
343
350
|
marble: "marble";
|
|
344
|
-
custom: "custom";
|
|
345
351
|
}>>;
|
|
346
352
|
properties: z.ZodOptional<z.ZodObject<{
|
|
347
353
|
color: z.ZodDefault<z.ZodString>;
|
|
@@ -384,6 +390,7 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
384
390
|
material: z.ZodOptional<z.ZodObject<{
|
|
385
391
|
id: z.ZodOptional<z.ZodString>;
|
|
386
392
|
preset: z.ZodOptional<z.ZodEnum<{
|
|
393
|
+
custom: "custom";
|
|
387
394
|
white: "white";
|
|
388
395
|
brick: "brick";
|
|
389
396
|
concrete: "concrete";
|
|
@@ -393,7 +400,6 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
393
400
|
plaster: "plaster";
|
|
394
401
|
tile: "tile";
|
|
395
402
|
marble: "marble";
|
|
396
|
-
custom: "custom";
|
|
397
403
|
}>>;
|
|
398
404
|
properties: z.ZodOptional<z.ZodObject<{
|
|
399
405
|
color: z.ZodDefault<z.ZodString>;
|
|
@@ -417,6 +423,7 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
417
423
|
interiorMaterial: z.ZodOptional<z.ZodObject<{
|
|
418
424
|
id: z.ZodOptional<z.ZodString>;
|
|
419
425
|
preset: z.ZodOptional<z.ZodEnum<{
|
|
426
|
+
custom: "custom";
|
|
420
427
|
white: "white";
|
|
421
428
|
brick: "brick";
|
|
422
429
|
concrete: "concrete";
|
|
@@ -426,7 +433,6 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
426
433
|
plaster: "plaster";
|
|
427
434
|
tile: "tile";
|
|
428
435
|
marble: "marble";
|
|
429
|
-
custom: "custom";
|
|
430
436
|
}>>;
|
|
431
437
|
properties: z.ZodOptional<z.ZodObject<{
|
|
432
438
|
color: z.ZodDefault<z.ZodString>;
|
|
@@ -450,6 +456,7 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
450
456
|
exteriorMaterial: z.ZodOptional<z.ZodObject<{
|
|
451
457
|
id: z.ZodOptional<z.ZodString>;
|
|
452
458
|
preset: z.ZodOptional<z.ZodEnum<{
|
|
459
|
+
custom: "custom";
|
|
453
460
|
white: "white";
|
|
454
461
|
brick: "brick";
|
|
455
462
|
concrete: "concrete";
|
|
@@ -459,7 +466,6 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
459
466
|
plaster: "plaster";
|
|
460
467
|
tile: "tile";
|
|
461
468
|
marble: "marble";
|
|
462
|
-
custom: "custom";
|
|
463
469
|
}>>;
|
|
464
470
|
properties: z.ZodOptional<z.ZodObject<{
|
|
465
471
|
color: z.ZodDefault<z.ZodString>;
|
|
@@ -516,6 +522,7 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
516
522
|
material: z.ZodOptional<z.ZodObject<{
|
|
517
523
|
id: z.ZodOptional<z.ZodString>;
|
|
518
524
|
preset: z.ZodOptional<z.ZodEnum<{
|
|
525
|
+
custom: "custom";
|
|
519
526
|
white: "white";
|
|
520
527
|
brick: "brick";
|
|
521
528
|
concrete: "concrete";
|
|
@@ -525,7 +532,6 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
525
532
|
plaster: "plaster";
|
|
526
533
|
tile: "tile";
|
|
527
534
|
marble: "marble";
|
|
528
|
-
custom: "custom";
|
|
529
535
|
}>>;
|
|
530
536
|
properties: z.ZodOptional<z.ZodObject<{
|
|
531
537
|
color: z.ZodDefault<z.ZodString>;
|
|
@@ -548,9 +554,9 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
548
554
|
materialPreset: z.ZodOptional<z.ZodString>;
|
|
549
555
|
start: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
550
556
|
end: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
551
|
-
curveOffset: z.ZodOptional<z.ZodNumber>;
|
|
552
557
|
height: z.ZodDefault<z.ZodNumber>;
|
|
553
558
|
thickness: z.ZodDefault<z.ZodNumber>;
|
|
559
|
+
curveOffset: z.ZodOptional<z.ZodNumber>;
|
|
554
560
|
baseHeight: z.ZodDefault<z.ZodNumber>;
|
|
555
561
|
postSpacing: z.ZodDefault<z.ZodNumber>;
|
|
556
562
|
postSize: z.ZodDefault<z.ZodNumber>;
|
|
@@ -602,6 +608,12 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
602
608
|
name: z.ZodString;
|
|
603
609
|
thumbnail: z.ZodString;
|
|
604
610
|
floorPlanUrl: z.ZodOptional<z.ZodString>;
|
|
611
|
+
source: z.ZodDefault<z.ZodEnum<{
|
|
612
|
+
library: "library";
|
|
613
|
+
community: "community";
|
|
614
|
+
mine: "mine";
|
|
615
|
+
}>>;
|
|
616
|
+
isDraft: z.ZodOptional<z.ZodBoolean>;
|
|
605
617
|
src: z.ZodString;
|
|
606
618
|
dimensions: z.ZodDefault<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
607
619
|
attachTo: z.ZodOptional<z.ZodEnum<{
|
|
@@ -702,6 +714,7 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
702
714
|
material: z.ZodOptional<z.ZodObject<{
|
|
703
715
|
id: z.ZodOptional<z.ZodString>;
|
|
704
716
|
preset: z.ZodOptional<z.ZodEnum<{
|
|
717
|
+
custom: "custom";
|
|
705
718
|
white: "white";
|
|
706
719
|
brick: "brick";
|
|
707
720
|
concrete: "concrete";
|
|
@@ -711,7 +724,6 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
711
724
|
plaster: "plaster";
|
|
712
725
|
tile: "tile";
|
|
713
726
|
marble: "marble";
|
|
714
|
-
custom: "custom";
|
|
715
727
|
}>>;
|
|
716
728
|
properties: z.ZodOptional<z.ZodObject<{
|
|
717
729
|
color: z.ZodDefault<z.ZodString>;
|
|
@@ -765,6 +777,7 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
765
777
|
material: z.ZodOptional<z.ZodObject<{
|
|
766
778
|
id: z.ZodOptional<z.ZodString>;
|
|
767
779
|
preset: z.ZodOptional<z.ZodEnum<{
|
|
780
|
+
custom: "custom";
|
|
768
781
|
white: "white";
|
|
769
782
|
brick: "brick";
|
|
770
783
|
concrete: "concrete";
|
|
@@ -774,7 +787,6 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
774
787
|
plaster: "plaster";
|
|
775
788
|
tile: "tile";
|
|
776
789
|
marble: "marble";
|
|
777
|
-
custom: "custom";
|
|
778
790
|
}>>;
|
|
779
791
|
properties: z.ZodOptional<z.ZodObject<{
|
|
780
792
|
color: z.ZodDefault<z.ZodString>;
|
|
@@ -827,6 +839,7 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
827
839
|
material: z.ZodOptional<z.ZodObject<{
|
|
828
840
|
id: z.ZodOptional<z.ZodString>;
|
|
829
841
|
preset: z.ZodOptional<z.ZodEnum<{
|
|
842
|
+
custom: "custom";
|
|
830
843
|
white: "white";
|
|
831
844
|
brick: "brick";
|
|
832
845
|
concrete: "concrete";
|
|
@@ -836,7 +849,6 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
836
849
|
plaster: "plaster";
|
|
837
850
|
tile: "tile";
|
|
838
851
|
marble: "marble";
|
|
839
|
-
custom: "custom";
|
|
840
852
|
}>>;
|
|
841
853
|
properties: z.ZodOptional<z.ZodObject<{
|
|
842
854
|
color: z.ZodDefault<z.ZodString>;
|
|
@@ -860,6 +872,7 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
860
872
|
topMaterial: z.ZodOptional<z.ZodObject<{
|
|
861
873
|
id: z.ZodOptional<z.ZodString>;
|
|
862
874
|
preset: z.ZodOptional<z.ZodEnum<{
|
|
875
|
+
custom: "custom";
|
|
863
876
|
white: "white";
|
|
864
877
|
brick: "brick";
|
|
865
878
|
concrete: "concrete";
|
|
@@ -869,7 +882,6 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
869
882
|
plaster: "plaster";
|
|
870
883
|
tile: "tile";
|
|
871
884
|
marble: "marble";
|
|
872
|
-
custom: "custom";
|
|
873
885
|
}>>;
|
|
874
886
|
properties: z.ZodOptional<z.ZodObject<{
|
|
875
887
|
color: z.ZodDefault<z.ZodString>;
|
|
@@ -893,6 +905,7 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
893
905
|
edgeMaterial: z.ZodOptional<z.ZodObject<{
|
|
894
906
|
id: z.ZodOptional<z.ZodString>;
|
|
895
907
|
preset: z.ZodOptional<z.ZodEnum<{
|
|
908
|
+
custom: "custom";
|
|
896
909
|
white: "white";
|
|
897
910
|
brick: "brick";
|
|
898
911
|
concrete: "concrete";
|
|
@@ -902,7 +915,6 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
902
915
|
plaster: "plaster";
|
|
903
916
|
tile: "tile";
|
|
904
917
|
marble: "marble";
|
|
905
|
-
custom: "custom";
|
|
906
918
|
}>>;
|
|
907
919
|
properties: z.ZodOptional<z.ZodObject<{
|
|
908
920
|
color: z.ZodDefault<z.ZodString>;
|
|
@@ -926,6 +938,7 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
926
938
|
wallMaterial: z.ZodOptional<z.ZodObject<{
|
|
927
939
|
id: z.ZodOptional<z.ZodString>;
|
|
928
940
|
preset: z.ZodOptional<z.ZodEnum<{
|
|
941
|
+
custom: "custom";
|
|
929
942
|
white: "white";
|
|
930
943
|
brick: "brick";
|
|
931
944
|
concrete: "concrete";
|
|
@@ -935,7 +948,6 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
935
948
|
plaster: "plaster";
|
|
936
949
|
tile: "tile";
|
|
937
950
|
marble: "marble";
|
|
938
|
-
custom: "custom";
|
|
939
951
|
}>>;
|
|
940
952
|
properties: z.ZodOptional<z.ZodObject<{
|
|
941
953
|
color: z.ZodDefault<z.ZodString>;
|
|
@@ -980,6 +992,7 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
980
992
|
material: z.ZodOptional<z.ZodObject<{
|
|
981
993
|
id: z.ZodOptional<z.ZodString>;
|
|
982
994
|
preset: z.ZodOptional<z.ZodEnum<{
|
|
995
|
+
custom: "custom";
|
|
983
996
|
white: "white";
|
|
984
997
|
brick: "brick";
|
|
985
998
|
concrete: "concrete";
|
|
@@ -989,7 +1002,6 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
989
1002
|
plaster: "plaster";
|
|
990
1003
|
tile: "tile";
|
|
991
1004
|
marble: "marble";
|
|
992
|
-
custom: "custom";
|
|
993
1005
|
}>>;
|
|
994
1006
|
properties: z.ZodOptional<z.ZodObject<{
|
|
995
1007
|
color: z.ZodDefault<z.ZodString>;
|
|
@@ -1013,13 +1025,13 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1013
1025
|
position: z.ZodDefault<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
1014
1026
|
rotation: z.ZodDefault<z.ZodNumber>;
|
|
1015
1027
|
roofType: z.ZodDefault<z.ZodEnum<{
|
|
1028
|
+
flat: "flat";
|
|
1016
1029
|
hip: "hip";
|
|
1017
1030
|
gable: "gable";
|
|
1018
1031
|
shed: "shed";
|
|
1019
1032
|
gambrel: "gambrel";
|
|
1020
1033
|
dutch: "dutch";
|
|
1021
1034
|
mansard: "mansard";
|
|
1022
|
-
flat: "flat";
|
|
1023
1035
|
}>>;
|
|
1024
1036
|
width: z.ZodDefault<z.ZodNumber>;
|
|
1025
1037
|
depth: z.ZodDefault<z.ZodNumber>;
|
|
@@ -1050,6 +1062,7 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1050
1062
|
material: z.ZodOptional<z.ZodObject<{
|
|
1051
1063
|
id: z.ZodOptional<z.ZodString>;
|
|
1052
1064
|
preset: z.ZodOptional<z.ZodEnum<{
|
|
1065
|
+
custom: "custom";
|
|
1053
1066
|
white: "white";
|
|
1054
1067
|
brick: "brick";
|
|
1055
1068
|
concrete: "concrete";
|
|
@@ -1059,7 +1072,6 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1059
1072
|
plaster: "plaster";
|
|
1060
1073
|
tile: "tile";
|
|
1061
1074
|
marble: "marble";
|
|
1062
|
-
custom: "custom";
|
|
1063
1075
|
}>>;
|
|
1064
1076
|
properties: z.ZodOptional<z.ZodObject<{
|
|
1065
1077
|
color: z.ZodDefault<z.ZodString>;
|
|
@@ -1083,6 +1095,7 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1083
1095
|
railingMaterial: z.ZodOptional<z.ZodObject<{
|
|
1084
1096
|
id: z.ZodOptional<z.ZodString>;
|
|
1085
1097
|
preset: z.ZodOptional<z.ZodEnum<{
|
|
1098
|
+
custom: "custom";
|
|
1086
1099
|
white: "white";
|
|
1087
1100
|
brick: "brick";
|
|
1088
1101
|
concrete: "concrete";
|
|
@@ -1092,7 +1105,6 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1092
1105
|
plaster: "plaster";
|
|
1093
1106
|
tile: "tile";
|
|
1094
1107
|
marble: "marble";
|
|
1095
|
-
custom: "custom";
|
|
1096
1108
|
}>>;
|
|
1097
1109
|
properties: z.ZodOptional<z.ZodObject<{
|
|
1098
1110
|
color: z.ZodDefault<z.ZodString>;
|
|
@@ -1116,6 +1128,7 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1116
1128
|
treadMaterial: z.ZodOptional<z.ZodObject<{
|
|
1117
1129
|
id: z.ZodOptional<z.ZodString>;
|
|
1118
1130
|
preset: z.ZodOptional<z.ZodEnum<{
|
|
1131
|
+
custom: "custom";
|
|
1119
1132
|
white: "white";
|
|
1120
1133
|
brick: "brick";
|
|
1121
1134
|
concrete: "concrete";
|
|
@@ -1125,7 +1138,6 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1125
1138
|
plaster: "plaster";
|
|
1126
1139
|
tile: "tile";
|
|
1127
1140
|
marble: "marble";
|
|
1128
|
-
custom: "custom";
|
|
1129
1141
|
}>>;
|
|
1130
1142
|
properties: z.ZodOptional<z.ZodObject<{
|
|
1131
1143
|
color: z.ZodDefault<z.ZodString>;
|
|
@@ -1149,6 +1161,7 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1149
1161
|
sideMaterial: z.ZodOptional<z.ZodObject<{
|
|
1150
1162
|
id: z.ZodOptional<z.ZodString>;
|
|
1151
1163
|
preset: z.ZodOptional<z.ZodEnum<{
|
|
1164
|
+
custom: "custom";
|
|
1152
1165
|
white: "white";
|
|
1153
1166
|
brick: "brick";
|
|
1154
1167
|
concrete: "concrete";
|
|
@@ -1158,7 +1171,6 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1158
1171
|
plaster: "plaster";
|
|
1159
1172
|
tile: "tile";
|
|
1160
1173
|
marble: "marble";
|
|
1161
|
-
custom: "custom";
|
|
1162
1174
|
}>>;
|
|
1163
1175
|
properties: z.ZodOptional<z.ZodObject<{
|
|
1164
1176
|
color: z.ZodDefault<z.ZodString>;
|
|
@@ -1236,6 +1248,7 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1236
1248
|
material: z.ZodOptional<z.ZodObject<{
|
|
1237
1249
|
id: z.ZodOptional<z.ZodString>;
|
|
1238
1250
|
preset: z.ZodOptional<z.ZodEnum<{
|
|
1251
|
+
custom: "custom";
|
|
1239
1252
|
white: "white";
|
|
1240
1253
|
brick: "brick";
|
|
1241
1254
|
concrete: "concrete";
|
|
@@ -1245,7 +1258,6 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1245
1258
|
plaster: "plaster";
|
|
1246
1259
|
tile: "tile";
|
|
1247
1260
|
marble: "marble";
|
|
1248
|
-
custom: "custom";
|
|
1249
1261
|
}>>;
|
|
1250
1262
|
properties: z.ZodOptional<z.ZodObject<{
|
|
1251
1263
|
color: z.ZodDefault<z.ZodString>;
|
|
@@ -1378,6 +1390,7 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1378
1390
|
material: z.ZodOptional<z.ZodObject<{
|
|
1379
1391
|
id: z.ZodOptional<z.ZodString>;
|
|
1380
1392
|
preset: z.ZodOptional<z.ZodEnum<{
|
|
1393
|
+
custom: "custom";
|
|
1381
1394
|
white: "white";
|
|
1382
1395
|
brick: "brick";
|
|
1383
1396
|
concrete: "concrete";
|
|
@@ -1387,7 +1400,6 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1387
1400
|
plaster: "plaster";
|
|
1388
1401
|
tile: "tile";
|
|
1389
1402
|
marble: "marble";
|
|
1390
|
-
custom: "custom";
|
|
1391
1403
|
}>>;
|
|
1392
1404
|
properties: z.ZodOptional<z.ZodObject<{
|
|
1393
1405
|
color: z.ZodDefault<z.ZodString>;
|
|
@@ -1488,6 +1500,7 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1488
1500
|
material: z.ZodOptional<z.ZodObject<{
|
|
1489
1501
|
id: z.ZodOptional<z.ZodString>;
|
|
1490
1502
|
preset: z.ZodOptional<z.ZodEnum<{
|
|
1503
|
+
custom: "custom";
|
|
1491
1504
|
white: "white";
|
|
1492
1505
|
brick: "brick";
|
|
1493
1506
|
concrete: "concrete";
|
|
@@ -1497,7 +1510,6 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1497
1510
|
plaster: "plaster";
|
|
1498
1511
|
tile: "tile";
|
|
1499
1512
|
marble: "marble";
|
|
1500
|
-
custom: "custom";
|
|
1501
1513
|
}>>;
|
|
1502
1514
|
properties: z.ZodOptional<z.ZodObject<{
|
|
1503
1515
|
color: z.ZodDefault<z.ZodString>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/schema/types.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAA;AAqBnB,eAAO,MAAM,OAAO
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src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EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"node-actions.d.ts","sourceRoot":"","sources":["../../../src/store/actions/node-actions.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,SAAS,EAIf,MAAM,cAAc,CAAA;AAErB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AA+N9C,eAAO,MAAM,iBAAiB,GAC5B,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,OAAO,CAAC,UAAU,CAAC,KAAK,IAAI,EAC7D,KAAK,MAAM,UAAU,EACrB,KAAK;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,EAAE,SAAS,CAAA;CAAE,EAAE,SA+C/C,CAAA;AAED,eAAO,MAAM,iBAAiB,GAC5B,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,OAAO,CAAC,UAAU,CAAC,KAAK,IAAI,EAC7D,KAAK,MAAM,UAAU,EACrB,SAAS;IAAE,EAAE,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,CAAA;CAAE,EAAE,SA+DrD,CAAA;AAED,eAAO,MAAM,iBAAiB,GAC5B,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,OAAO,CAAC,UAAU,CAAC,KAAK,IAAI,EAC7D,KAAK,MAAM,UAAU,EACrB,KAAK,SAAS,EAAE,SAsGjB,CAAA"}
|
|
@@ -72,7 +72,7 @@ function buildMergedWallAttachmentUpdates(primary, secondary, mergedWallId, merg
|
|
|
72
72
|
const wallChildren = [...(primary.children ?? []), ...(secondary.children ?? [])];
|
|
73
73
|
for (const childId of wallChildren) {
|
|
74
74
|
const child = nodes[childId];
|
|
75
|
-
if (!child
|
|
75
|
+
if (!(child && 'position' in child && Array.isArray(child.position))) {
|
|
76
76
|
continue;
|
|
77
77
|
}
|
|
78
78
|
const sourceWall = child.parentId === secondary.id ? secondary : primary;
|
|
@@ -123,10 +123,10 @@ function buildWallMergePlans(nodes, idsToDelete) {
|
|
|
123
123
|
return a.id.localeCompare(b.id);
|
|
124
124
|
});
|
|
125
125
|
const [primary, secondary] = sortedCandidates;
|
|
126
|
-
if (!primary
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
126
|
+
if (!(primary &&
|
|
127
|
+
secondary &&
|
|
128
|
+
areWallStylesCompatible(primary, secondary) &&
|
|
129
|
+
areWallsCollinearAcrossPoint(primary, secondary, junction))) {
|
|
130
130
|
continue;
|
|
131
131
|
}
|
|
132
132
|
const { start, end } = resolveMergedWallEndpoints(primary, secondary, junction);
|
|
@@ -186,6 +186,8 @@ export const createNodesAction = (set, get, ops) => {
|
|
|
186
186
|
get().markDirty(node.id);
|
|
187
187
|
if (parentId)
|
|
188
188
|
get().markDirty(parentId);
|
|
189
|
+
else if (node.parentId)
|
|
190
|
+
get().markDirty(node.parentId);
|
|
189
191
|
});
|
|
190
192
|
};
|
|
191
193
|
export const updateNodesAction = (set, get, updates) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-scene.d.ts","sourceRoot":"","sources":["../../src/store/use-scene.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAE1C,OAAO,EAAU,KAAK,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,SAAS,CAAA;AAEnE,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAMrE,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAgZzD,MAAM,MAAM,UAAU,GAAG;IAEvB,KAAK,EAAE,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAA;IAGjC,WAAW,EAAE,SAAS,EAAE,CAAA;IAGxB,UAAU,EAAE,GAAG,CAAC,SAAS,CAAC,CAAA;IAG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AAO,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,KAAK,IAAI,CAAA;IACnF,eAAe,EAAE,CAAC,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,KAAK,IAAI,CAAA;IAC9D,oBAAoB,EAAE,CAAC,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,KAAK,IAAI,CAAA;CACpE,CAAA;AAID,KAAK,aAAa,GAAG,aAAa,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,GAAG;IACzD,QAAQ,EAAE,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,GAAG,aAAa,GAAG,aAAa,CAAC,CAAC,CAAC,CAAA;CAC7F,CAAA;AAED,QAAA,MAAM,QAAQ,EAAE,aA+Of,CAAA;AAED,eAAe,QAAQ,CAAA;AAOvB,wBAAgB,iBAAiB,SAMhC"}
|
package/dist/store/use-scene.js
CHANGED
|
@@ -88,7 +88,7 @@ function migrateWallSurfaceMaterials(node) {
|
|
|
88
88
|
material: node.material,
|
|
89
89
|
materialPreset: typeof node.materialPreset === 'string' ? node.materialPreset : undefined,
|
|
90
90
|
};
|
|
91
|
-
if (!hasInterior
|
|
91
|
+
if (!(hasInterior || hasExterior)) {
|
|
92
92
|
if (legacyFinish.material === undefined && legacyFinish.materialPreset === undefined) {
|
|
93
93
|
return node;
|
|
94
94
|
}
|
|
@@ -139,7 +139,7 @@ function migrateStairSurfaceMaterials(node) {
|
|
|
139
139
|
}
|
|
140
140
|
return legacyFinish;
|
|
141
141
|
};
|
|
142
|
-
if (!hasRailing
|
|
142
|
+
if (!(hasRailing || hasTread || hasSide)) {
|
|
143
143
|
if (legacyFinish.material === undefined && legacyFinish.materialPreset === undefined) {
|
|
144
144
|
return node;
|
|
145
145
|
}
|
|
@@ -189,7 +189,7 @@ function migrateRoofSurfaceMaterials(node) {
|
|
|
189
189
|
material: node.material,
|
|
190
190
|
materialPreset: typeof node.materialPreset === 'string' ? node.materialPreset : undefined,
|
|
191
191
|
};
|
|
192
|
-
if (!hasTop
|
|
192
|
+
if (!(hasTop || hasEdge || hasWall)) {
|
|
193
193
|
if (legacyFinish.material === undefined && legacyFinish.materialPreset === undefined) {
|
|
194
194
|
return node;
|
|
195
195
|
}
|
|
@@ -291,7 +291,7 @@ function migrateNodes(nodes) {
|
|
|
291
291
|
return patchedNodes;
|
|
292
292
|
}
|
|
293
293
|
function getNodeChildIds(node) {
|
|
294
|
-
if (!('children' in node
|
|
294
|
+
if (!('children' in node && Array.isArray(node.children))) {
|
|
295
295
|
return [];
|
|
296
296
|
}
|
|
297
297
|
return node.children
|
|
@@ -373,6 +373,12 @@ const useScene = create()(temporal((set, get) => ({
|
|
|
373
373
|
delete cleanedNodes[node.id];
|
|
374
374
|
}
|
|
375
375
|
}
|
|
376
|
+
set({
|
|
377
|
+
nodes: cleanedNodes,
|
|
378
|
+
rootNodeIds,
|
|
379
|
+
dirtyNodes: new Set(),
|
|
380
|
+
collections: {},
|
|
381
|
+
});
|
|
376
382
|
const normalizedRootNodeIds = normalizeRootNodeIds(cleanedNodes, rootNodeIds);
|
|
377
383
|
const reachableNodeIds = collectReachableNodeIds(cleanedNodes, normalizedRootNodeIds);
|
|
378
384
|
if (normalizedRootNodeIds.length > 0) {
|
|
@@ -547,8 +553,8 @@ let prevPastLength = 0;
|
|
|
547
553
|
let prevFutureLength = 0;
|
|
548
554
|
let prevNodesSnapshot = null;
|
|
549
555
|
export function clearSceneHistory() {
|
|
550
|
-
useScene.temporal.getState().clear();
|
|
551
556
|
resetSceneHistoryPauseDepth();
|
|
557
|
+
useScene.temporal.getState().clear();
|
|
552
558
|
prevPastLength = 0;
|
|
553
559
|
prevFutureLength = 0;
|
|
554
560
|
prevNodesSnapshot = null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stair-opening-sync.d.ts","sourceRoot":"","sources":["../../../src/systems/stair/stair-opening-sync.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"stair-opening-sync.d.ts","sourceRoot":"","sources":["../../../src/systems/stair/stair-opening-sync.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,OAAO,EACP,SAAS,EACT,WAAW,EACX,QAAQ,EAGT,MAAM,cAAc,CAAA;AA6pBrB,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;QAQvC,SAAS;UAAQ,OAAO,CAAC,QAAQ,GAAG,WAAW,CAAC;IAuG5E"}
|