@pascal-app/core 0.5.1 → 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.
- package/dist/events/bus.d.ts +74 -4
- package/dist/events/bus.d.ts.map +1 -1
- package/dist/events/bus.js +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 +2 -0
- package/dist/hooks/spatial-grid/spatial-grid-manager.d.ts.map +1 -1
- package/dist/hooks/spatial-grid/spatial-grid-manager.js +164 -6
- package/dist/hooks/spatial-grid/spatial-grid.d.ts +2 -0
- package/dist/hooks/spatial-grid/spatial-grid.d.ts.map +1 -1
- package/dist/hooks/spatial-grid/spatial-grid.js +43 -20
- package/dist/index.d.ts +9 -13
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -11
- package/dist/lib/door-operation.d.ts +7 -0
- package/dist/lib/door-operation.d.ts.map +1 -0
- package/dist/lib/door-operation.js +25 -0
- package/dist/lib/polygon-geometry.d.ts +3 -0
- package/dist/lib/polygon-geometry.d.ts.map +1 -0
- package/dist/lib/polygon-geometry.js +90 -0
- package/dist/lib/slab-polygon.d.ts +3 -0
- package/dist/lib/slab-polygon.d.ts.map +1 -0
- package/dist/lib/slab-polygon.js +58 -0
- package/dist/lib/space-detection.d.ts +10 -17
- package/dist/lib/space-detection.d.ts.map +1 -1
- package/dist/lib/space-detection.js +666 -453
- package/dist/material-library.d.ts +20 -0
- package/dist/material-library.d.ts.map +1 -0
- package/dist/material-library.js +580 -0
- package/dist/schema/asset-url.d.ts +34 -0
- package/dist/schema/asset-url.d.ts.map +1 -0
- package/dist/schema/asset-url.js +79 -0
- package/dist/schema/asset-url.test.d.ts +2 -0
- package/dist/schema/asset-url.test.d.ts.map +1 -0
- package/dist/schema/asset-url.test.js +138 -0
- package/dist/schema/index.d.ts +14 -7
- package/dist/schema/index.d.ts.map +1 -1
- package/dist/schema/index.js +10 -7
- package/dist/schema/material.d.ts +112 -2
- package/dist/schema/material.d.ts.map +1 -1
- package/dist/schema/material.js +55 -1
- package/dist/schema/nodes/ceiling.d.ts +11 -1
- package/dist/schema/nodes/ceiling.d.ts.map +1 -1
- package/dist/schema/nodes/ceiling.js +6 -0
- package/dist/schema/nodes/column.d.ts +520 -0
- package/dist/schema/nodes/column.d.ts.map +1 -0
- package/dist/schema/nodes/column.js +385 -0
- package/dist/schema/nodes/door.d.ts +74 -1
- package/dist/schema/nodes/door.d.ts.map +1 -1
- package/dist/schema/nodes/door.js +39 -2
- package/dist/schema/nodes/fence.d.ts +34 -0
- package/dist/schema/nodes/fence.d.ts.map +1 -1
- package/dist/schema/nodes/fence.js +5 -0
- package/dist/schema/nodes/guide.d.ts +17 -0
- package/dist/schema/nodes/guide.d.ts.map +1 -1
- package/dist/schema/nodes/guide.js +11 -1
- package/dist/schema/nodes/item.d.ts +10 -2
- package/dist/schema/nodes/item.d.ts.map +1 -1
- package/dist/schema/nodes/item.js +18 -1
- 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 +6 -0
- package/dist/schema/nodes/roof-segment.d.ts +3 -1
- package/dist/schema/nodes/roof-segment.d.ts.map +1 -1
- package/dist/schema/nodes/roof-segment.js +1 -0
- package/dist/schema/nodes/roof.d.ts +108 -0
- package/dist/schema/nodes/roof.d.ts.map +1 -1
- package/dist/schema/nodes/roof.js +58 -2
- package/dist/schema/nodes/scan.d.ts.map +1 -1
- package/dist/schema/nodes/scan.js +2 -1
- package/dist/schema/nodes/site.d.ts +2 -1
- package/dist/schema/nodes/site.d.ts.map +1 -1
- package/dist/schema/nodes/slab.d.ts +11 -1
- package/dist/schema/nodes/slab.d.ts.map +1 -1
- package/dist/schema/nodes/slab.js +7 -0
- package/dist/schema/nodes/spawn.d.ts +24 -0
- package/dist/schema/nodes/spawn.d.ts.map +1 -0
- package/dist/schema/nodes/spawn.js +8 -0
- package/dist/schema/nodes/stair-segment.d.ts +3 -1
- package/dist/schema/nodes/stair-segment.d.ts.map +1 -1
- package/dist/schema/nodes/stair-segment.js +1 -0
- package/dist/schema/nodes/stair.d.ts +122 -2
- package/dist/schema/nodes/stair.d.ts.map +1 -1
- package/dist/schema/nodes/stair.js +72 -2
- package/dist/schema/nodes/surface-hole-metadata.d.ts +10 -0
- package/dist/schema/nodes/surface-hole-metadata.d.ts.map +1 -0
- package/dist/schema/nodes/surface-hole-metadata.js +5 -0
- package/dist/schema/nodes/wall.d.ts +87 -1
- package/dist/schema/nodes/wall.d.ts.map +1 -1
- package/dist/schema/nodes/wall.js +45 -4
- package/dist/schema/nodes/window.d.ts +57 -1
- package/dist/schema/nodes/window.d.ts.map +1 -1
- package/dist/schema/nodes/window.js +29 -0
- package/dist/schema/types.d.ts +653 -12
- package/dist/schema/types.d.ts.map +1 -1
- package/dist/schema/types.js +4 -0
- package/dist/store/actions/node-actions.d.ts +1 -1
- package/dist/store/actions/node-actions.d.ts.map +1 -1
- package/dist/store/actions/node-actions.js +181 -5
- package/dist/store/history-control.d.ts +14 -0
- package/dist/store/history-control.d.ts.map +1 -0
- package/dist/store/history-control.js +22 -0
- package/dist/store/use-interactive.d.ts +43 -0
- package/dist/store/use-interactive.d.ts.map +1 -1
- package/dist/store/use-interactive.js +66 -0
- package/dist/store/use-scene.d.ts.map +1 -1
- package/dist/store/use-scene.js +307 -3
- package/dist/systems/ceiling/ceiling-system.d.ts.map +1 -1
- package/dist/systems/ceiling/ceiling-system.js +7 -0
- package/dist/systems/fence/fence-system.d.ts.map +1 -1
- package/dist/systems/fence/fence-system.js +106 -39
- package/dist/systems/roof/roof-system.d.ts.map +1 -1
- package/dist/systems/roof/roof-system.js +31 -1
- package/dist/systems/slab/slab-system.d.ts.map +1 -1
- package/dist/systems/slab/slab-system.js +45 -8
- package/dist/systems/stair/stair-opening-sync.d.ts +6 -0
- package/dist/systems/stair/stair-opening-sync.d.ts.map +1 -0
- package/dist/systems/stair/stair-opening-sync.js +576 -0
- package/dist/systems/stair/stair-opening-sync.test.d.ts +2 -0
- package/dist/systems/stair/stair-opening-sync.test.d.ts.map +1 -0
- package/dist/systems/stair/stair-opening-sync.test.js +65 -0
- package/dist/systems/stair/stair-system.d.ts.map +1 -1
- package/dist/systems/stair/stair-system.js +119 -2
- package/dist/systems/wall/wall-curve.d.ts +43 -0
- package/dist/systems/wall/wall-curve.d.ts.map +1 -0
- package/dist/systems/wall/wall-curve.js +176 -0
- package/dist/systems/wall/wall-footprint.d.ts.map +1 -1
- package/dist/systems/wall/wall-footprint.js +16 -2
- package/dist/systems/wall/wall-mitering.d.ts +7 -0
- package/dist/systems/wall/wall-mitering.d.ts.map +1 -1
- package/dist/systems/wall/wall-mitering.js +76 -3
- package/dist/systems/wall/wall-system.d.ts.map +1 -1
- package/dist/systems/wall/wall-system.js +202 -2
- package/package.json +33 -5
|
@@ -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;AAqBnB,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAoBlB,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
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import z from 'zod';
|
|
2
2
|
import { BuildingNode } from './nodes/building';
|
|
3
3
|
import { CeilingNode } from './nodes/ceiling';
|
|
4
|
+
import { ColumnNode } from './nodes/column';
|
|
4
5
|
import { DoorNode } from './nodes/door';
|
|
5
6
|
import { FenceNode } from './nodes/fence';
|
|
6
7
|
import { GuideNode } from './nodes/guide';
|
|
@@ -11,6 +12,7 @@ import { RoofSegmentNode } from './nodes/roof-segment';
|
|
|
11
12
|
import { ScanNode } from './nodes/scan';
|
|
12
13
|
import { SiteNode } from './nodes/site';
|
|
13
14
|
import { SlabNode } from './nodes/slab';
|
|
15
|
+
import { SpawnNode } from './nodes/spawn';
|
|
14
16
|
import { StairNode } from './nodes/stair';
|
|
15
17
|
import { StairSegmentNode } from './nodes/stair-segment';
|
|
16
18
|
import { WallNode } from './nodes/wall';
|
|
@@ -20,6 +22,7 @@ export const AnyNode = z.discriminatedUnion('type', [
|
|
|
20
22
|
SiteNode,
|
|
21
23
|
BuildingNode,
|
|
22
24
|
LevelNode,
|
|
25
|
+
ColumnNode,
|
|
23
26
|
WallNode,
|
|
24
27
|
FenceNode,
|
|
25
28
|
ItemNode,
|
|
@@ -32,6 +35,7 @@ export const AnyNode = z.discriminatedUnion('type', [
|
|
|
32
35
|
StairSegmentNode,
|
|
33
36
|
ScanNode,
|
|
34
37
|
GuideNode,
|
|
38
|
+
SpawnNode,
|
|
35
39
|
WindowNode,
|
|
36
40
|
DoorNode,
|
|
37
41
|
]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type AnyNode, type AnyNodeId } from '../../schema';
|
|
2
2
|
import type { SceneState } from '../use-scene';
|
|
3
3
|
export declare const createNodesAction: (set: (fn: (state: SceneState) => Partial<SceneState>) => void, get: () => SceneState, ops: {
|
|
4
4
|
node: AnyNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-actions.d.ts","sourceRoot":"","sources":["../../../src/store/actions/node-actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
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;AA6N9C,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,SA8C/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"}
|
|
@@ -1,6 +1,151 @@
|
|
|
1
|
+
import { getEffectiveWallSurfaceMaterial, getWallSurfaceMaterialSignature, } from '../../schema';
|
|
1
2
|
// Track pending RAF for updateNodesAction to prevent multiple queued callbacks
|
|
2
3
|
let pendingRafId = null;
|
|
3
4
|
let pendingUpdates = new Set();
|
|
5
|
+
function pointsEqual(a, b, tolerance = 1e-6) {
|
|
6
|
+
const dx = a[0] - b[0];
|
|
7
|
+
const dz = a[1] - b[1];
|
|
8
|
+
return dx * dx + dz * dz <= tolerance * tolerance;
|
|
9
|
+
}
|
|
10
|
+
function wallLength(wall) {
|
|
11
|
+
return Math.hypot(wall.end[0] - wall.start[0], wall.end[1] - wall.start[1]);
|
|
12
|
+
}
|
|
13
|
+
function getWallEndpointAtPoint(wall, point) {
|
|
14
|
+
if (pointsEqual(wall.start, point))
|
|
15
|
+
return 'start';
|
|
16
|
+
if (pointsEqual(wall.end, point))
|
|
17
|
+
return 'end';
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
function getWallFreeEndpoint(wall, sharedPoint) {
|
|
21
|
+
return pointsEqual(wall.start, sharedPoint) ? wall.end : wall.start;
|
|
22
|
+
}
|
|
23
|
+
function areWallStylesCompatible(a, b) {
|
|
24
|
+
const aInterior = getWallSurfaceMaterialSignature(getEffectiveWallSurfaceMaterial(a, 'interior'));
|
|
25
|
+
const bInterior = getWallSurfaceMaterialSignature(getEffectiveWallSurfaceMaterial(b, 'interior'));
|
|
26
|
+
const aExterior = getWallSurfaceMaterialSignature(getEffectiveWallSurfaceMaterial(a, 'exterior'));
|
|
27
|
+
const bExterior = getWallSurfaceMaterialSignature(getEffectiveWallSurfaceMaterial(b, 'exterior'));
|
|
28
|
+
return ((a.parentId ?? null) === (b.parentId ?? null) &&
|
|
29
|
+
Math.abs((a.curveOffset ?? 0) - (b.curveOffset ?? 0)) <= 1e-6 &&
|
|
30
|
+
Math.abs((a.thickness ?? 0.2) - (b.thickness ?? 0.2)) <= 1e-6 &&
|
|
31
|
+
Math.abs((a.height ?? 2.5) - (b.height ?? 2.5)) <= 1e-6 &&
|
|
32
|
+
aInterior === bInterior &&
|
|
33
|
+
aExterior === bExterior &&
|
|
34
|
+
a.frontSide === b.frontSide &&
|
|
35
|
+
a.backSide === b.backSide &&
|
|
36
|
+
a.visible === b.visible);
|
|
37
|
+
}
|
|
38
|
+
function areWallsCollinearAcrossPoint(a, b, sharedPoint) {
|
|
39
|
+
const freeA = getWallFreeEndpoint(a, sharedPoint);
|
|
40
|
+
const freeB = getWallFreeEndpoint(b, sharedPoint);
|
|
41
|
+
const ax = freeA[0] - sharedPoint[0];
|
|
42
|
+
const az = freeA[1] - sharedPoint[1];
|
|
43
|
+
const bx = freeB[0] - sharedPoint[0];
|
|
44
|
+
const bz = freeB[1] - sharedPoint[1];
|
|
45
|
+
const lenA = Math.hypot(ax, az);
|
|
46
|
+
const lenB = Math.hypot(bx, bz);
|
|
47
|
+
if (lenA < 1e-6 || lenB < 1e-6)
|
|
48
|
+
return false;
|
|
49
|
+
const cross = (ax * bz - az * bx) / (lenA * lenB);
|
|
50
|
+
const dot = (ax * bx + az * bz) / (lenA * lenB);
|
|
51
|
+
return Math.abs(cross) <= 1e-4 && dot < -0.999;
|
|
52
|
+
}
|
|
53
|
+
function resolveMergedWallEndpoints(primary, secondary, sharedPoint) {
|
|
54
|
+
const primaryEndpoint = getWallEndpointAtPoint(primary, sharedPoint);
|
|
55
|
+
const secondaryEndpoint = getWallEndpointAtPoint(secondary, sharedPoint);
|
|
56
|
+
if (primaryEndpoint === 'end' && secondaryEndpoint === 'start') {
|
|
57
|
+
return { start: primary.start, end: secondary.end };
|
|
58
|
+
}
|
|
59
|
+
if (primaryEndpoint === 'start' && secondaryEndpoint === 'end') {
|
|
60
|
+
return { start: secondary.start, end: primary.end };
|
|
61
|
+
}
|
|
62
|
+
if (primaryEndpoint === 'start' && secondaryEndpoint === 'start') {
|
|
63
|
+
return { start: primary.end, end: secondary.end };
|
|
64
|
+
}
|
|
65
|
+
return { start: primary.start, end: secondary.start };
|
|
66
|
+
}
|
|
67
|
+
function buildMergedWallAttachmentUpdates(primary, secondary, mergedWallId, mergedStart, mergedEnd, nodes) {
|
|
68
|
+
const mergedLength = Math.max(Math.hypot(mergedEnd[0] - mergedStart[0], mergedEnd[1] - mergedStart[1]), 1e-6);
|
|
69
|
+
const tangentX = (mergedEnd[0] - mergedStart[0]) / mergedLength;
|
|
70
|
+
const tangentZ = (mergedEnd[1] - mergedStart[1]) / mergedLength;
|
|
71
|
+
const updates = [];
|
|
72
|
+
const wallChildren = [...(primary.children ?? []), ...(secondary.children ?? [])];
|
|
73
|
+
for (const childId of wallChildren) {
|
|
74
|
+
const child = nodes[childId];
|
|
75
|
+
if (!child || !('position' in child) || !Array.isArray(child.position)) {
|
|
76
|
+
continue;
|
|
77
|
+
}
|
|
78
|
+
const sourceWall = child.parentId === secondary.id ? secondary : primary;
|
|
79
|
+
const sourceLength = Math.max(wallLength(sourceWall), 1e-6);
|
|
80
|
+
const localX = typeof child.position[0] === 'number' ? child.position[0] : 0;
|
|
81
|
+
const worldX = sourceWall.start[0] + ((sourceWall.end[0] - sourceWall.start[0]) * localX) / sourceLength;
|
|
82
|
+
const worldZ = sourceWall.start[1] + ((sourceWall.end[1] - sourceWall.start[1]) * localX) / sourceLength;
|
|
83
|
+
const nextLocalX = Math.max(0, Math.min(mergedLength, (worldX - mergedStart[0]) * tangentX + (worldZ - mergedStart[1]) * tangentZ));
|
|
84
|
+
updates.push({
|
|
85
|
+
id: childId,
|
|
86
|
+
data: {
|
|
87
|
+
parentId: mergedWallId,
|
|
88
|
+
wallId: mergedWallId,
|
|
89
|
+
position: [nextLocalX, child.position[1], child.position[2]],
|
|
90
|
+
...('wallT' in child ? { wallT: nextLocalX / mergedLength } : {}),
|
|
91
|
+
},
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
return updates;
|
|
95
|
+
}
|
|
96
|
+
function buildWallMergePlans(nodes, idsToDelete) {
|
|
97
|
+
const deletedWalls = idsToDelete
|
|
98
|
+
.map((id) => nodes[id])
|
|
99
|
+
.filter((node) => node?.type === 'wall');
|
|
100
|
+
const skippedWallIds = new Set(idsToDelete);
|
|
101
|
+
const usedWallIds = new Set();
|
|
102
|
+
const mergePlans = [];
|
|
103
|
+
for (const deletedWall of deletedWalls) {
|
|
104
|
+
const junctions = [deletedWall.start, deletedWall.end];
|
|
105
|
+
for (const junction of junctions) {
|
|
106
|
+
const candidates = Object.values(nodes).filter((node) => {
|
|
107
|
+
if (node?.type !== 'wall')
|
|
108
|
+
return false;
|
|
109
|
+
if (skippedWallIds.has(node.id) || usedWallIds.has(node.id))
|
|
110
|
+
return false;
|
|
111
|
+
if ((node.parentId ?? null) !== (deletedWall.parentId ?? null))
|
|
112
|
+
return false;
|
|
113
|
+
return pointsEqual(node.start, junction) || pointsEqual(node.end, junction);
|
|
114
|
+
});
|
|
115
|
+
if (candidates.length !== 2) {
|
|
116
|
+
continue;
|
|
117
|
+
}
|
|
118
|
+
const sortedCandidates = [...candidates].sort((a, b) => {
|
|
119
|
+
const attachmentDiff = (b.children?.length ?? 0) - (a.children?.length ?? 0);
|
|
120
|
+
if (attachmentDiff !== 0) {
|
|
121
|
+
return attachmentDiff;
|
|
122
|
+
}
|
|
123
|
+
return a.id.localeCompare(b.id);
|
|
124
|
+
});
|
|
125
|
+
const [primary, secondary] = sortedCandidates;
|
|
126
|
+
if (!primary ||
|
|
127
|
+
!secondary ||
|
|
128
|
+
!areWallStylesCompatible(primary, secondary) ||
|
|
129
|
+
!areWallsCollinearAcrossPoint(primary, secondary, junction)) {
|
|
130
|
+
continue;
|
|
131
|
+
}
|
|
132
|
+
const { start, end } = resolveMergedWallEndpoints(primary, secondary, junction);
|
|
133
|
+
const mergedChildren = Array.from(new Set([...(primary.children ?? []), ...(secondary.children ?? [])]));
|
|
134
|
+
const attachmentUpdates = buildMergedWallAttachmentUpdates(primary, secondary, primary.id, start, end, nodes);
|
|
135
|
+
mergePlans.push({
|
|
136
|
+
primaryWallId: primary.id,
|
|
137
|
+
secondaryWallId: secondary.id,
|
|
138
|
+
mergedStart: start,
|
|
139
|
+
mergedEnd: end,
|
|
140
|
+
mergedChildren,
|
|
141
|
+
attachmentUpdates,
|
|
142
|
+
});
|
|
143
|
+
usedWallIds.add(primary.id);
|
|
144
|
+
usedWallIds.add(secondary.id);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
return mergePlans;
|
|
148
|
+
}
|
|
4
149
|
export const createNodesAction = (set, get, ops) => {
|
|
5
150
|
if (get().readOnly)
|
|
6
151
|
return;
|
|
@@ -8,25 +153,26 @@ export const createNodesAction = (set, get, ops) => {
|
|
|
8
153
|
const nextNodes = { ...state.nodes };
|
|
9
154
|
const nextRootIds = [...state.rootNodeIds];
|
|
10
155
|
for (const { node, parentId } of ops) {
|
|
156
|
+
const effectiveParentId = parentId ?? node.parentId ?? null;
|
|
11
157
|
// 1. Assign parentId to the child (Safe because BaseNode has parentId)
|
|
12
158
|
const newNode = {
|
|
13
159
|
...node,
|
|
14
|
-
parentId:
|
|
160
|
+
parentId: effectiveParentId,
|
|
15
161
|
};
|
|
16
162
|
nextNodes[newNode.id] = newNode;
|
|
17
163
|
// 2. Update the Parent's children list
|
|
18
|
-
if (
|
|
19
|
-
const parent = nextNodes[
|
|
164
|
+
if (effectiveParentId && nextNodes[effectiveParentId]) {
|
|
165
|
+
const parent = nextNodes[effectiveParentId];
|
|
20
166
|
// Type Guard: Check if the parent node is a container that supports children
|
|
21
167
|
if ('children' in parent && Array.isArray(parent.children)) {
|
|
22
|
-
nextNodes[
|
|
168
|
+
nextNodes[effectiveParentId] = {
|
|
23
169
|
...parent,
|
|
24
170
|
// Use Set to prevent duplicate IDs if createNode is called twice
|
|
25
171
|
children: Array.from(new Set([...parent.children, newNode.id])), // We don't verify child types here
|
|
26
172
|
};
|
|
27
173
|
}
|
|
28
174
|
}
|
|
29
|
-
else if (!
|
|
175
|
+
else if (!effectiveParentId) {
|
|
30
176
|
// 3. Handle Root nodes
|
|
31
177
|
if (!nextRootIds.includes(newNode.id)) {
|
|
32
178
|
nextRootIds.push(newNode.id);
|
|
@@ -102,6 +248,8 @@ export const deleteNodesAction = (set, get, ids) => {
|
|
|
102
248
|
if (get().readOnly)
|
|
103
249
|
return;
|
|
104
250
|
const parentsToMarkDirty = new Set();
|
|
251
|
+
const nodesToMarkDirty = new Set();
|
|
252
|
+
const mergePlans = buildWallMergePlans(get().nodes, ids);
|
|
105
253
|
set((state) => {
|
|
106
254
|
const nextNodes = { ...state.nodes };
|
|
107
255
|
const nextCollections = { ...state.collections };
|
|
@@ -121,6 +269,31 @@ export const deleteNodesAction = (set, get, ids) => {
|
|
|
121
269
|
};
|
|
122
270
|
for (const id of ids)
|
|
123
271
|
collect(id);
|
|
272
|
+
for (const plan of mergePlans) {
|
|
273
|
+
allIds.add(plan.secondaryWallId);
|
|
274
|
+
}
|
|
275
|
+
for (const plan of mergePlans) {
|
|
276
|
+
const primaryWall = nextNodes[plan.primaryWallId];
|
|
277
|
+
if (!(primaryWall && primaryWall.type === 'wall') || allIds.has(plan.primaryWallId)) {
|
|
278
|
+
continue;
|
|
279
|
+
}
|
|
280
|
+
nextNodes[plan.primaryWallId] = {
|
|
281
|
+
...primaryWall,
|
|
282
|
+
start: plan.mergedStart,
|
|
283
|
+
end: plan.mergedEnd,
|
|
284
|
+
children: plan.mergedChildren,
|
|
285
|
+
};
|
|
286
|
+
nodesToMarkDirty.add(plan.primaryWallId);
|
|
287
|
+
for (const update of plan.attachmentUpdates) {
|
|
288
|
+
if (allIds.has(update.id))
|
|
289
|
+
continue;
|
|
290
|
+
const child = nextNodes[update.id];
|
|
291
|
+
if (!child)
|
|
292
|
+
continue;
|
|
293
|
+
nextNodes[update.id] = { ...child, ...update.data };
|
|
294
|
+
nodesToMarkDirty.add(update.id);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
124
297
|
for (const id of allIds) {
|
|
125
298
|
const node = nextNodes[id];
|
|
126
299
|
if (!node)
|
|
@@ -164,4 +337,7 @@ export const deleteNodesAction = (set, get, ids) => {
|
|
|
164
337
|
}
|
|
165
338
|
}
|
|
166
339
|
});
|
|
340
|
+
nodesToMarkDirty.forEach((id) => {
|
|
341
|
+
get().markDirty(id);
|
|
342
|
+
});
|
|
167
343
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
type TemporalStoreLike = {
|
|
2
|
+
temporal: {
|
|
3
|
+
getState(): {
|
|
4
|
+
pause(): void;
|
|
5
|
+
resume(): void;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export declare function pauseSceneHistory(sceneStore: TemporalStoreLike): void;
|
|
10
|
+
export declare function resumeSceneHistory(sceneStore: TemporalStoreLike): void;
|
|
11
|
+
export declare function getSceneHistoryPauseDepth(): number;
|
|
12
|
+
export declare function resetSceneHistoryPauseDepth(): void;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=history-control.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"history-control.d.ts","sourceRoot":"","sources":["../../src/store/history-control.ts"],"names":[],"mappings":"AAEA,KAAK,iBAAiB,GAAG;IACvB,QAAQ,EAAE;QACR,QAAQ,IAAI;YACV,KAAK,IAAI,IAAI,CAAA;YACb,MAAM,IAAI,IAAI,CAAA;SACf,CAAA;KACF,CAAA;CACF,CAAA;AAED,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,iBAAiB,GAAG,IAAI,CAKrE;AAED,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,iBAAiB,GAAG,IAAI,CAStE;AAED,wBAAgB,yBAAyB,IAAI,MAAM,CAElD;AAED,wBAAgB,2BAA2B,IAAI,IAAI,CAElD"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
let sceneHistoryPauseDepth = 0;
|
|
2
|
+
export function pauseSceneHistory(sceneStore) {
|
|
3
|
+
if (sceneHistoryPauseDepth === 0) {
|
|
4
|
+
sceneStore.temporal.getState().pause();
|
|
5
|
+
}
|
|
6
|
+
sceneHistoryPauseDepth += 1;
|
|
7
|
+
}
|
|
8
|
+
export function resumeSceneHistory(sceneStore) {
|
|
9
|
+
if (sceneHistoryPauseDepth === 0) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
sceneHistoryPauseDepth -= 1;
|
|
13
|
+
if (sceneHistoryPauseDepth === 0) {
|
|
14
|
+
sceneStore.temporal.getState().resume();
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export function getSceneHistoryPauseDepth() {
|
|
18
|
+
return sceneHistoryPauseDepth;
|
|
19
|
+
}
|
|
20
|
+
export function resetSceneHistoryPauseDepth() {
|
|
21
|
+
sceneHistoryPauseDepth = 0;
|
|
22
|
+
}
|
|
@@ -4,14 +4,57 @@ export type ControlValue = boolean | number;
|
|
|
4
4
|
export type ItemInteractiveState = {
|
|
5
5
|
controlValues: ControlValue[];
|
|
6
6
|
};
|
|
7
|
+
export type DoorInteractiveState = {
|
|
8
|
+
operationState?: number;
|
|
9
|
+
swingAngle?: number;
|
|
10
|
+
};
|
|
11
|
+
export type DoorAnimationState = {
|
|
12
|
+
field: keyof DoorInteractiveState;
|
|
13
|
+
from: number;
|
|
14
|
+
to: number;
|
|
15
|
+
startedAt: number | null;
|
|
16
|
+
durationMs: number;
|
|
17
|
+
persist: boolean;
|
|
18
|
+
};
|
|
19
|
+
export type WindowInteractiveState = {
|
|
20
|
+
operationState?: number;
|
|
21
|
+
};
|
|
22
|
+
export type WindowAnimationState = {
|
|
23
|
+
field: keyof WindowInteractiveState;
|
|
24
|
+
from: number;
|
|
25
|
+
to: number;
|
|
26
|
+
startedAt: number | null;
|
|
27
|
+
durationMs: number;
|
|
28
|
+
persist: boolean;
|
|
29
|
+
};
|
|
7
30
|
type InteractiveStore = {
|
|
8
31
|
items: Record<AnyNodeId, ItemInteractiveState>;
|
|
32
|
+
doors: Record<AnyNodeId, DoorInteractiveState>;
|
|
33
|
+
doorAnimations: Record<AnyNodeId, DoorAnimationState>;
|
|
34
|
+
windows: Record<AnyNodeId, WindowInteractiveState>;
|
|
35
|
+
windowAnimations: Record<AnyNodeId, WindowAnimationState>;
|
|
9
36
|
/** Initialize a node's interactive state from its asset definition (idempotent) */
|
|
10
37
|
initItem: (itemId: AnyNodeId, interactive: Interactive) => void;
|
|
11
38
|
/** Set a single control value */
|
|
12
39
|
setControlValue: (itemId: AnyNodeId, index: number, value: ControlValue) => void;
|
|
13
40
|
/** Remove a node's state (e.g. on unmount) */
|
|
14
41
|
removeItem: (itemId: AnyNodeId) => void;
|
|
42
|
+
/** Set transient door open state without committing it to the scene node */
|
|
43
|
+
setDoorOpenState: (doorId: AnyNodeId, value: DoorInteractiveState) => void;
|
|
44
|
+
/** Clear transient door open state */
|
|
45
|
+
removeDoorOpenState: (doorId: AnyNodeId) => void;
|
|
46
|
+
/** Queue a door animation for the viewer frame loop */
|
|
47
|
+
startDoorAnimation: (doorId: AnyNodeId, value: DoorAnimationState) => void;
|
|
48
|
+
/** Cancel a queued door animation */
|
|
49
|
+
cancelDoorAnimation: (doorId: AnyNodeId) => void;
|
|
50
|
+
/** Set transient window open state without committing it to the scene node */
|
|
51
|
+
setWindowOpenState: (windowId: AnyNodeId, value: WindowInteractiveState) => void;
|
|
52
|
+
/** Clear transient window open state */
|
|
53
|
+
removeWindowOpenState: (windowId: AnyNodeId) => void;
|
|
54
|
+
/** Queue a window animation for the viewer frame loop */
|
|
55
|
+
startWindowAnimation: (windowId: AnyNodeId, value: WindowAnimationState) => void;
|
|
56
|
+
/** Cancel a queued window animation */
|
|
57
|
+
cancelWindowAnimation: (windowId: AnyNodeId) => void;
|
|
15
58
|
};
|
|
16
59
|
export declare const useInteractive: import("zustand").UseBoundStore<import("zustand").StoreApi<InteractiveStore>>;
|
|
17
60
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-interactive.d.ts","sourceRoot":"","sources":["../../src/store/use-interactive.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAGhD,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,MAAM,CAAA;AAE3C,MAAM,MAAM,oBAAoB,GAAG;IAEjC,aAAa,EAAE,YAAY,EAAE,CAAA;CAC9B,CAAA;AAED,KAAK,gBAAgB,GAAG;IACtB,KAAK,EAAE,MAAM,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"use-interactive.d.ts","sourceRoot":"","sources":["../../src/store/use-interactive.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAGhD,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,MAAM,CAAA;AAE3C,MAAM,MAAM,oBAAoB,GAAG;IAEjC,aAAa,EAAE,YAAY,EAAE,CAAA;CAC9B,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,EAAE,MAAM,oBAAoB,CAAA;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,EAAE,EAAE,MA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CAAC,MAAM,EAAE,SAAS,KAAK,IAAI,CAAA;IAEhD,uDAAuD;IACvD,kBAAkB,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,kBAAkB,KAAK,IAAI,CAAA;IAE1E,qCAAqC;IACrC,mBAAmB,EAAE,CAAC,MAAM,EAAE,SAAS,KAAK,IAAI,CAAA;IAEhD,8EAA8E;IAC9E,kBAAkB,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,sBAAsB,KAAK,IAAI,CAAA;IAEhF,wCAAwC;IACxC,qBAAqB,EAAE,CAAC,QAAQ,EAAE,SAAS,KAAK,IAAI,CAAA;IAEpD,yDAAyD;IACzD,oBAAoB,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,oBAAoB,KAAK,IAAI,CAAA;IAEhF,uCAAuC;IACvC,qBAAqB,EAAE,CAAC,QAAQ,EAAE,SAAS,KAAK,IAAI,CAAA;CACrD,CAAA;AAeD,eAAO,MAAM,cAAc,+EA8GxB,CAAA"}
|
|
@@ -15,6 +15,10 @@ const defaultControlValue = (interactive, index) => {
|
|
|
15
15
|
};
|
|
16
16
|
export const useInteractive = create((set, get) => ({
|
|
17
17
|
items: {},
|
|
18
|
+
doors: {},
|
|
19
|
+
doorAnimations: {},
|
|
20
|
+
windows: {},
|
|
21
|
+
windowAnimations: {},
|
|
18
22
|
initItem: (itemId, interactive) => {
|
|
19
23
|
const { controls } = interactive;
|
|
20
24
|
if (controls.length === 0)
|
|
@@ -47,4 +51,66 @@ export const useInteractive = create((set, get) => ({
|
|
|
47
51
|
return { items: rest };
|
|
48
52
|
});
|
|
49
53
|
},
|
|
54
|
+
setDoorOpenState: (doorId, value) => {
|
|
55
|
+
set((state) => ({
|
|
56
|
+
doors: {
|
|
57
|
+
...state.doors,
|
|
58
|
+
[doorId]: {
|
|
59
|
+
...state.doors[doorId],
|
|
60
|
+
...value,
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
}));
|
|
64
|
+
},
|
|
65
|
+
removeDoorOpenState: (doorId) => {
|
|
66
|
+
set((state) => {
|
|
67
|
+
const { [doorId]: _, ...rest } = state.doors;
|
|
68
|
+
return { doors: rest };
|
|
69
|
+
});
|
|
70
|
+
},
|
|
71
|
+
startDoorAnimation: (doorId, value) => {
|
|
72
|
+
set((state) => ({
|
|
73
|
+
doorAnimations: {
|
|
74
|
+
...state.doorAnimations,
|
|
75
|
+
[doorId]: value,
|
|
76
|
+
},
|
|
77
|
+
}));
|
|
78
|
+
},
|
|
79
|
+
cancelDoorAnimation: (doorId) => {
|
|
80
|
+
set((state) => {
|
|
81
|
+
const { [doorId]: _, ...rest } = state.doorAnimations;
|
|
82
|
+
return { doorAnimations: rest };
|
|
83
|
+
});
|
|
84
|
+
},
|
|
85
|
+
setWindowOpenState: (windowId, value) => {
|
|
86
|
+
set((state) => ({
|
|
87
|
+
windows: {
|
|
88
|
+
...state.windows,
|
|
89
|
+
[windowId]: {
|
|
90
|
+
...state.windows[windowId],
|
|
91
|
+
...value,
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
}));
|
|
95
|
+
},
|
|
96
|
+
removeWindowOpenState: (windowId) => {
|
|
97
|
+
set((state) => {
|
|
98
|
+
const { [windowId]: _, ...rest } = state.windows;
|
|
99
|
+
return { windows: rest };
|
|
100
|
+
});
|
|
101
|
+
},
|
|
102
|
+
startWindowAnimation: (windowId, value) => {
|
|
103
|
+
set((state) => ({
|
|
104
|
+
windowAnimations: {
|
|
105
|
+
...state.windowAnimations,
|
|
106
|
+
[windowId]: value,
|
|
107
|
+
},
|
|
108
|
+
}));
|
|
109
|
+
},
|
|
110
|
+
cancelWindowAnimation: (windowId) => {
|
|
111
|
+
set((state) => {
|
|
112
|
+
const { [windowId]: _, ...rest } = state.windowAnimations;
|
|
113
|
+
return { windowAnimations: rest };
|
|
114
|
+
});
|
|
115
|
+
},
|
|
50
116
|
}));
|
|
@@ -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;
|
|
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;IAG1B,WAAW,EAAE,MAAM,CAAC,YAAY,EAAE,UAAU,CAAC,CAAA;IAG7C,QAAQ,EAAE,OAAO,CAAA;IACjB,WAAW,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAA;IAGxC,SAAS,EAAE,MAAM,IAAI,CAAA;IACrB,UAAU,EAAE,MAAM,IAAI,CAAA;IACtB,WAAW,EAAE,MAAM,IAAI,CAAA;IACvB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK,IAAI,CAAA;IAE/E,SAAS,EAAE,CAAC,EAAE,EAAE,SAAS,KA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