@pascal-app/core 0.3.3 → 0.5.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 +15 -2
- package/dist/events/bus.d.ts.map +1 -1
- package/dist/hooks/scene-registry/scene-registry.d.ts +2 -0
- package/dist/hooks/scene-registry/scene-registry.d.ts.map +1 -1
- package/dist/hooks/scene-registry/scene-registry.js +3 -0
- package/dist/hooks/spatial-grid/spatial-grid-sync.d.ts +1 -1
- package/dist/hooks/spatial-grid/spatial-grid-sync.d.ts.map +1 -1
- package/dist/hooks/spatial-grid/spatial-grid-sync.js +11 -3
- package/dist/index.d.ts +6 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -8
- package/dist/materials.d.ts +10 -0
- package/dist/materials.d.ts.map +1 -0
- package/dist/materials.js +22 -0
- package/dist/schema/index.d.ts +3 -1
- package/dist/schema/index.d.ts.map +1 -1
- package/dist/schema/index.js +3 -1
- package/dist/schema/material.d.ts +2 -2
- package/dist/schema/nodes/ceiling.d.ts +1 -1
- package/dist/schema/nodes/door.d.ts +1 -1
- package/dist/schema/nodes/item.d.ts +2 -2
- package/dist/schema/nodes/level.d.ts +1 -1
- package/dist/schema/nodes/level.d.ts.map +1 -1
- package/dist/schema/nodes/level.js +2 -0
- package/dist/schema/nodes/roof-segment.d.ts +1 -1
- package/dist/schema/nodes/roof.d.ts +1 -1
- package/dist/schema/nodes/site.d.ts +1 -1
- package/dist/schema/nodes/slab.d.ts +1 -1
- package/dist/schema/nodes/stair-segment.d.ts +81 -0
- package/dist/schema/nodes/stair-segment.d.ts.map +1 -0
- package/dist/schema/nodes/stair-segment.js +42 -0
- package/dist/schema/nodes/stair.d.ts +56 -0
- package/dist/schema/nodes/stair.d.ts.map +1 -0
- package/dist/schema/nodes/stair.js +22 -0
- package/dist/schema/nodes/wall.d.ts +1 -1
- package/dist/schema/nodes/window.d.ts +1 -1
- package/dist/schema/types.d.ts +128 -10
- package/dist/schema/types.d.ts.map +1 -1
- package/dist/schema/types.js +4 -0
- package/dist/store/actions/node-actions.d.ts.map +1 -1
- package/dist/store/actions/node-actions.js +25 -29
- package/dist/store/use-live-transforms.d.ts +14 -0
- package/dist/store/use-live-transforms.d.ts.map +1 -0
- package/dist/store/use-live-transforms.js +20 -0
- package/dist/store/use-scene.d.ts +2 -5
- package/dist/store/use-scene.d.ts.map +1 -1
- package/dist/store/use-scene.js +25 -15
- package/dist/systems/door/door-system.d.ts.map +1 -1
- package/dist/systems/door/door-system.js +1 -17
- package/dist/systems/roof/roof-system.d.ts.map +1 -1
- package/dist/systems/roof/roof-system.js +18 -0
- package/dist/systems/slab/slab-system.d.ts.map +1 -1
- package/dist/systems/slab/slab-system.js +71 -26
- package/dist/systems/stair/stair-system.d.ts +2 -0
- package/dist/systems/stair/stair-system.d.ts.map +1 -0
- package/dist/systems/stair/stair-system.js +354 -0
- package/dist/systems/wall/wall-system.d.ts.map +1 -1
- package/dist/systems/wall/wall-system.js +2 -0
- package/dist/systems/window/window-system.d.ts.map +1 -1
- package/dist/systems/window/window-system.js +8 -24
- package/dist/utils/clone-scene-graph.d.ts +25 -1
- package/dist/utils/clone-scene-graph.d.ts.map +1 -1
- package/dist/utils/clone-scene-graph.js +160 -5
- package/package.json +6 -1
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const StairNode: z.ZodObject<{
|
|
3
|
+
object: z.ZodDefault<z.ZodLiteral<"node">>;
|
|
4
|
+
name: z.ZodOptional<z.ZodString>;
|
|
5
|
+
parentId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
6
|
+
visible: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
7
|
+
camera: z.ZodOptional<z.ZodObject<{
|
|
8
|
+
position: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
9
|
+
target: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
10
|
+
mode: z.ZodDefault<z.ZodEnum<{
|
|
11
|
+
perspective: "perspective";
|
|
12
|
+
orthographic: "orthographic";
|
|
13
|
+
}>>;
|
|
14
|
+
fov: z.ZodOptional<z.ZodNumber>;
|
|
15
|
+
zoom: z.ZodOptional<z.ZodNumber>;
|
|
16
|
+
}, z.core.$strip>>;
|
|
17
|
+
metadata: z.ZodDefault<z.ZodOptional<z.ZodJSONSchema>>;
|
|
18
|
+
id: z.ZodDefault<z.ZodTemplateLiteral<`stair_${string}`>>;
|
|
19
|
+
type: z.ZodDefault<z.ZodLiteral<"stair">>;
|
|
20
|
+
material: z.ZodOptional<z.ZodObject<{
|
|
21
|
+
preset: z.ZodOptional<z.ZodEnum<{
|
|
22
|
+
custom: "custom";
|
|
23
|
+
white: "white";
|
|
24
|
+
brick: "brick";
|
|
25
|
+
concrete: "concrete";
|
|
26
|
+
wood: "wood";
|
|
27
|
+
glass: "glass";
|
|
28
|
+
metal: "metal";
|
|
29
|
+
plaster: "plaster";
|
|
30
|
+
tile: "tile";
|
|
31
|
+
marble: "marble";
|
|
32
|
+
}>>;
|
|
33
|
+
properties: z.ZodOptional<z.ZodObject<{
|
|
34
|
+
color: z.ZodDefault<z.ZodString>;
|
|
35
|
+
roughness: z.ZodDefault<z.ZodNumber>;
|
|
36
|
+
metalness: z.ZodDefault<z.ZodNumber>;
|
|
37
|
+
opacity: z.ZodDefault<z.ZodNumber>;
|
|
38
|
+
transparent: z.ZodDefault<z.ZodBoolean>;
|
|
39
|
+
side: z.ZodDefault<z.ZodEnum<{
|
|
40
|
+
front: "front";
|
|
41
|
+
back: "back";
|
|
42
|
+
double: "double";
|
|
43
|
+
}>>;
|
|
44
|
+
}, z.core.$strip>>;
|
|
45
|
+
texture: z.ZodOptional<z.ZodObject<{
|
|
46
|
+
url: z.ZodString;
|
|
47
|
+
repeat: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
48
|
+
scale: z.ZodOptional<z.ZodNumber>;
|
|
49
|
+
}, z.core.$strip>>;
|
|
50
|
+
}, z.core.$strip>>;
|
|
51
|
+
position: z.ZodDefault<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
52
|
+
rotation: z.ZodDefault<z.ZodNumber>;
|
|
53
|
+
children: z.ZodDefault<z.ZodArray<z.ZodDefault<z.ZodTemplateLiteral<`sseg_${string}`>>>>;
|
|
54
|
+
}, z.core.$strip>;
|
|
55
|
+
export type StairNode = z.infer<typeof StairNode>;
|
|
56
|
+
//# sourceMappingURL=stair.d.ts.map
|
|
@@ -0,0 +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;AAKvB,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkBrB,CAAA;AAED,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import dedent from 'dedent';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { BaseNode, nodeType, objectId } from '../base';
|
|
4
|
+
import { MaterialSchema } from '../material';
|
|
5
|
+
import { StairSegmentNode } from './stair-segment';
|
|
6
|
+
export const StairNode = BaseNode.extend({
|
|
7
|
+
id: objectId('stair'),
|
|
8
|
+
type: nodeType('stair'),
|
|
9
|
+
material: MaterialSchema.optional(),
|
|
10
|
+
position: z.tuple([z.number(), z.number(), z.number()]).default([0, 0, 0]),
|
|
11
|
+
// Rotation around Y axis in radians
|
|
12
|
+
rotation: z.number().default(0),
|
|
13
|
+
// Child stair segment IDs
|
|
14
|
+
children: z.array(StairSegmentNode.shape.id).default([]),
|
|
15
|
+
}).describe(dedent `
|
|
16
|
+
Stair node - a container for stair segments.
|
|
17
|
+
Acts as a group that holds one or more StairSegmentNodes (flights and landings).
|
|
18
|
+
Segments chain together based on their attachmentSide to form complex staircase shapes.
|
|
19
|
+
- position: center position of the stair group
|
|
20
|
+
- rotation: rotation around Y axis
|
|
21
|
+
- children: array of StairSegmentNode IDs
|
|
22
|
+
`);
|
|
@@ -20,6 +20,7 @@ export declare const WallNode: z.ZodObject<{
|
|
|
20
20
|
children: z.ZodDefault<z.ZodArray<z.ZodDefault<z.ZodTemplateLiteral<`item_${string}`>>>>;
|
|
21
21
|
material: z.ZodOptional<z.ZodObject<{
|
|
22
22
|
preset: z.ZodOptional<z.ZodEnum<{
|
|
23
|
+
custom: "custom";
|
|
23
24
|
white: "white";
|
|
24
25
|
brick: "brick";
|
|
25
26
|
concrete: "concrete";
|
|
@@ -29,7 +30,6 @@ export declare const WallNode: z.ZodObject<{
|
|
|
29
30
|
plaster: "plaster";
|
|
30
31
|
tile: "tile";
|
|
31
32
|
marble: "marble";
|
|
32
|
-
custom: "custom";
|
|
33
33
|
}>>;
|
|
34
34
|
properties: z.ZodOptional<z.ZodObject<{
|
|
35
35
|
color: z.ZodDefault<z.ZodString>;
|
|
@@ -19,6 +19,7 @@ export declare const WindowNode: z.ZodObject<{
|
|
|
19
19
|
type: z.ZodDefault<z.ZodLiteral<"window">>;
|
|
20
20
|
material: z.ZodOptional<z.ZodObject<{
|
|
21
21
|
preset: z.ZodOptional<z.ZodEnum<{
|
|
22
|
+
custom: "custom";
|
|
22
23
|
white: "white";
|
|
23
24
|
brick: "brick";
|
|
24
25
|
concrete: "concrete";
|
|
@@ -28,7 +29,6 @@ export declare const WindowNode: z.ZodObject<{
|
|
|
28
29
|
plaster: "plaster";
|
|
29
30
|
tile: "tile";
|
|
30
31
|
marble: "marble";
|
|
31
|
-
custom: "custom";
|
|
32
32
|
}>>;
|
|
33
33
|
properties: z.ZodOptional<z.ZodObject<{
|
|
34
34
|
color: z.ZodDefault<z.ZodString>;
|
package/dist/schema/types.d.ts
CHANGED
|
@@ -79,9 +79,9 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
79
79
|
src: z.ZodString;
|
|
80
80
|
dimensions: z.ZodDefault<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
81
81
|
attachTo: z.ZodOptional<z.ZodEnum<{
|
|
82
|
-
ceiling: "ceiling";
|
|
83
82
|
wall: "wall";
|
|
84
83
|
"wall-side": "wall-side";
|
|
84
|
+
ceiling: "ceiling";
|
|
85
85
|
}>>;
|
|
86
86
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
87
87
|
offset: z.ZodDefault<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
@@ -175,7 +175,7 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
175
175
|
metadata: z.ZodDefault<z.ZodOptional<z.ZodJSONSchema>>;
|
|
176
176
|
id: z.ZodDefault<z.ZodTemplateLiteral<`level_${string}`>>;
|
|
177
177
|
type: z.ZodDefault<z.ZodLiteral<"level">>;
|
|
178
|
-
children: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodDefault<z.ZodTemplateLiteral<`wall_${string}`>>, z.ZodDefault<z.ZodTemplateLiteral<`zone_${string}`>>, z.ZodDefault<z.ZodTemplateLiteral<`slab_${string}`>>, z.ZodDefault<z.ZodTemplateLiteral<`ceiling_${string}`>>, z.ZodDefault<z.ZodTemplateLiteral<`roof_${string}`>>, z.ZodDefault<z.ZodTemplateLiteral<`scan_${string}`>>, z.ZodDefault<z.ZodTemplateLiteral<`guide_${string}`>>]>>>;
|
|
178
|
+
children: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodDefault<z.ZodTemplateLiteral<`wall_${string}`>>, z.ZodDefault<z.ZodTemplateLiteral<`zone_${string}`>>, z.ZodDefault<z.ZodTemplateLiteral<`slab_${string}`>>, z.ZodDefault<z.ZodTemplateLiteral<`ceiling_${string}`>>, z.ZodDefault<z.ZodTemplateLiteral<`roof_${string}`>>, z.ZodDefault<z.ZodTemplateLiteral<`stair_${string}`>>, z.ZodDefault<z.ZodTemplateLiteral<`scan_${string}`>>, z.ZodDefault<z.ZodTemplateLiteral<`guide_${string}`>>]>>>;
|
|
179
179
|
level: z.ZodDefault<z.ZodNumber>;
|
|
180
180
|
}, z.core.$strip>, z.ZodObject<{
|
|
181
181
|
object: z.ZodDefault<z.ZodLiteral<"node">>;
|
|
@@ -198,6 +198,7 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
198
198
|
children: z.ZodDefault<z.ZodArray<z.ZodDefault<z.ZodTemplateLiteral<`item_${string}`>>>>;
|
|
199
199
|
material: z.ZodOptional<z.ZodObject<{
|
|
200
200
|
preset: z.ZodOptional<z.ZodEnum<{
|
|
201
|
+
custom: "custom";
|
|
201
202
|
white: "white";
|
|
202
203
|
brick: "brick";
|
|
203
204
|
concrete: "concrete";
|
|
@@ -207,7 +208,6 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
207
208
|
plaster: "plaster";
|
|
208
209
|
tile: "tile";
|
|
209
210
|
marble: "marble";
|
|
210
|
-
custom: "custom";
|
|
211
211
|
}>>;
|
|
212
212
|
properties: z.ZodOptional<z.ZodObject<{
|
|
213
213
|
color: z.ZodDefault<z.ZodString>;
|
|
@@ -278,9 +278,9 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
278
278
|
src: z.ZodString;
|
|
279
279
|
dimensions: z.ZodDefault<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
280
280
|
attachTo: z.ZodOptional<z.ZodEnum<{
|
|
281
|
-
ceiling: "ceiling";
|
|
282
281
|
wall: "wall";
|
|
283
282
|
"wall-side": "wall-side";
|
|
283
|
+
ceiling: "ceiling";
|
|
284
284
|
}>>;
|
|
285
285
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
286
286
|
offset: z.ZodDefault<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
@@ -374,6 +374,7 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
374
374
|
type: z.ZodDefault<z.ZodLiteral<"slab">>;
|
|
375
375
|
material: z.ZodOptional<z.ZodObject<{
|
|
376
376
|
preset: z.ZodOptional<z.ZodEnum<{
|
|
377
|
+
custom: "custom";
|
|
377
378
|
white: "white";
|
|
378
379
|
brick: "brick";
|
|
379
380
|
concrete: "concrete";
|
|
@@ -383,7 +384,6 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
383
384
|
plaster: "plaster";
|
|
384
385
|
tile: "tile";
|
|
385
386
|
marble: "marble";
|
|
386
|
-
custom: "custom";
|
|
387
387
|
}>>;
|
|
388
388
|
properties: z.ZodOptional<z.ZodObject<{
|
|
389
389
|
color: z.ZodDefault<z.ZodString>;
|
|
@@ -427,6 +427,7 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
427
427
|
children: z.ZodDefault<z.ZodArray<z.ZodDefault<z.ZodTemplateLiteral<`item_${string}`>>>>;
|
|
428
428
|
material: z.ZodOptional<z.ZodObject<{
|
|
429
429
|
preset: z.ZodOptional<z.ZodEnum<{
|
|
430
|
+
custom: "custom";
|
|
430
431
|
white: "white";
|
|
431
432
|
brick: "brick";
|
|
432
433
|
concrete: "concrete";
|
|
@@ -436,7 +437,6 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
436
437
|
plaster: "plaster";
|
|
437
438
|
tile: "tile";
|
|
438
439
|
marble: "marble";
|
|
439
|
-
custom: "custom";
|
|
440
440
|
}>>;
|
|
441
441
|
properties: z.ZodOptional<z.ZodObject<{
|
|
442
442
|
color: z.ZodDefault<z.ZodString>;
|
|
@@ -479,6 +479,7 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
479
479
|
type: z.ZodDefault<z.ZodLiteral<"roof">>;
|
|
480
480
|
material: z.ZodOptional<z.ZodObject<{
|
|
481
481
|
preset: z.ZodOptional<z.ZodEnum<{
|
|
482
|
+
custom: "custom";
|
|
482
483
|
white: "white";
|
|
483
484
|
brick: "brick";
|
|
484
485
|
concrete: "concrete";
|
|
@@ -488,7 +489,6 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
488
489
|
plaster: "plaster";
|
|
489
490
|
tile: "tile";
|
|
490
491
|
marble: "marble";
|
|
491
|
-
custom: "custom";
|
|
492
492
|
}>>;
|
|
493
493
|
properties: z.ZodOptional<z.ZodObject<{
|
|
494
494
|
color: z.ZodDefault<z.ZodString>;
|
|
@@ -531,6 +531,7 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
531
531
|
type: z.ZodDefault<z.ZodLiteral<"roof-segment">>;
|
|
532
532
|
material: z.ZodOptional<z.ZodObject<{
|
|
533
533
|
preset: z.ZodOptional<z.ZodEnum<{
|
|
534
|
+
custom: "custom";
|
|
534
535
|
white: "white";
|
|
535
536
|
brick: "brick";
|
|
536
537
|
concrete: "concrete";
|
|
@@ -540,7 +541,6 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
540
541
|
plaster: "plaster";
|
|
541
542
|
tile: "tile";
|
|
542
543
|
marble: "marble";
|
|
543
|
-
custom: "custom";
|
|
544
544
|
}>>;
|
|
545
545
|
properties: z.ZodOptional<z.ZodObject<{
|
|
546
546
|
color: z.ZodDefault<z.ZodString>;
|
|
@@ -579,6 +579,124 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
579
579
|
deckThickness: z.ZodDefault<z.ZodNumber>;
|
|
580
580
|
overhang: z.ZodDefault<z.ZodNumber>;
|
|
581
581
|
shingleThickness: z.ZodDefault<z.ZodNumber>;
|
|
582
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
583
|
+
object: z.ZodDefault<z.ZodLiteral<"node">>;
|
|
584
|
+
name: z.ZodOptional<z.ZodString>;
|
|
585
|
+
parentId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
586
|
+
visible: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
587
|
+
camera: z.ZodOptional<z.ZodObject<{
|
|
588
|
+
position: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
589
|
+
target: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
590
|
+
mode: z.ZodDefault<z.ZodEnum<{
|
|
591
|
+
perspective: "perspective";
|
|
592
|
+
orthographic: "orthographic";
|
|
593
|
+
}>>;
|
|
594
|
+
fov: z.ZodOptional<z.ZodNumber>;
|
|
595
|
+
zoom: z.ZodOptional<z.ZodNumber>;
|
|
596
|
+
}, z.core.$strip>>;
|
|
597
|
+
metadata: z.ZodDefault<z.ZodOptional<z.ZodJSONSchema>>;
|
|
598
|
+
id: z.ZodDefault<z.ZodTemplateLiteral<`stair_${string}`>>;
|
|
599
|
+
type: z.ZodDefault<z.ZodLiteral<"stair">>;
|
|
600
|
+
material: z.ZodOptional<z.ZodObject<{
|
|
601
|
+
preset: z.ZodOptional<z.ZodEnum<{
|
|
602
|
+
custom: "custom";
|
|
603
|
+
white: "white";
|
|
604
|
+
brick: "brick";
|
|
605
|
+
concrete: "concrete";
|
|
606
|
+
wood: "wood";
|
|
607
|
+
glass: "glass";
|
|
608
|
+
metal: "metal";
|
|
609
|
+
plaster: "plaster";
|
|
610
|
+
tile: "tile";
|
|
611
|
+
marble: "marble";
|
|
612
|
+
}>>;
|
|
613
|
+
properties: z.ZodOptional<z.ZodObject<{
|
|
614
|
+
color: z.ZodDefault<z.ZodString>;
|
|
615
|
+
roughness: z.ZodDefault<z.ZodNumber>;
|
|
616
|
+
metalness: z.ZodDefault<z.ZodNumber>;
|
|
617
|
+
opacity: z.ZodDefault<z.ZodNumber>;
|
|
618
|
+
transparent: z.ZodDefault<z.ZodBoolean>;
|
|
619
|
+
side: z.ZodDefault<z.ZodEnum<{
|
|
620
|
+
front: "front";
|
|
621
|
+
back: "back";
|
|
622
|
+
double: "double";
|
|
623
|
+
}>>;
|
|
624
|
+
}, z.core.$strip>>;
|
|
625
|
+
texture: z.ZodOptional<z.ZodObject<{
|
|
626
|
+
url: z.ZodString;
|
|
627
|
+
repeat: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
628
|
+
scale: z.ZodOptional<z.ZodNumber>;
|
|
629
|
+
}, z.core.$strip>>;
|
|
630
|
+
}, z.core.$strip>>;
|
|
631
|
+
position: z.ZodDefault<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
632
|
+
rotation: z.ZodDefault<z.ZodNumber>;
|
|
633
|
+
children: z.ZodDefault<z.ZodArray<z.ZodDefault<z.ZodTemplateLiteral<`sseg_${string}`>>>>;
|
|
634
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
635
|
+
object: z.ZodDefault<z.ZodLiteral<"node">>;
|
|
636
|
+
name: z.ZodOptional<z.ZodString>;
|
|
637
|
+
parentId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
638
|
+
visible: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
639
|
+
camera: z.ZodOptional<z.ZodObject<{
|
|
640
|
+
position: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
641
|
+
target: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
642
|
+
mode: z.ZodDefault<z.ZodEnum<{
|
|
643
|
+
perspective: "perspective";
|
|
644
|
+
orthographic: "orthographic";
|
|
645
|
+
}>>;
|
|
646
|
+
fov: z.ZodOptional<z.ZodNumber>;
|
|
647
|
+
zoom: z.ZodOptional<z.ZodNumber>;
|
|
648
|
+
}, z.core.$strip>>;
|
|
649
|
+
metadata: z.ZodDefault<z.ZodOptional<z.ZodJSONSchema>>;
|
|
650
|
+
id: z.ZodDefault<z.ZodTemplateLiteral<`sseg_${string}`>>;
|
|
651
|
+
type: z.ZodDefault<z.ZodLiteral<"stair-segment">>;
|
|
652
|
+
material: z.ZodOptional<z.ZodObject<{
|
|
653
|
+
preset: z.ZodOptional<z.ZodEnum<{
|
|
654
|
+
custom: "custom";
|
|
655
|
+
white: "white";
|
|
656
|
+
brick: "brick";
|
|
657
|
+
concrete: "concrete";
|
|
658
|
+
wood: "wood";
|
|
659
|
+
glass: "glass";
|
|
660
|
+
metal: "metal";
|
|
661
|
+
plaster: "plaster";
|
|
662
|
+
tile: "tile";
|
|
663
|
+
marble: "marble";
|
|
664
|
+
}>>;
|
|
665
|
+
properties: z.ZodOptional<z.ZodObject<{
|
|
666
|
+
color: z.ZodDefault<z.ZodString>;
|
|
667
|
+
roughness: z.ZodDefault<z.ZodNumber>;
|
|
668
|
+
metalness: z.ZodDefault<z.ZodNumber>;
|
|
669
|
+
opacity: z.ZodDefault<z.ZodNumber>;
|
|
670
|
+
transparent: z.ZodDefault<z.ZodBoolean>;
|
|
671
|
+
side: z.ZodDefault<z.ZodEnum<{
|
|
672
|
+
front: "front";
|
|
673
|
+
back: "back";
|
|
674
|
+
double: "double";
|
|
675
|
+
}>>;
|
|
676
|
+
}, z.core.$strip>>;
|
|
677
|
+
texture: z.ZodOptional<z.ZodObject<{
|
|
678
|
+
url: z.ZodString;
|
|
679
|
+
repeat: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
680
|
+
scale: z.ZodOptional<z.ZodNumber>;
|
|
681
|
+
}, z.core.$strip>>;
|
|
682
|
+
}, z.core.$strip>>;
|
|
683
|
+
position: z.ZodDefault<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
684
|
+
rotation: z.ZodDefault<z.ZodNumber>;
|
|
685
|
+
segmentType: z.ZodDefault<z.ZodEnum<{
|
|
686
|
+
stair: "stair";
|
|
687
|
+
landing: "landing";
|
|
688
|
+
}>>;
|
|
689
|
+
width: z.ZodDefault<z.ZodNumber>;
|
|
690
|
+
length: z.ZodDefault<z.ZodNumber>;
|
|
691
|
+
height: z.ZodDefault<z.ZodNumber>;
|
|
692
|
+
stepCount: z.ZodDefault<z.ZodNumber>;
|
|
693
|
+
attachmentSide: z.ZodDefault<z.ZodEnum<{
|
|
694
|
+
front: "front";
|
|
695
|
+
left: "left";
|
|
696
|
+
right: "right";
|
|
697
|
+
}>>;
|
|
698
|
+
fillToFloor: z.ZodDefault<z.ZodBoolean>;
|
|
699
|
+
thickness: z.ZodDefault<z.ZodNumber>;
|
|
582
700
|
}, z.core.$strip>, z.ZodObject<{
|
|
583
701
|
object: z.ZodDefault<z.ZodLiteral<"node">>;
|
|
584
702
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -645,6 +763,7 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
645
763
|
type: z.ZodDefault<z.ZodLiteral<"window">>;
|
|
646
764
|
material: z.ZodOptional<z.ZodObject<{
|
|
647
765
|
preset: z.ZodOptional<z.ZodEnum<{
|
|
766
|
+
custom: "custom";
|
|
648
767
|
white: "white";
|
|
649
768
|
brick: "brick";
|
|
650
769
|
concrete: "concrete";
|
|
@@ -654,7 +773,6 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
654
773
|
plaster: "plaster";
|
|
655
774
|
tile: "tile";
|
|
656
775
|
marble: "marble";
|
|
657
|
-
custom: "custom";
|
|
658
776
|
}>>;
|
|
659
777
|
properties: z.ZodOptional<z.ZodObject<{
|
|
660
778
|
color: z.ZodDefault<z.ZodString>;
|
|
@@ -712,6 +830,7 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
712
830
|
type: z.ZodDefault<z.ZodLiteral<"door">>;
|
|
713
831
|
material: z.ZodOptional<z.ZodObject<{
|
|
714
832
|
preset: z.ZodOptional<z.ZodEnum<{
|
|
833
|
+
custom: "custom";
|
|
715
834
|
white: "white";
|
|
716
835
|
brick: "brick";
|
|
717
836
|
concrete: "concrete";
|
|
@@ -721,7 +840,6 @@ export declare const AnyNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
721
840
|
plaster: "plaster";
|
|
722
841
|
tile: "tile";
|
|
723
842
|
marble: "marble";
|
|
724
|
-
custom: "custom";
|
|
725
843
|
}>>;
|
|
726
844
|
properties: z.ZodOptional<z.ZodObject<{
|
|
727
845
|
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;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/schema/types.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAA;AAkBnB,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAiBlB,CAAA;AAEF,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,OAAO,CAAC,CAAA;AAC7C,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;AACzC,MAAM,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA"}
|
package/dist/schema/types.js
CHANGED
|
@@ -10,6 +10,8 @@ import { RoofSegmentNode } from './nodes/roof-segment';
|
|
|
10
10
|
import { ScanNode } from './nodes/scan';
|
|
11
11
|
import { SiteNode } from './nodes/site';
|
|
12
12
|
import { SlabNode } from './nodes/slab';
|
|
13
|
+
import { StairNode } from './nodes/stair';
|
|
14
|
+
import { StairSegmentNode } from './nodes/stair-segment';
|
|
13
15
|
import { WallNode } from './nodes/wall';
|
|
14
16
|
import { WindowNode } from './nodes/window';
|
|
15
17
|
import { ZoneNode } from './nodes/zone';
|
|
@@ -24,6 +26,8 @@ export const AnyNode = z.discriminatedUnion('type', [
|
|
|
24
26
|
CeilingNode,
|
|
25
27
|
RoofNode,
|
|
26
28
|
RoofSegmentNode,
|
|
29
|
+
StairNode,
|
|
30
|
+
StairSegmentNode,
|
|
27
31
|
ScanNode,
|
|
28
32
|
GuideNode,
|
|
29
33
|
WindowNode,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-actions.d.ts","sourceRoot":"","sources":["../../../src/store/actions/node-actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAEtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAQ9C,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,
|
|
1
|
+
{"version":3,"file":"node-actions.d.ts","sourceRoot":"","sources":["../../../src/store/actions/node-actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAEtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAQ9C,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,SA4C/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,SAuEjB,CAAA"}
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
let pendingRafId = null;
|
|
3
3
|
let pendingUpdates = new Set();
|
|
4
4
|
export const createNodesAction = (set, get, ops) => {
|
|
5
|
+
if (get().readOnly)
|
|
6
|
+
return;
|
|
5
7
|
set((state) => {
|
|
6
8
|
const nextNodes = { ...state.nodes };
|
|
7
9
|
const nextRootIds = [...state.rootNodeIds];
|
|
@@ -41,8 +43,9 @@ export const createNodesAction = (set, get, ops) => {
|
|
|
41
43
|
});
|
|
42
44
|
};
|
|
43
45
|
export const updateNodesAction = (set, get, updates) => {
|
|
46
|
+
if (get().readOnly)
|
|
47
|
+
return;
|
|
44
48
|
const parentsToUpdate = new Set();
|
|
45
|
-
const idsToMarkDirty = new Set();
|
|
46
49
|
set((state) => {
|
|
47
50
|
const nextNodes = { ...state.nodes };
|
|
48
51
|
for (const { id, data } of updates) {
|
|
@@ -77,23 +80,17 @@ export const updateNodesAction = (set, get, updates) => {
|
|
|
77
80
|
}
|
|
78
81
|
return { nodes: nextNodes };
|
|
79
82
|
});
|
|
80
|
-
//
|
|
83
|
+
// Batch dirty-marking into a single RAF to avoid redundant callbacks during rapid updates
|
|
81
84
|
for (const u of updates) {
|
|
82
|
-
|
|
85
|
+
pendingUpdates.add(u.id);
|
|
83
86
|
}
|
|
84
87
|
for (const pId of parentsToUpdate) {
|
|
85
|
-
|
|
88
|
+
pendingUpdates.add(pId);
|
|
86
89
|
}
|
|
87
|
-
// Add to pending updates set
|
|
88
|
-
for (const id of idsToMarkDirty) {
|
|
89
|
-
pendingUpdates.add(id);
|
|
90
|
-
}
|
|
91
|
-
// Cancel any pending RAF and schedule a new one
|
|
92
90
|
if (pendingRafId !== null) {
|
|
93
91
|
cancelAnimationFrame(pendingRafId);
|
|
94
92
|
}
|
|
95
93
|
pendingRafId = requestAnimationFrame(() => {
|
|
96
|
-
// Mark all pending updates as dirty
|
|
97
94
|
pendingUpdates.forEach((id) => {
|
|
98
95
|
get().markDirty(id);
|
|
99
96
|
});
|
|
@@ -102,36 +99,35 @@ export const updateNodesAction = (set, get, updates) => {
|
|
|
102
99
|
});
|
|
103
100
|
};
|
|
104
101
|
export const deleteNodesAction = (set, get, ids) => {
|
|
102
|
+
if (get().readOnly)
|
|
103
|
+
return;
|
|
105
104
|
const parentsToMarkDirty = new Set();
|
|
106
105
|
set((state) => {
|
|
107
106
|
const nextNodes = { ...state.nodes };
|
|
108
107
|
const nextCollections = { ...state.collections };
|
|
109
108
|
let nextRootIds = [...state.rootNodeIds];
|
|
110
|
-
// Collect all
|
|
111
|
-
//
|
|
112
|
-
const
|
|
113
|
-
const
|
|
114
|
-
|
|
115
|
-
if (!node)
|
|
109
|
+
// Collect all ids to delete (the requested ids + all their descendants) before
|
|
110
|
+
// mutating anything, so the recursive walk reads consistent state.
|
|
111
|
+
const allIds = new Set();
|
|
112
|
+
const collect = (id) => {
|
|
113
|
+
if (allIds.has(id))
|
|
116
114
|
return;
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
115
|
+
allIds.add(id);
|
|
116
|
+
const node = nextNodes[id];
|
|
117
|
+
if (node && 'children' in node) {
|
|
118
|
+
for (const cid of node.children)
|
|
119
|
+
collect(cid);
|
|
122
120
|
}
|
|
123
121
|
};
|
|
124
|
-
for (const id of ids)
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
// Now process all nodes for deletion
|
|
128
|
-
for (const id of allIdsToDelete) {
|
|
122
|
+
for (const id of ids)
|
|
123
|
+
collect(id);
|
|
124
|
+
for (const id of allIds) {
|
|
129
125
|
const node = nextNodes[id];
|
|
130
126
|
if (!node)
|
|
131
127
|
continue;
|
|
132
|
-
// 1. Remove reference from
|
|
128
|
+
// 1. Remove reference from parent — only if the parent itself is NOT also being deleted
|
|
133
129
|
const parentId = node.parentId;
|
|
134
|
-
if (parentId && nextNodes[parentId]) {
|
|
130
|
+
if (parentId && nextNodes[parentId] && !allIds.has(parentId)) {
|
|
135
131
|
const parent = nextNodes[parentId];
|
|
136
132
|
if (parent.children) {
|
|
137
133
|
nextNodes[parent.id] = {
|
|
@@ -141,7 +137,7 @@ export const deleteNodesAction = (set, get, ids) => {
|
|
|
141
137
|
parentsToMarkDirty.add(parent.id);
|
|
142
138
|
}
|
|
143
139
|
}
|
|
144
|
-
// 2. Remove from
|
|
140
|
+
// 2. Remove from root list
|
|
145
141
|
nextRootIds = nextRootIds.filter((rid) => rid !== id);
|
|
146
142
|
// 3. Remove from any collections it belongs to
|
|
147
143
|
if ('collectionIds' in node && node.collectionIds) {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type LiveTransform = {
|
|
2
|
+
position: [number, number, number];
|
|
3
|
+
rotation: number;
|
|
4
|
+
};
|
|
5
|
+
type LiveTransformState = {
|
|
6
|
+
transforms: Map<string, LiveTransform>;
|
|
7
|
+
set(nodeId: string, transform: LiveTransform): void;
|
|
8
|
+
get(nodeId: string): LiveTransform | undefined;
|
|
9
|
+
clear(nodeId: string): void;
|
|
10
|
+
clearAll(): void;
|
|
11
|
+
};
|
|
12
|
+
declare const useLiveTransforms: import("zustand").UseBoundStore<import("zustand").StoreApi<LiveTransformState>>;
|
|
13
|
+
export default useLiveTransforms;
|
|
14
|
+
//# sourceMappingURL=use-live-transforms.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-live-transforms.d.ts","sourceRoot":"","sources":["../../src/store/use-live-transforms.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;IAClC,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,KAAK,kBAAkB,GAAG;IACxB,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;IACtC,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,aAAa,GAAG,IAAI,CAAA;IACnD,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAAA;IAC9C,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,QAAQ,IAAI,IAAI,CAAA;CACjB,CAAA;AAED,QAAA,MAAM,iBAAiB,iFAgBpB,CAAA;AAEH,eAAe,iBAAiB,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Ephemeral live transform state for nodes being actively dragged/moved.
|
|
2
|
+
// This decouples 2D (floorplan) and 3D (viewer) so neither needs to peek
|
|
3
|
+
// into the other's scene graph during drag operations.
|
|
4
|
+
import { create } from 'zustand';
|
|
5
|
+
const useLiveTransforms = create((set, get) => ({
|
|
6
|
+
transforms: new Map(),
|
|
7
|
+
set: (nodeId, transform) => set((state) => {
|
|
8
|
+
const next = new Map(state.transforms);
|
|
9
|
+
next.set(nodeId, transform);
|
|
10
|
+
return { transforms: next };
|
|
11
|
+
}),
|
|
12
|
+
get: (nodeId) => get().transforms.get(nodeId),
|
|
13
|
+
clear: (nodeId) => set((state) => {
|
|
14
|
+
const next = new Map(state.transforms);
|
|
15
|
+
next.delete(nodeId);
|
|
16
|
+
return { transforms: next };
|
|
17
|
+
}),
|
|
18
|
+
clearAll: () => set({ transforms: new Map() }),
|
|
19
|
+
}));
|
|
20
|
+
export default useLiveTransforms;
|
|
@@ -7,6 +7,8 @@ export type SceneState = {
|
|
|
7
7
|
rootNodeIds: AnyNodeId[];
|
|
8
8
|
dirtyNodes: Set<AnyNodeId>;
|
|
9
9
|
collections: Record<CollectionId, Collection>;
|
|
10
|
+
readOnly: boolean;
|
|
11
|
+
setReadOnly: (readOnly: boolean) => void;
|
|
10
12
|
loadScene: () => void;
|
|
11
13
|
clearScene: () => void;
|
|
12
14
|
unloadScene: () => void;
|
|
@@ -36,10 +38,5 @@ type UseSceneStore = UseBoundStore<StoreApi<SceneState>> & {
|
|
|
36
38
|
};
|
|
37
39
|
declare const useScene: UseSceneStore;
|
|
38
40
|
export default useScene;
|
|
39
|
-
/**
|
|
40
|
-
* Clears temporal history tracking variables to prevent memory leaks.
|
|
41
|
-
* Should be called when unloading a scene to release node references.
|
|
42
|
-
*/
|
|
43
|
-
export declare function clearTemporalTracking(): void;
|
|
44
41
|
export declare function clearSceneHistory(): void;
|
|
45
42
|
//# sourceMappingURL=use-scene.d.ts.map
|
|
@@ -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;AAIrE,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AA8CzD,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;IAG1B,WAAW,EAAE,MAAM,CAAC,YAAY,EAAE,UAAU,CAAC,CAAA;IAG7C,SAAS,EAAE,MAAM,IAAI,CAAA;IACrB,UAAU,EAAE,MAAM,IAAI,CAAA;IACtB,WAAW,EAAE,MAAM,IAAI,CAAA;IACvB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