@pascal-app/viewer 1.0.3 → 1.0.5

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.
Files changed (276) hide show
  1. package/dist/capture/capture-runtime.js +1 -1
  2. package/dist/components/error-boundary.d.ts.map +1 -1
  3. package/dist/components/renderers/node-renderer.d.ts +1 -1
  4. package/dist/components/renderers/node-renderer.d.ts.map +1 -1
  5. package/dist/components/renderers/node-renderer.js +12 -4
  6. package/dist/components/renderers/parametric-node-renderer.d.ts.map +1 -1
  7. package/dist/components/viewer/bvh-ecctrl.d.ts.map +1 -1
  8. package/dist/components/viewer/frame-limiter.d.ts +1 -0
  9. package/dist/components/viewer/frame-limiter.d.ts.map +1 -1
  10. package/dist/components/viewer/frame-limiter.js +22 -3
  11. package/dist/components/viewer/glb-interactive.d.ts +25 -1
  12. package/dist/components/viewer/glb-interactive.d.ts.map +1 -1
  13. package/dist/components/viewer/glb-interactive.js +253 -86
  14. package/dist/components/viewer/glb-mechanisms.d.ts +10 -0
  15. package/dist/components/viewer/glb-mechanisms.d.ts.map +1 -0
  16. package/dist/components/viewer/glb-mechanisms.js +19 -0
  17. package/dist/components/viewer/glb-reference-nodes.js +1 -1
  18. package/dist/components/viewer/glb-replace-instances.js +1 -1
  19. package/dist/components/viewer/glb-scene.d.ts +45 -27
  20. package/dist/components/viewer/glb-scene.d.ts.map +1 -1
  21. package/dist/components/viewer/glb-scene.js +421 -508
  22. package/dist/components/viewer/glb-walkthrough-controller.d.ts +1 -1
  23. package/dist/components/viewer/glb-walkthrough-controller.d.ts.map +1 -1
  24. package/dist/components/viewer/glb-walkthrough-controller.js +13 -2
  25. package/dist/components/viewer/index.d.ts +24 -1
  26. package/dist/components/viewer/index.d.ts.map +1 -1
  27. package/dist/components/viewer/index.js +111 -37
  28. package/dist/components/viewer/lights.d.ts.map +1 -1
  29. package/dist/components/viewer/lights.js +113 -22
  30. package/dist/components/viewer/perf-monitor.d.ts.map +1 -1
  31. package/dist/components/viewer/perf-monitor.js +6 -0
  32. package/dist/components/viewer/perf-panel.d.ts.map +1 -1
  33. package/dist/components/viewer/perf-panel.js +1 -1
  34. package/dist/components/viewer/post-processing.d.ts.map +1 -1
  35. package/dist/components/viewer/post-processing.js +104 -36
  36. package/dist/components/viewer/registered-systems.d.ts.map +1 -1
  37. package/dist/components/viewer/registered-systems.js +17 -3
  38. package/dist/components/viewer/render-error.d.ts +18 -0
  39. package/dist/components/viewer/render-error.d.ts.map +1 -0
  40. package/dist/components/viewer/render-error.js +29 -0
  41. package/dist/components/viewer/scene-bvh.d.ts.map +1 -1
  42. package/dist/components/viewer/scene-bvh.js +1 -1
  43. package/dist/components/viewer/scene-environment.d.ts.map +1 -1
  44. package/dist/components/viewer/scene-environment.js +31 -11
  45. package/dist/components/viewer/scene-ground-replacement.d.ts +6 -0
  46. package/dist/components/viewer/scene-ground-replacement.d.ts.map +1 -1
  47. package/dist/components/viewer/scene-ground-replacement.js +15 -0
  48. package/dist/components/viewer/selection-manager.d.ts.map +1 -1
  49. package/dist/components/viewer/selection-manager.js +25 -7
  50. package/dist/components/viewer/underground-ambiance.d.ts +9 -0
  51. package/dist/components/viewer/underground-ambiance.d.ts.map +1 -0
  52. package/dist/components/viewer/underground-ambiance.js +105 -0
  53. package/dist/components/viewer/viewer-camera.d.ts +4 -0
  54. package/dist/components/viewer/viewer-camera.d.ts.map +1 -1
  55. package/dist/components/viewer/viewer-camera.js +12 -2
  56. package/dist/components/viewer/viewer-presentations.d.ts.map +1 -1
  57. package/dist/hooks/use-gltf-ktx2.d.ts.map +1 -1
  58. package/dist/hooks/use-gltf-ktx2.js +2 -0
  59. package/dist/hooks/use-node-events.d.ts.map +1 -1
  60. package/dist/index.d.ts +36 -16
  61. package/dist/index.d.ts.map +1 -1
  62. package/dist/index.js +34 -19
  63. package/dist/lib/asset-url.d.ts.map +1 -1
  64. package/dist/lib/asset-url.js +7 -1
  65. package/dist/lib/backdrop.d.ts +17 -0
  66. package/dist/lib/backdrop.d.ts.map +1 -1
  67. package/dist/lib/backdrop.js +18 -1
  68. package/dist/lib/construction-dust.d.ts +57 -0
  69. package/dist/lib/construction-dust.d.ts.map +1 -0
  70. package/dist/lib/construction-dust.js +187 -0
  71. package/dist/lib/csg-utils.js +1 -1
  72. package/dist/lib/display-state.d.ts +25 -0
  73. package/dist/lib/display-state.d.ts.map +1 -0
  74. package/dist/lib/display-state.js +1 -0
  75. package/dist/lib/foundation-materials.d.ts +26 -0
  76. package/dist/lib/foundation-materials.d.ts.map +1 -0
  77. package/dist/lib/foundation-materials.js +65 -0
  78. package/dist/lib/gltf-unlit.d.ts +10 -0
  79. package/dist/lib/gltf-unlit.d.ts.map +1 -0
  80. package/dist/lib/gltf-unlit.js +23 -0
  81. package/dist/lib/ground-window.d.ts +33 -0
  82. package/dist/lib/ground-window.d.ts.map +1 -0
  83. package/dist/lib/ground-window.js +114 -0
  84. package/dist/lib/hero-pose.d.ts +13 -3
  85. package/dist/lib/hero-pose.d.ts.map +1 -1
  86. package/dist/lib/hero-pose.js +72 -5
  87. package/dist/lib/ink-edges.d.ts +6 -3
  88. package/dist/lib/ink-edges.d.ts.map +1 -1
  89. package/dist/lib/ink-edges.js +17 -7
  90. package/dist/lib/key-light-override.d.ts +11 -0
  91. package/dist/lib/key-light-override.d.ts.map +1 -0
  92. package/dist/lib/key-light-override.js +14 -0
  93. package/dist/lib/ktx2-loader.d.ts +7 -0
  94. package/dist/lib/ktx2-loader.d.ts.map +1 -1
  95. package/dist/lib/ktx2-loader.js +35 -0
  96. package/dist/lib/layer-pass.d.ts.map +1 -1
  97. package/dist/lib/layers.d.ts +11 -7
  98. package/dist/lib/layers.d.ts.map +1 -1
  99. package/dist/lib/layers.js +16 -6
  100. package/dist/lib/live-frame-hold.d.ts +14 -0
  101. package/dist/lib/live-frame-hold.d.ts.map +1 -0
  102. package/dist/lib/live-frame-hold.js +28 -0
  103. package/dist/lib/materials.d.ts +19 -7
  104. package/dist/lib/materials.d.ts.map +1 -1
  105. package/dist/lib/materials.js +65 -9
  106. package/dist/lib/merged-outline-node.d.ts +5 -0
  107. package/dist/lib/merged-outline-node.d.ts.map +1 -1
  108. package/dist/lib/merged-outline-node.js +80 -2
  109. package/dist/lib/node-top-surface-height.d.ts +6 -0
  110. package/dist/lib/node-top-surface-height.d.ts.map +1 -0
  111. package/dist/lib/node-top-surface-height.js +74 -0
  112. package/dist/lib/perf-probe-state.d.ts +39 -0
  113. package/dist/lib/perf-probe-state.d.ts.map +1 -0
  114. package/dist/lib/perf-probe-state.js +17 -0
  115. package/dist/lib/pointer-events.d.ts +26 -2
  116. package/dist/lib/pointer-events.d.ts.map +1 -1
  117. package/dist/lib/pointer-events.js +99 -12
  118. package/dist/lib/post-processing-resources.d.ts.map +1 -1
  119. package/dist/lib/procedural-emission.d.ts +7 -0
  120. package/dist/lib/procedural-emission.d.ts.map +1 -0
  121. package/dist/lib/procedural-emission.js +54 -0
  122. package/dist/lib/reveal-candidates.d.ts +80 -0
  123. package/dist/lib/reveal-candidates.d.ts.map +1 -0
  124. package/dist/lib/reveal-candidates.js +524 -0
  125. package/dist/lib/reveal-ghost.d.ts +9 -0
  126. package/dist/lib/reveal-ghost.d.ts.map +1 -0
  127. package/dist/lib/reveal-ghost.js +62 -0
  128. package/dist/lib/reveal-pending.d.ts +12 -0
  129. package/dist/lib/reveal-pending.d.ts.map +1 -0
  130. package/dist/lib/reveal-pending.js +12 -0
  131. package/dist/lib/reveal-pose.d.ts +70 -0
  132. package/dist/lib/reveal-pose.d.ts.map +1 -0
  133. package/dist/lib/reveal-pose.js +248 -0
  134. package/dist/lib/reveal-schedule.d.ts +208 -0
  135. package/dist/lib/reveal-schedule.d.ts.map +1 -0
  136. package/dist/lib/reveal-schedule.js +410 -0
  137. package/dist/lib/reveal-texture-scale.d.ts +5 -0
  138. package/dist/lib/reveal-texture-scale.d.ts.map +1 -0
  139. package/dist/lib/reveal-texture-scale.js +113 -0
  140. package/dist/lib/reveal-windows.d.ts +23 -0
  141. package/dist/lib/reveal-windows.d.ts.map +1 -0
  142. package/dist/lib/reveal-windows.js +31 -0
  143. package/dist/lib/reveal-wipe.d.ts +71 -0
  144. package/dist/lib/reveal-wipe.d.ts.map +1 -0
  145. package/dist/lib/reveal-wipe.js +105 -0
  146. package/dist/lib/scene-pass-mrt.d.ts +12 -0
  147. package/dist/lib/scene-pass-mrt.d.ts.map +1 -0
  148. package/dist/lib/scene-pass-mrt.js +23 -0
  149. package/dist/lib/scene-support-height.d.ts +4 -0
  150. package/dist/lib/scene-support-height.d.ts.map +1 -0
  151. package/dist/lib/scene-support-height.js +34 -0
  152. package/dist/lib/scene-themes.d.ts +30 -8
  153. package/dist/lib/scene-themes.d.ts.map +1 -1
  154. package/dist/lib/scene-themes.js +36 -0
  155. package/dist/lib/scene-visibility.d.ts +17 -1
  156. package/dist/lib/scene-visibility.d.ts.map +1 -1
  157. package/dist/lib/scene-visibility.js +53 -3
  158. package/dist/lib/scripted-opening.d.ts +11 -0
  159. package/dist/lib/scripted-opening.d.ts.map +1 -0
  160. package/dist/lib/scripted-opening.js +20 -0
  161. package/dist/lib/site-surfaces.d.ts +32 -0
  162. package/dist/lib/site-surfaces.d.ts.map +1 -0
  163. package/dist/lib/site-surfaces.js +70 -0
  164. package/dist/lib/snapshot-pipeline.d.ts +34 -3
  165. package/dist/lib/snapshot-pipeline.d.ts.map +1 -1
  166. package/dist/lib/snapshot-pipeline.js +247 -117
  167. package/dist/lib/terrain-perimeter-fill.d.ts.map +1 -1
  168. package/dist/lib/terrain-perimeter-fill.js +22 -14
  169. package/dist/lib/tsl-compat.d.ts +2 -2
  170. package/dist/lib/tsl-compat.d.ts.map +1 -1
  171. package/dist/lib/underground-ambiance.d.ts +168 -0
  172. package/dist/lib/underground-ambiance.d.ts.map +1 -0
  173. package/dist/lib/underground-ambiance.js +334 -0
  174. package/dist/lib/zone-geometry.d.ts +11 -0
  175. package/dist/lib/zone-geometry.d.ts.map +1 -0
  176. package/dist/lib/zone-geometry.js +46 -0
  177. package/dist/store/use-item-light-pool.d.ts +14 -10
  178. package/dist/store/use-item-light-pool.d.ts.map +1 -1
  179. package/dist/store/use-item-light-pool.js +52 -26
  180. package/dist/store/use-viewer.d.ts +194 -26
  181. package/dist/store/use-viewer.d.ts.map +1 -1
  182. package/dist/store/use-viewer.js +164 -21
  183. package/dist/systems/ceiling/ceiling-system.d.ts +15 -1
  184. package/dist/systems/ceiling/ceiling-system.d.ts.map +1 -1
  185. package/dist/systems/ceiling/ceiling-system.js +88 -6
  186. package/dist/systems/construction-reveal/construction-dust.d.ts +16 -0
  187. package/dist/systems/construction-reveal/construction-dust.d.ts.map +1 -0
  188. package/dist/systems/construction-reveal/construction-dust.js +92 -0
  189. package/dist/systems/construction-reveal/construction-reveal.d.ts +276 -0
  190. package/dist/systems/construction-reveal/construction-reveal.d.ts.map +1 -0
  191. package/dist/systems/construction-reveal/construction-reveal.js +2383 -0
  192. package/dist/systems/construction-reveal/dust-material.d.ts +10 -0
  193. package/dist/systems/construction-reveal/dust-material.d.ts.map +1 -0
  194. package/dist/systems/construction-reveal/dust-material.js +17 -0
  195. package/dist/systems/construction-reveal/ghost-dress.d.ts +10 -0
  196. package/dist/systems/construction-reveal/ghost-dress.d.ts.map +1 -0
  197. package/dist/systems/construction-reveal/ghost-dress.js +24 -0
  198. package/dist/systems/door/door-system.d.ts.map +1 -1
  199. package/dist/systems/door/door-system.js +55 -17
  200. package/dist/systems/elevator/elevator-interaction-system.d.ts +7 -0
  201. package/dist/systems/elevator/elevator-interaction-system.d.ts.map +1 -1
  202. package/dist/systems/elevator/elevator-interaction-system.js +18 -1
  203. package/dist/systems/floor-elevation/floor-elevation-system.d.ts +3 -1
  204. package/dist/systems/floor-elevation/floor-elevation-system.d.ts.map +1 -1
  205. package/dist/systems/floor-elevation/floor-elevation-system.js +33 -5
  206. package/dist/systems/geometry/geometry-system.d.ts.map +1 -1
  207. package/dist/systems/geometry/geometry-system.js +71 -11
  208. package/dist/systems/interactive/control-widget.d.ts.map +1 -1
  209. package/dist/systems/interactive/interactive-system.d.ts.map +1 -1
  210. package/dist/systems/interactive/interactive-system.js +52 -17
  211. package/dist/systems/interactive/procedural-controls.d.ts +13 -0
  212. package/dist/systems/interactive/procedural-controls.d.ts.map +1 -0
  213. package/dist/systems/interactive/procedural-controls.js +17 -0
  214. package/dist/systems/interactive/scripted-clips.d.ts +19 -0
  215. package/dist/systems/interactive/scripted-clips.d.ts.map +1 -0
  216. package/dist/systems/interactive/scripted-clips.js +134 -0
  217. package/dist/systems/item/item-system.d.ts.map +1 -1
  218. package/dist/systems/item/item-system.js +9 -3
  219. package/dist/systems/item/object-cut-invalidation.d.ts +3 -0
  220. package/dist/systems/item/object-cut-invalidation.d.ts.map +1 -0
  221. package/dist/systems/item/object-cut-invalidation.js +68 -0
  222. package/dist/systems/item-light/item-light-system.d.ts +1 -1
  223. package/dist/systems/item-light/item-light-system.d.ts.map +1 -1
  224. package/dist/systems/item-light/item-light-system.js +48 -53
  225. package/dist/systems/level/level-hold.d.ts +4 -0
  226. package/dist/systems/level/level-hold.d.ts.map +1 -0
  227. package/dist/systems/level/level-hold.js +14 -0
  228. package/dist/systems/level/level-system.d.ts.map +1 -1
  229. package/dist/systems/level/level-system.js +19 -6
  230. package/dist/systems/level/level-utils.d.ts +19 -6
  231. package/dist/systems/level/level-utils.d.ts.map +1 -1
  232. package/dist/systems/level/level-utils.js +68 -9
  233. package/dist/systems/level/shadow-only-levels.d.ts +9 -0
  234. package/dist/systems/level/shadow-only-levels.d.ts.map +1 -0
  235. package/dist/systems/level/shadow-only-levels.js +7 -0
  236. package/dist/systems/roof/__fixtures__/roof-plane-cases.d.ts +103 -0
  237. package/dist/systems/roof/__fixtures__/roof-plane-cases.d.ts.map +1 -0
  238. package/dist/systems/roof/__fixtures__/roof-plane-cases.js +317 -0
  239. package/dist/systems/roof/roof-materials.d.ts +16 -2
  240. package/dist/systems/roof/roof-materials.d.ts.map +1 -1
  241. package/dist/systems/roof/roof-materials.js +64 -31
  242. package/dist/systems/roof/roof-system.d.ts +21 -4
  243. package/dist/systems/roof/roof-system.d.ts.map +1 -1
  244. package/dist/systems/roof/roof-system.js +374 -49
  245. package/dist/systems/slab/slab-system.d.ts +1 -1
  246. package/dist/systems/slab/slab-system.d.ts.map +1 -1
  247. package/dist/systems/slab/slab-system.js +49 -19
  248. package/dist/systems/stair/stair-system.d.ts.map +1 -1
  249. package/dist/systems/stair/stair-system.js +133 -354
  250. package/dist/systems/wall/wall-cutout-cache.d.ts +39 -3
  251. package/dist/systems/wall/wall-cutout-cache.d.ts.map +1 -1
  252. package/dist/systems/wall/wall-cutout-cache.js +141 -19
  253. package/dist/systems/wall/wall-cutout.d.ts +6 -0
  254. package/dist/systems/wall/wall-cutout.d.ts.map +1 -1
  255. package/dist/systems/wall/wall-cutout.js +42 -28
  256. package/dist/systems/wall/wall-finish-data.d.ts +22 -0
  257. package/dist/systems/wall/wall-finish-data.d.ts.map +1 -0
  258. package/dist/systems/wall/wall-finish-data.js +17 -0
  259. package/dist/systems/wall/wall-material-variant.d.ts.map +1 -1
  260. package/dist/systems/wall/wall-materials.d.ts +9 -4
  261. package/dist/systems/wall/wall-materials.d.ts.map +1 -1
  262. package/dist/systems/wall/wall-materials.js +135 -153
  263. package/dist/systems/wall/wall-placeholder-sweep.d.ts.map +1 -1
  264. package/dist/systems/wall/wall-system.d.ts +33 -2
  265. package/dist/systems/wall/wall-system.d.ts.map +1 -1
  266. package/dist/systems/wall/wall-system.js +621 -159
  267. package/dist/systems/window/corner-frame.d.ts +10 -0
  268. package/dist/systems/window/corner-frame.d.ts.map +1 -0
  269. package/dist/systems/window/corner-frame.js +17 -0
  270. package/dist/systems/window/window-system.d.ts +1 -1
  271. package/dist/systems/window/window-system.d.ts.map +1 -1
  272. package/dist/systems/window/window-system.js +71 -27
  273. package/package.json +10 -10
  274. package/dist/systems/fence/fence-system.d.ts +0 -22
  275. package/dist/systems/fence/fence-system.d.ts.map +0 -1
  276. package/dist/systems/fence/fence-system.js +0 -357
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { emitter, getSelectableKinds, pointInPolygon, resolveSelectionProxyId, sceneRegistry, useRegistryVersion, useScene, } from '@pascal-app/core';
4
4
  import { useThree } from '@react-three/fiber';
5
5
  import { useEffect, useRef } from 'react';
@@ -233,6 +233,10 @@ export const SelectionManager = () => {
233
233
  // re-subscribe when plugin kinds register after mount (async plugin load)
234
234
  void registryVersion;
235
235
  const onEnter = (event) => {
236
+ // Walkthrough is camera-only: first-person controls own hover for the
237
+ // interactable target, and pointer lock keeps raycasting from a frozen cursor.
238
+ if (useViewer.getState().walkthroughMode)
239
+ return;
236
240
  const strategy = getStrategy();
237
241
  if (!strategy)
238
242
  return;
@@ -254,6 +258,8 @@ export const SelectionManager = () => {
254
258
  }
255
259
  };
256
260
  const onLeave = (event) => {
261
+ if (useViewer.getState().walkthroughMode)
262
+ return;
257
263
  const strategy = getStrategy();
258
264
  if (!strategy)
259
265
  return;
@@ -268,6 +274,8 @@ export const SelectionManager = () => {
268
274
  }
269
275
  };
270
276
  const onClick = (event) => {
277
+ if (useViewer.getState().walkthroughMode)
278
+ return;
271
279
  const strategy = getStrategy();
272
280
  if (!strategy)
273
281
  return;
@@ -324,6 +332,8 @@ const PointerMissedHandler = ({ clickHandledRef, }) => {
324
332
  const viewerState = useViewer.getState();
325
333
  if (viewerState.cameraDragging || viewerState.inputDragging)
326
334
  return;
335
+ if (viewerState.walkthroughMode)
336
+ return;
327
337
  if (event.button !== 0)
328
338
  return;
329
339
  // Use requestAnimationFrame to check after R3F event handlers
@@ -352,6 +362,7 @@ const OutlinerSync = () => {
352
362
  const selection = useViewer((s) => s.selection);
353
363
  const externalSelectedIds = useViewer((s) => s.externalSelectedIds);
354
364
  const hoveredId = useViewer((s) => s.hoveredId);
365
+ const pointedIds = useViewer((s) => s.pointedIds);
355
366
  const outliner = useViewer((s) => s.outliner);
356
367
  const geometryRevision = useViewer((s) => s.geometryRevision);
357
368
  const nodes = useScene((s) => s.nodes);
@@ -367,16 +378,23 @@ const OutlinerSync = () => {
367
378
  if (obj)
368
379
  outliner.selectedObjects.push(obj);
369
380
  }
370
- // Sync hovered objects
381
+ // Sync hovered objects, then the ones a chat chip points at (Point and ask).
371
382
  outliner.hoveredObjects.length = 0;
372
383
  if (hoveredId) {
373
384
  const hoveredNode = nodes[hoveredId];
374
- if (hoveredNode?.type === 'slab')
375
- return;
376
- const obj = sceneRegistry.nodes.get(hoveredId);
377
- if (obj)
385
+ if (hoveredNode?.type !== 'slab') {
386
+ const obj = sceneRegistry.nodes.get(hoveredId);
387
+ if (obj)
388
+ outliner.hoveredObjects.push(obj);
389
+ }
390
+ }
391
+ for (const id of new Set(pointedIds)) {
392
+ if (nodes[id]?.type === 'slab')
393
+ continue;
394
+ const obj = sceneRegistry.nodes.get(id);
395
+ if (obj && !outliner.hoveredObjects.includes(obj))
378
396
  outliner.hoveredObjects.push(obj);
379
397
  }
380
- }, [selection, externalSelectedIds, hoveredId, outliner, nodes, geometryRevision]);
398
+ }, [selection, externalSelectedIds, hoveredId, pointedIds, outliner, nodes, geometryRevision]);
381
399
  return null;
382
400
  };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Keeps the two states the ground is the medium of. The eye above the ground, a level below
3
+ * grade shown with the ground on Auto: a hole opens in the ground (the factor `hole`, eased).
4
+ * The eye under the ground: the dark mode, the factor `ambiance`, eased in over a short
5
+ * crossing and back out when the eye comes up. Neither follows the other: a veiled basement
6
+ * seen from above has no ambiance. Mount beside `Lights`, which does.
7
+ */
8
+ export declare function UndergroundAmbiance(): null;
9
+ //# sourceMappingURL=underground-ambiance.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"underground-ambiance.d.ts","sourceRoot":"","sources":["../../../src/components/viewer/underground-ambiance.tsx"],"names":[],"mappings":"AAoCA;;;;;;GAMG;AACH,wBAAgB,mBAAmB,SAyGlC"}
@@ -0,0 +1,105 @@
1
+ 'use client';
2
+ import { buildingGroundBox, groundHeightAt, levelStackGroundBox, sceneRegistry, useScene, } from '@pascal-app/core';
3
+ import { useFrame } from '@react-three/fiber';
4
+ import { useRef } from 'react';
5
+ import { Vector3 } from 'three';
6
+ import { AMBIANCE_SECONDS, ambianceNow, ambianceTarget, applyAmbianceToSkyLights, earthNow, earthTarget, easeAmbiance, eyeUnderTheGround, FADE_SECONDS, restoreSkyLights, setAmbianceFactor, setAmbianceFocus, setDiveGrainWeight, setEarthFactor, setGroundHoleOpen, stepAmbianceProgress, } from '../../lib/underground-ambiance';
7
+ import useViewer, { groundVeiled } from '../../store/use-viewer';
8
+ import { revealMotionOff } from '../../systems/construction-reveal/construction-reveal';
9
+ /**
10
+ * Keeps the two states the ground is the medium of. The eye above the ground, a level below
11
+ * grade shown with the ground on Auto: a hole opens in the ground (the factor `hole`, eased).
12
+ * The eye under the ground: the dark mode, the factor `ambiance`, eased in over a short
13
+ * crossing and back out when the eye comes up. Neither follows the other: a veiled basement
14
+ * seen from above has no ambiance. Mount beside `Lights`, which does.
15
+ */
16
+ export function UndergroundAmbiance() {
17
+ const progress = useRef(null);
18
+ const holeProgress = useRef(null);
19
+ const earthProgress = useRef(null);
20
+ const eye = useRef(new Vector3());
21
+ const lastEye = useRef(new Vector3(Number.NaN, Number.NaN, Number.NaN));
22
+ const lastNodes = useRef(null);
23
+ const groundY = useRef(0);
24
+ // The box the fog keeps clear: the host's ground window box when it keeps one, else the level
25
+ // shown (or the building) worked out here, so a host without the window still gets it.
26
+ const focus = useRef(null);
27
+ const focusFrom = useRef([]);
28
+ // Before `Lights` lerps the sky's lights (-1) they are given back as the theme set them, and
29
+ // after it they are moved for the frame the pipeline (1) draws.
30
+ useFrame((state, delta) => {
31
+ restoreSkyLights();
32
+ const viewer = useViewer.getState();
33
+ state.camera.getWorldPosition(eye.current);
34
+ const { nodes } = useScene.getState();
35
+ if (!eye.current.equals(lastEye.current) || nodes !== lastNodes.current) {
36
+ lastEye.current.copy(eye.current);
37
+ lastNodes.current = nodes;
38
+ const siteId = sceneRegistry.byType.site?.values().next().value;
39
+ const site = siteId ? nodes[siteId] : null;
40
+ groundY.current = groundHeightAt(site, eye.current.x, eye.current.z);
41
+ }
42
+ const under = eyeUnderTheGround(viewer.eyeUnderGround, eye.current.y, groundY.current);
43
+ if (under !== viewer.eyeUnderGround)
44
+ useViewer.setState({ eyeUnderGround: under });
45
+ // The first frame takes the world as it is: a project opened below grade does not dive.
46
+ const instant = revealMotionOff() || viewer.isExporting;
47
+ const fade = viewer.undergroundLook.transition === 'fade';
48
+ const seconds = instant ? 0 : fade ? FADE_SECONDS : AMBIANCE_SECONDS;
49
+ setDiveGrainWeight(fade ? 0 : 1);
50
+ const dt = Math.min(delta, 0.1);
51
+ const target = ambianceTarget({
52
+ eyeUnderGround: under,
53
+ groundMode: viewer.groundMode,
54
+ walkthroughMode: viewer.walkthroughMode,
55
+ });
56
+ const next = stepAmbianceProgress(progress.current ?? target, target, dt, seconds);
57
+ progress.current = next;
58
+ const eased = easeAmbiance(next);
59
+ setAmbianceFactor(eased);
60
+ const active = eased > 0;
61
+ if (viewer.ambianceActive !== active)
62
+ useViewer.setState({ ambianceActive: active });
63
+ // What is seen beyond the walls turns to earth with the eye, in the walkthrough too: there it
64
+ // is the only part of the dark mode that does (the rooms keep their light, no fog, no vignette).
65
+ const earthWanted = earthTarget({ eyeUnderGround: under, groundMode: viewer.groundMode });
66
+ const earthNext = stepAmbianceProgress(earthProgress.current ?? earthWanted, earthWanted, dt, seconds);
67
+ earthProgress.current = earthNext;
68
+ setEarthFactor(easeAmbiance(earthNext));
69
+ const holeTarget = groundVeiled(viewer) ? 1 : 0;
70
+ const holeNext = stepAmbianceProgress(holeProgress.current ?? holeTarget, holeTarget, dt, instant ? 0 : AMBIANCE_SECONDS);
71
+ holeProgress.current = holeNext;
72
+ setGroundHoleOpen(easeAmbiance(holeNext));
73
+ if (next !== target || holeNext !== holeTarget || earthNext !== earthWanted)
74
+ state.invalidate();
75
+ if (eased > 0 || earthNext > 0) {
76
+ const { selection, hideLevelsAboveSelection, belowGrade, groundWindowBox } = viewer;
77
+ const from = [
78
+ nodes,
79
+ selection.levelId,
80
+ selection.buildingId,
81
+ hideLevelsAboveSelection,
82
+ belowGrade,
83
+ groundWindowBox,
84
+ ];
85
+ if (from.some((value, index) => value !== focusFrom.current[index])) {
86
+ focusFrom.current = from;
87
+ // Where the world stays clear: the shown level and the ones under it (a deep level is
88
+ // seen with the stack over it opened), else the host's window box, else the building.
89
+ focus.current =
90
+ (selection.levelId && (hideLevelsAboveSelection || belowGrade)
91
+ ? levelStackGroundBox(nodes, selection.levelId)
92
+ : null) ??
93
+ groundWindowBox ??
94
+ buildingGroundBox(nodes, selection.buildingId ?? null);
95
+ }
96
+ }
97
+ }, -2);
98
+ useFrame(() => {
99
+ const amount = ambianceNow();
100
+ if (amount > 0 || earthNow() > 0)
101
+ setAmbianceFocus(focus.current, eye.current);
102
+ applyAmbianceToSkyLights(amount);
103
+ }, 0);
104
+ return null;
105
+ }
@@ -9,6 +9,10 @@ export declare function applyViewerCameraClipping(camera: {
9
9
  near: number;
10
10
  updateProjectionMatrix(): void;
11
11
  }, immersiveXR: boolean): void;
12
+ export declare function applyWalkthroughCameraClipping(camera: {
13
+ near: number;
14
+ updateProjectionMatrix(): void;
15
+ }): () => void;
12
16
  export declare function viewerUsesPerspectiveCamera(cameraMode: string, immersiveXR: boolean): boolean;
13
17
  export declare const ViewerCamera: ({ immersiveXR }: {
14
18
  immersiveXR?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"viewer-camera.d.ts","sourceRoot":"","sources":["../../../src/components/viewer/viewer-camera.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAOnC,wBAAgB,2BAA2B,CAAC,YAAY,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,cAWxF;AAcD,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,OAAO;;;EAExD;AAED,wBAAgB,yBAAyB,CACvC,MAAM,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,sBAAsB,IAAI,IAAI,CAAA;CAAE,EACrE,WAAW,EAAE,OAAO,QAMrB;AAED,wBAAgB,2BAA2B,CAAC,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,WAEnF;AAED,eAAO,MAAM,YAAY,GAAI,iBAAyB;IAAE,WAAW,CAAC,EAAE,OAAO,CAAA;CAAE,gCAqB9E,CAAA"}
1
+ {"version":3,"file":"viewer-camera.d.ts","sourceRoot":"","sources":["../../../src/components/viewer/viewer-camera.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAOnC,wBAAgB,2BAA2B,CAAC,YAAY,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,cAWxF;AAcD,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,OAAO;;;EAExD;AAED,wBAAgB,yBAAyB,CACvC,MAAM,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,sBAAsB,IAAI,IAAI,CAAA;CAAE,EACrE,WAAW,EAAE,OAAO,QAMrB;AAED,wBAAgB,8BAA8B,CAAC,MAAM,EAAE;IACrD,IAAI,EAAE,MAAM,CAAA;IACZ,sBAAsB,IAAI,IAAI,CAAA;CAC/B,cASA;AAED,wBAAgB,2BAA2B,CAAC,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,WAEnF;AAED,eAAO,MAAM,YAAY,oBAA6B;IAAE,WAAW,CAAC,EAAE,OAAO,CAAA;CAAE,gCAqB9E,CAAA"}
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { OrthographicCamera, PerspectiveCamera } from '@react-three/drei';
3
3
  import { useThree } from '@react-three/fiber';
4
4
  import { useEffect } from 'react';
@@ -29,7 +29,7 @@ function ImmersiveXRViewLayers({ enabled }) {
29
29
  return null;
30
30
  }
31
31
  export function viewerCameraClipping(immersiveXR) {
32
- return immersiveXR ? { far: 10_000, near: 0.001 } : { far: 1000, near: 0.1 };
32
+ return immersiveXR ? { far: 10_000, near: 0.001 } : { far: 1000, near: 0.3 };
33
33
  }
34
34
  export function applyViewerCameraClipping(camera, immersiveXR) {
35
35
  const clipping = viewerCameraClipping(immersiveXR);
@@ -37,6 +37,16 @@ export function applyViewerCameraClipping(camera, immersiveXR) {
37
37
  camera.near = clipping.near;
38
38
  camera.updateProjectionMatrix();
39
39
  }
40
+ export function applyWalkthroughCameraClipping(camera) {
41
+ const previousNear = camera.near;
42
+ // The eye can approach a wall to the capsule's 0.25 m radius.
43
+ camera.near = Math.min(previousNear, 0.1);
44
+ camera.updateProjectionMatrix();
45
+ return () => {
46
+ camera.near = previousNear;
47
+ camera.updateProjectionMatrix();
48
+ };
49
+ }
40
50
  export function viewerUsesPerspectiveCamera(cameraMode, immersiveXR) {
41
51
  return immersiveXR || cameraMode === 'perspective';
42
52
  }
@@ -1 +1 @@
1
- {"version":3,"file":"viewer-presentations.d.ts","sourceRoot":"","sources":["../../../src/components/viewer/viewer-presentations.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,aAAa,EAAY,MAAM,kBAAkB,CAAA;AAE7E,OAAO,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAG9C,MAAM,MAAM,+BAA+B,GAAG;IAC5C,kFAAkF;IAClF,WAAW,EAAE,MAAM,OAAO,CAAA;IAC1B,6DAA6D;IAC7D,OAAO,EAAE,CAAC,QAAQ,EAAE,OAAO,KA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AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAK3C,QAAA,MAAM,WAAW,GAAI,MAAM,MAAM,KAAG,UAAU,CAAC,OAAO,OAAO,CAO5D,CAAA;AAED,OAAO,EAAE,WAAW,EAAE,CAAA"}
1
+ {"version":3,"file":"use-gltf-ktx2.d.ts","sourceRoot":"","sources":["../../src/hooks/use-gltf-ktx2.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAM3C,QAAA,MAAM,WAAW,SAAU,MAAM,KAAG,UAAU,CAAC,OAAO,OAAO,CAQ5D,CAAA;AAED,OAAO,EAAE,WAAW,EAAE,CAAA"}
@@ -1,10 +1,12 @@
1
1
  import { useGLTF } from '@react-three/drei';
2
2
  import { useThree } from '@react-three/fiber';
3
3
  import { MeshoptDecoder } from 'three/examples/jsm/libs/meshopt_decoder.module.js';
4
+ import { preserveGltfUnlit } from '../lib/gltf-unlit';
4
5
  import { configureKtx2Support } from '../lib/ktx2-loader';
5
6
  const useGLTFKTX2 = (path) => {
6
7
  const gl = useThree((state) => state.gl);
7
8
  return useGLTF(path, true, true, (loader) => {
9
+ loader.register(preserveGltfUnlit);
8
10
  configureKtx2Support(loader, gl);
9
11
  loader.setMeshoptDecoder(MeshoptDecoder);
10
12
  });
@@ -1 +1 @@
1
- {"version":3,"file":"use-node-events.d.ts","sourceRoot":"","sources":["../../src/hooks/use-node-events.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,WAAW,EAIjB,MAAM,kBAAkB,CAAA;AACzB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAQpD,KAAK,UAAU,CAAC,CAAC,SAAS,WAAW,IAAI,OAAO,CAAC,OAAO,EAAE;IAAE,IAAI,EAAE,CAAC,CAAA;CAAE,CAAC,CAAA;AAEtE,wBAAgB,aAAa,CAAC,CAAC,SAAS,WAAW,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC;uBAyC1D,UAAU,CAAC,YAAY,CAAC;qBAK1B,UAAU,CAAC,YAAY,CAAC;kBAQ3B,UAAU,CAAC,YAAY,CAAC;wBAIlB,UAAU,CAAC,YAAY,CAAC;wBAIxB,UAAU,CAAC,YAAY,CAAC;uBAIzB,UAAU,CAAC,YAAY,CAAC;uBAIxB,UAAU,CAAC,YAAY,CAAC;uBAIxB,UAAU,CAAC,YAAY,CAAC;EAK9C"}
1
+ {"version":3,"file":"use-node-events.d.ts","sourceRoot":"","sources":["../../src/hooks/use-node-events.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,WAAW,EAIjB,MAAM,kBAAkB,CAAA;AACzB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAQpD,KAAK,UAAU,CAAC,CAAC,SAAS,WAAW,IAAI,OAAO,CAAC,OAAO,EAAE;IAAE,IAAI,EAAE,CAAC,CAAA;CAAE,CAAC,CAAA;AAEtE,wBAAgB,aAAa,CAAC,CAAC,SAAS,WAAW,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC;IAyC7E,aAAa,MAAM,UAAU,CAAC,YAAY,CAAC;IAK3C,WAAW,MAAM,UAAU,CAAC,YAAY,CAAC;IAQzC,OAAO,OAAO,UAAU,CAAC,YAAY,CAAC;IAItC,cAAc,MAAM,UAAU,CAAC,YAAY,CAAC;IAI5C,cAAc,MAAM,UAAU,CAAC,YAAY,CAAC;IAI5C,aAAa,MAAM,UAAU,CAAC,YAAY,CAAC;IAI3C,aAAa,MAAM,UAAU,CAAC,YAAY,CAAC;IAI3C,aAAa,MAAM,UAAU,CAAC,YAAY,CAAC;EAK9C"}
package/dist/index.d.ts CHANGED
@@ -1,64 +1,83 @@
1
1
  export type { SurfaceRole } from '@pascal-app/core';
2
2
  export { ErrorBoundary } from './components/error-boundary';
3
3
  export { NodeRenderer } from './components/renderers/node-renderer';
4
- export { default as Viewer, type ViewerHandle, type ViewerImmersiveSession, } from './components/viewer';
4
+ export { default as Viewer, pendingSceneBuildCount, type ViewerHandle, type ViewerImmersiveSession, } from './components/viewer';
5
5
  export { type BVHEcctrlApi, default as BVHEcctrl, type MovementInput, } from './components/viewer/bvh-ecctrl';
6
6
  export { buildGlbInteractiveItems, GlbInteractive, type GlbInteractiveItem, } from './components/viewer/glb-interactive';
7
7
  export { buildGlbReferenceNodes, buildGlbReplaceNodes, } from './components/viewer/glb-reference-nodes';
8
- export { type GlbHover, type GlbIdentity, type GlbLevel, GlbScene, type GlbWalkthrough, } from './components/viewer/glb-scene';
8
+ export { type GlbPickEvent, GlbScene, type GlbWalkthrough, resolveGlbPick, } from './components/viewer/glb-scene';
9
9
  export { CROUCH_CAPSULE, CROUCH_EYE_OFFSET, CROUCH_FLOAT_HEIGHT, CROUCH_RUN_SPEED, CROUCH_WALK_SPEED, EYE_LERP_SPEED, GlbWalkthroughController, STAND_CAPSULE, STAND_CLEARANCE, STAND_FLOAT_HEIGHT, WALKTHROUGH_FOV, } from './components/viewer/glb-walkthrough-controller';
10
10
  export type { HoverStyle, HoverStyles } from './components/viewer/post-processing';
11
11
  export { DEFAULT_HOVER_STYLES, SSGI_PARAMS, } from './components/viewer/post-processing';
12
12
  export { SceneAtmosphere, type SceneAtmosphereSource, useSceneAtmosphere, } from './components/viewer/scene-atmosphere';
13
13
  export { SceneEnvironment } from './components/viewer/scene-environment';
14
- export { SceneGroundReplacement, useSceneGroundReplacement, } from './components/viewer/scene-ground-replacement';
14
+ export { claimSceneGround, SceneGroundReplacement, useSceneGroundReplacement, } from './components/viewer/scene-ground-replacement';
15
+ export { applyWalkthroughCameraClipping } from './components/viewer/viewer-camera';
15
16
  export { isViewerPresentationTextureBorrowed, markViewerPresentationTextureBorrowed, registerViewerPresentation, type ViewerPresentationConfiguration, type ViewerPresentationContribution, type ViewerPresentationExportContext, type ViewerPresentationStaticExport, ViewerPresentations, viewerPresentationRegistry, } from './components/viewer/viewer-presentations';
16
17
  export { useAssetUrl } from './hooks/use-asset-url';
17
18
  export { useGLTFKTX2 } from './hooks/use-gltf-ktx2';
18
19
  export { useLibraryMaterialsVersion } from './hooks/use-library-materials-version';
19
20
  export { useNodeEvents } from './hooks/use-node-events';
20
21
  export { ASSETS_CDN_URL, resolveAssetUrl, resolveCdnUrl } from './lib/asset-url';
21
- export { backdropGradient, deepSkyColor, horizonHazeColor } from './lib/backdrop';
22
+ export { backdropColors, backdropGradient, deepSkyColor, horizonHazeColor } from './lib/backdrop';
22
23
  export { applyWorldScaleBoxUVs } from './lib/box-uv';
23
24
  export { ADDITION, Brush, computeGeometryBoundsTree, csgEvaluator, csgGeometry, csgMaterials, Evaluator, ensureRenderableGeometryAttributes, INTERSECTION, prepareBrushForCSG, SUBTRACTION, } from './lib/csg-utils';
25
+ export type { DisplayState } from './lib/display-state';
24
26
  export { disposeObject3DResources } from './lib/dispose-object3d';
25
27
  export type { EdgeMode } from './lib/edge-style';
28
+ export { BLOCK_MASONRY, concreteMaterial, type Masonry, masonryMaterial, STRUCTURE_COLORS, } from './lib/foundation-materials';
29
+ export { preserveGltfUnlit } from './lib/gltf-unlit';
26
30
  export { PERF_OVERLAY_ENABLED } from './lib/gpu-perf';
31
+ export { groundWindowBoxNow, groundWindowContains, groundWindowEnabledNode, groundWindowMaskNode, inGroundWindowNode, setGroundWindow, temporarilyGroundWindowForCapture, } from './lib/ground-window';
27
32
  export { computeHeroFraming, DEFAULT_FRAMING_EXCLUDED_TYPES, type HeroFraming, heroCameraPose, temporarilyHideNodeTypes, unionRegisteredNodeBounds, } from './lib/hero-pose';
28
33
  export { applyIsolation, clearIsolation, collectIsolationSubtree, isIsolationActive, refreshIsolation, } from './lib/isolation';
29
- export { configureKtx2Support, ensureKtx2Support } from './lib/ktx2-loader';
34
+ export { setKeyLightDirectionOverride } from './lib/key-light-override';
35
+ export { configureKtx2Support, ensureKtx2Support, ktx2TextureLoadState } from './lib/ktx2-loader';
30
36
  export { LayerPassIndex } from './lib/layer-pass';
31
37
  export { BATCHED_LAYER, GRID_LAYER, OVERLAY_LAYER, SCENE_LAYER, SHADOW_ONLY_LAYER, setSurfaceRaycastLayers, ZONE_LAYER, } from './lib/layers';
32
- export { applyMaterialPresetToMaterials, BLUEPRINT_PALETTE, baseMaterial, CLAY_PALETTE, type ColorPreset, clearMaterialCache, createDefaultMaterial, createMaterial, createMaterialFromPresetRef, createSurfaceRoleMaterial, DEFAULT_CEILING_MATERIAL, DEFAULT_DOOR_MATERIAL, DEFAULT_ROOF_MATERIAL, DEFAULT_SHELF_MATERIAL, DEFAULT_SLAB_MATERIAL, DEFAULT_STAIR_MATERIAL, DEFAULT_WALL_MATERIAL, DEFAULT_WINDOW_MATERIAL, disposeMaterial, glassMaterial, MONO_PALETTE, PRESET_PALETTES, type RenderShading, registerMaterialCacheCleanup, resolveMaterialRef, resolveSlotDefaultMaterial, resolveSurfaceColor, WHITE_PALETTE, } from './lib/materials';
38
+ export { holdLiveFrame } from './lib/live-frame-hold';
39
+ export { applyMaterialPresetToMaterials, BLUEPRINT_PALETTE, baseMaterial, CLAY_PALETTE, type ColorPreset, clearMaterialCache, createDefaultMaterial, createMaterial, createMaterialFromPreset, createMaterialFromPresetRef, createSurfaceRoleMaterial, DEFAULT_CEILING_MATERIAL, DEFAULT_DOOR_MATERIAL, DEFAULT_ROOF_MATERIAL, DEFAULT_SHELF_MATERIAL, DEFAULT_SLAB_MATERIAL, DEFAULT_STAIR_MATERIAL, DEFAULT_WALL_MATERIAL, DEFAULT_WINDOW_MATERIAL, disposeMaterial, getMaterialTextureVersion, glassMaterial, MONO_PALETTE, materialCastsShadow, materialTextureLoadState, PRESET_PALETTES, type RenderShading, registerMaterialCacheCleanup, resolveMaterialRef, resolveSlotDefaultMaterial, resolveSurfaceColor, setSlotDefaultOverrides, WHITE_PALETTE, } from './lib/materials';
33
40
  export { mergedOutline } from './lib/merged-outline-node';
41
+ export { createNodeTopSurfaceHeightSampler } from './lib/node-top-surface-height';
34
42
  export * from './lib/perf-actions';
35
43
  export { type PerfBatchStats, publishPerfBatchStats } from './lib/perf-panel-store';
36
44
  export * from './lib/perf-tracks';
37
- export { markPureRaycast } from './lib/pointer-events';
45
+ export { hasMaterialsForGroups, markPureRaycast, type ViewerBreadcrumb, type ViewerBreadcrumbHandler, } from './lib/pointer-events';
46
+ export { cloneWithProceduralEmission, decorateProceduralEmission, proceduralSlotMeshes, setProceduralEmission, } from './lib/procedural-emission';
38
47
  export { detectRendererCapability, initializeGpuRenderer, type RendererBackendParameters, type RendererCapability, type RendererCapabilityCanvas, type RendererInitializationResult, type RendererPowerPreference, } from './lib/renderer-capability';
48
+ export { commitEditCandidates, commitRevealCandidates } from './lib/reveal-candidates';
49
+ export { ANIMATION_SPEEDS, type AnimationSpeed, DEFAULT_ANIMATION_SPEED, FRAMING_PACE, LAZY_REVEAL_BASE_TIMING, LAZY_REVEAL_TIMING, type LazyRevealTiming, lazyTimingAt, normalizeAnimationSpeed, type PlannedReveal, pacedLazyTiming, planLazyReveal, type RevealCandidate, retractTimingAt, revealTimingAt, } from './lib/reveal-schedule';
50
+ export { planRevealWindows, type RevealWindow } from './lib/reveal-windows';
51
+ export { createSceneSupportHeightSampler } from './lib/scene-support-height';
39
52
  export { getSceneTheme, SCENE_THEME_IDS, SCENE_THEMES, type SceneTheme, } from './lib/scene-themes';
40
- export { type HiddenReason, hideFromScene, showInScene, temporarilyShowShadowOnly, } from './lib/scene-visibility';
41
- export { createSnapshotPipeline, SNAPSHOT_MAX_EDGE, SNAPSHOT_MIME, SNAPSHOT_QUALITY, type SnapshotCaptureMode, type SnapshotCaptureResult, type SnapshotCropRegion, type SnapshotPipeline, type SnapshotSize, THUMBNAIL_HEIGHT, THUMBNAIL_WIDTH, } from './lib/snapshot-pipeline';
53
+ export { type HiddenReason, hideFromScene, showInScene, temporarilyShowPresentation, temporarilyShowShadowOnly, } from './lib/scene-visibility';
54
+ export { SCRIPTED_MODEL_FLAG } from './lib/scripted-opening';
55
+ export { SITE_FOUNDATION, SITE_GROUND, type SiteGroundRole, siteFoundation, siteGround, siteSurfaces, temporarilyVeilGround, } from './lib/site-surfaces';
56
+ export { createPlainSnapshotPipeline, createSnapshotPipeline, SNAPSHOT_MAX_EDGE, SNAPSHOT_MIME, SNAPSHOT_QUALITY, type SnapshotCaptureMode, type SnapshotCaptureResult, type SnapshotCropRegion, type SnapshotPipeline, type SnapshotSize, type StudioBackdrop, THUMBNAIL_HEIGHT, THUMBNAIL_WIDTH, } from './lib/snapshot-pipeline';
42
57
  export { buildTerrainPerimeterFillGeometry, type TerrainPerimeterPoint, } from './lib/terrain-perimeter-fill';
43
58
  export { getPascalTextureRef, type PascalTextureColorSpace, type PascalTextureMap, type PascalTextureRef, stampPascalTextureRef, textureMapForSlot, } from './lib/texture-reference';
44
59
  export { packNormalToRGB, unpackRGBToNormal } from './lib/tsl-compat';
45
- export { useItemLightPool } from './store/use-item-light-pool';
46
- export { applyCountryUnitDefault, default as useViewer, type MetricNotation, type WallMode, } from './store/use-viewer';
47
- export { CeilingSystem } from './systems/ceiling/ceiling-system';
60
+ export { AMBIANCE_SECONDS, ambianceNow, ambianceTarget, easeAmbiance, eyeUnderTheGround, FADE_SECONDS, groundHoleOpenNode, groundHoleOpenNow, stepAmbianceProgress, temporarilyWithoutAmbiance, UNDERGROUND_RIM, UNDERGROUND_RING, undergroundAmbianceNode, } from './lib/underground-ambiance';
61
+ export { createZoneShape, createZoneWallGeometry } from './lib/zone-geometry';
62
+ export type { LightSource } from './store/use-item-light-pool';
63
+ export { catalogLightSource, useItemLightPool } from './store/use-item-light-pool';
64
+ export { anyGroundVeiled, applyCountryUnitDefault, DEFAULT_UNDERGROUND_LOOK, default as useViewer, type GroundMode, groundVeiled, type MetricNotation, siteGroundShown, type UndergroundEdge, type UndergroundLook, type UndergroundTransition, type WallMode, } from './store/use-viewer';
65
+ export { CEILING_REGION_MESH, type CeilingRegionMaterial, CeilingSystem, } from './systems/ceiling/ceiling-system';
48
66
  export { createColumnBoxGeometry, createColumnCylinderGeometry, createColumnSphereGeometry, createColumnTorusGeometry, } from './systems/column/column-geometry';
67
+ export { ConstructionReveal, type ConstructionRevealDriver, type ConstructionRevealLevel, type ConstructionRevealOptions, emitRevealPuff, getRetractTurn, getRevealPlanSpeed, getRevealPlanState, getRevealTurn, isNodeRevealing, isRevealAssembling, type RetractResult, type RevealCompleteEvent, type RevealEvent, type RevealFinaleEvent, type RevealGroupEvent, type RevealNodeStartEvent, type RevealPhaseEvent, type RevealPlanState, type RevealPreroll, type RevealRetractEvent, retractNodes, revealChangedNodeIds, revealClockMs, revealMotionOff, seatLiftedNow, setRevealPreroll, startConstructionReveal, subscribeRevealAssembling, subscribeRevealEvents, subscribeRevealPhases, subscribeRevealTicks, useRevealPending, useRevealPlanActive, useRevealWaiting, } from './systems/construction-reveal/construction-reveal';
49
68
  export { DoorAnimationSystem } from './systems/door/door-animation-system';
50
69
  export { buildDoorPreviewMesh, DoorSystem, poseDoorMovingParts } from './systems/door/door-system';
51
70
  export { ElevatorInteractionSystem } from './systems/elevator/elevator-interaction-system';
52
- export { FenceSystem, generateFenceGeometry, generateFenceSlotGeometries, } from './systems/fence/fence-system';
53
71
  export { FloorElevationSystem } from './systems/floor-elevation/floor-elevation-system';
54
72
  export { GuideSystem } from './systems/guide/guide-system';
55
73
  export { InteractiveSystem } from './systems/interactive/interactive-system';
74
+ export { type ScriptedClipActions, ScriptedClips, useClipActions, } from './systems/interactive/scripted-clips';
56
75
  export { ItemSystem } from './systems/item/item-system';
57
76
  export { ItemLightSystem } from './systems/item-light/item-light-system';
58
77
  export { LevelSystem } from './systems/level/level-system';
59
- export { EXPLODED_GAP, getLevelPresentationY, snapLevelsToTruePositions, } from './systems/level/level-utils';
60
- export { getRoofMaterialArray } from './systems/roof/roof-materials';
61
- export { clipGeometryBySegmentTrim, generateRoofSegmentGeometry, getRoofOuterSurfaceFrameAtPoint, getRoofSegmentBrushes, mapRoofGroupMaterialIndex, ROOF_MATERIAL_SLOT_COUNT, RoofSystem, remapRoofShellFaces, roofCsgDummyMats, type SurfaceFrame, } from './systems/roof/roof-system';
78
+ export { EXPLODED_GAP, getLevelPresentationY, presentLevelsForCapture, snapLevelsToTruePositions, } from './systems/level/level-utils';
79
+ export { getRoofMaterialArray, levelWallCladdingRef } from './systems/roof/roof-materials';
80
+ export { clipDirectRoofGeometryAgainstSiblings, clipGeometryBySegmentTrim, generateRoofSegmentGeometry, getPendingRoofMergeCount, getRoofOuterSurfaceFrameAtPoint, getRoofSegmentBrushes, mapRoofGroupMaterialIndex, ROOF_MATERIAL_SLOT_COUNT, type RoofGeometryAdapter, RoofSystem, remapRoofShellFaces, roofCsgDummyMats, type SurfaceFrame, } from './systems/roof/roof-system';
62
81
  export { ScanSystem } from './systems/scan/scan-system';
63
82
  export { generateSlabGeometry } from './systems/slab/slab-system';
64
83
  export { getStairBodyMaterials, getStairRailingMaterial, getStraightStairSegmentBodyMaterials, type StairBodyMaterials, } from './systems/stair/stair-materials';
@@ -66,6 +85,7 @@ export { StairSystem } from './systems/stair/stair-system';
66
85
  export { buildOpeningCutoutGeometry, buildOpeningCutoutShape, getOpeningCutoutBottomPadding, hasFlatOpeningCutoutBottom, } from './systems/wall/opening-cutout-geometry';
67
86
  export { getWallHideState, WallCutout } from './systems/wall/wall-cutout';
68
87
  export { WallCutoutCache, type WallCutoutViewerState, type WallCutoutViewerStore, } from './systems/wall/wall-cutout-cache';
88
+ export { getWallFaceBaseAt, getWallFinishData, getWallFinishRefs, type WallFinishGeometryData, } from './systems/wall/wall-finish-data';
69
89
  export { getMaterialsForWall, getVisibleWallMaterials, type WallMaterialOverride, type WallMaterials, type WallMaterialsResolver, } from './systems/wall/wall-materials';
70
90
  export { drainRebuiltWalls, generateExtrudedWall, getPendingWallRebuildCount, isWallInitialBuildActive, runWallBuildFrame, type WallGeometryAdapter, type WallGeometryAdapterContext, WallSystem, } from './systems/wall/wall-system';
71
91
  export { poseWindowMovingParts, WindowAnimationSystem, } from './systems/window/window-animation-system';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,YAAY,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAO3D,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAA;AACnE,OAAO,EACL,OAAO,IAAI,MAAM,EACjB,KAAK,YAAY,EACjB,KAAK,sBAAsB,GAC5B,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACL,KAAK,YAAY,EACjB,OAAO,IAAI,SAAS,EACpB,KAAK,aAAa,GACnB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EACL,wBAAwB,EACxB,cAAc,EACd,KAAK,kBAAkB,GACxB,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EACL,sBAAsB,EACtB,oBAAoB,GACrB,MAAM,yCAAyC,CAAA;AAChD,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,QAAQ,EACb,QAAQ,EACR,KAAK,cAAc,GACpB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,wBAAwB,EACxB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,eAAe,GAChB,MAAM,gDAAgD,CAAA;AACvD,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAA;AAClF,OAAO,EACL,oBAAoB,EACpB,WAAW,GACZ,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EACL,eAAe,EACf,KAAK,qBAAqB,EAC1B,kBAAkB,GACnB,MAAM,sCAAsC,CAAA;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAA;AACxE,OAAO,EACL,sBAAsB,EACtB,yB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AAgB,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;AACzE,OAAO,EACL,eAAe,EACf,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,GAC3B,MAAM,kCAAkC,CAAA;AACzC,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,KAAK,sBAAsB,GAC5B,MAAM,iCAAiC,CAAA;AACxC,OAAO,EACL,mBAAmB,EACnB,uBAAuB,EACvB,KAAK,oBAAoB,EACzB,KAAK,aAAa,EAClB,KAAK,qBAAqB,GAC3B,MAAM,+BAA+B,CAAA;AAKtC,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,0BAA0B,EAC1B,wBAAwB,EACxB,iBAAiB,EACjB,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,EAC/B,UAAU,GACX,MAAM,4BAA4B,CAAA;AACnC,OAAO,EACL,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,0CAA0C,CAAA;AACjD,OAAO,EAAE,sBAAsB,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAA;AACrF,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;AACvD,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAA"}
package/dist/index.js CHANGED
@@ -10,59 +10,72 @@ export { ErrorBoundary } from './components/error-boundary';
10
10
  // `@pascal-app/nodes/<kind>/renderer.tsx` and are loaded by the registry
11
11
  // — no per-kind re-exports needed.
12
12
  export { NodeRenderer } from './components/renderers/node-renderer';
13
- export { default as Viewer, } from './components/viewer';
13
+ export { default as Viewer, pendingSceneBuildCount, } from './components/viewer';
14
14
  export { default as BVHEcctrl, } from './components/viewer/bvh-ecctrl';
15
15
  export { buildGlbInteractiveItems, GlbInteractive, } from './components/viewer/glb-interactive';
16
16
  export { buildGlbReferenceNodes, buildGlbReplaceNodes, } from './components/viewer/glb-reference-nodes';
17
- export { GlbScene, } from './components/viewer/glb-scene';
17
+ export { GlbScene, resolveGlbPick, } from './components/viewer/glb-scene';
18
18
  export { CROUCH_CAPSULE, CROUCH_EYE_OFFSET, CROUCH_FLOAT_HEIGHT, CROUCH_RUN_SPEED, CROUCH_WALK_SPEED, EYE_LERP_SPEED, GlbWalkthroughController, STAND_CAPSULE, STAND_CLEARANCE, STAND_FLOAT_HEIGHT, WALKTHROUGH_FOV, } from './components/viewer/glb-walkthrough-controller';
19
19
  export { DEFAULT_HOVER_STYLES, SSGI_PARAMS, } from './components/viewer/post-processing';
20
20
  export { SceneAtmosphere, useSceneAtmosphere, } from './components/viewer/scene-atmosphere';
21
21
  export { SceneEnvironment } from './components/viewer/scene-environment';
22
- export { SceneGroundReplacement, useSceneGroundReplacement, } from './components/viewer/scene-ground-replacement';
22
+ export { claimSceneGround, SceneGroundReplacement, useSceneGroundReplacement, } from './components/viewer/scene-ground-replacement';
23
+ export { applyWalkthroughCameraClipping } from './components/viewer/viewer-camera';
23
24
  export { isViewerPresentationTextureBorrowed, markViewerPresentationTextureBorrowed, registerViewerPresentation, ViewerPresentations, viewerPresentationRegistry, } from './components/viewer/viewer-presentations';
24
25
  export { useAssetUrl } from './hooks/use-asset-url';
25
26
  export { useGLTFKTX2 } from './hooks/use-gltf-ktx2';
26
27
  export { useLibraryMaterialsVersion } from './hooks/use-library-materials-version';
27
28
  export { useNodeEvents } from './hooks/use-node-events';
28
29
  export { ASSETS_CDN_URL, resolveAssetUrl, resolveCdnUrl } from './lib/asset-url';
29
- export { backdropGradient, deepSkyColor, horizonHazeColor } from './lib/backdrop';
30
+ export { backdropColors, backdropGradient, deepSkyColor, horizonHazeColor } from './lib/backdrop';
30
31
  export { applyWorldScaleBoxUVs } from './lib/box-uv';
31
32
  // CSG primitives — used by chimney's roof-trim and other kinds whose
32
33
  // geometry subtracts pieces against their host. Lives in viewer
33
34
  // because three-bvh-csg / three-mesh-bvh are viewer-only deps.
34
35
  export { ADDITION, Brush, computeGeometryBoundsTree, csgEvaluator, csgGeometry, csgMaterials, Evaluator, ensureRenderableGeometryAttributes, INTERSECTION, prepareBrushForCSG, SUBTRACTION, } from './lib/csg-utils';
35
36
  export { disposeObject3DResources } from './lib/dispose-object3d';
37
+ export { BLOCK_MASONRY, concreteMaterial, masonryMaterial, STRUCTURE_COLORS, } from './lib/foundation-materials';
38
+ export { preserveGltfUnlit } from './lib/gltf-unlit';
36
39
  export { PERF_OVERLAY_ENABLED } from './lib/gpu-perf';
40
+ export { groundWindowBoxNow, groundWindowContains, groundWindowEnabledNode, groundWindowMaskNode, inGroundWindowNode, setGroundWindow, temporarilyGroundWindowForCapture, } from './lib/ground-window';
37
41
  export { computeHeroFraming, DEFAULT_FRAMING_EXCLUDED_TYPES, heroCameraPose, temporarilyHideNodeTypes, unionRegisteredNodeBounds, } from './lib/hero-pose';
38
42
  export { applyIsolation, clearIsolation, collectIsolationSubtree, isIsolationActive, refreshIsolation, } from './lib/isolation';
39
- export { configureKtx2Support, ensureKtx2Support } from './lib/ktx2-loader';
43
+ export { setKeyLightDirectionOverride } from './lib/key-light-override';
44
+ export { configureKtx2Support, ensureKtx2Support, ktx2TextureLoadState } from './lib/ktx2-loader';
40
45
  export { LayerPassIndex } from './lib/layer-pass';
41
46
  export { BATCHED_LAYER, GRID_LAYER, OVERLAY_LAYER, SCENE_LAYER, SHADOW_ONLY_LAYER, setSurfaceRaycastLayers, ZONE_LAYER, } from './lib/layers';
42
- export { applyMaterialPresetToMaterials, BLUEPRINT_PALETTE, baseMaterial, CLAY_PALETTE, clearMaterialCache, createDefaultMaterial, createMaterial, createMaterialFromPresetRef, createSurfaceRoleMaterial, DEFAULT_CEILING_MATERIAL, DEFAULT_DOOR_MATERIAL, DEFAULT_ROOF_MATERIAL, DEFAULT_SHELF_MATERIAL, DEFAULT_SLAB_MATERIAL, DEFAULT_STAIR_MATERIAL, DEFAULT_WALL_MATERIAL, DEFAULT_WINDOW_MATERIAL, disposeMaterial, glassMaterial, MONO_PALETTE, PRESET_PALETTES, registerMaterialCacheCleanup, resolveMaterialRef, resolveSlotDefaultMaterial, resolveSurfaceColor, WHITE_PALETTE, } from './lib/materials';
47
+ export { holdLiveFrame } from './lib/live-frame-hold';
48
+ export { applyMaterialPresetToMaterials, BLUEPRINT_PALETTE, baseMaterial, CLAY_PALETTE, clearMaterialCache, createDefaultMaterial, createMaterial, createMaterialFromPreset, createMaterialFromPresetRef, createSurfaceRoleMaterial, DEFAULT_CEILING_MATERIAL, DEFAULT_DOOR_MATERIAL, DEFAULT_ROOF_MATERIAL, DEFAULT_SHELF_MATERIAL, DEFAULT_SLAB_MATERIAL, DEFAULT_STAIR_MATERIAL, DEFAULT_WALL_MATERIAL, DEFAULT_WINDOW_MATERIAL, disposeMaterial, getMaterialTextureVersion, glassMaterial, MONO_PALETTE, materialCastsShadow, materialTextureLoadState, PRESET_PALETTES, registerMaterialCacheCleanup, resolveMaterialRef, resolveSlotDefaultMaterial, resolveSurfaceColor, setSlotDefaultOverrides, WHITE_PALETTE, } from './lib/materials';
43
49
  export { mergedOutline } from './lib/merged-outline-node';
50
+ export { createNodeTopSurfaceHeightSampler } from './lib/node-top-surface-height';
44
51
  export * from './lib/perf-actions';
45
52
  export { publishPerfBatchStats } from './lib/perf-panel-store';
46
53
  export * from './lib/perf-tracks';
47
- export { markPureRaycast } from './lib/pointer-events';
54
+ export { hasMaterialsForGroups, markPureRaycast, } from './lib/pointer-events';
55
+ export { cloneWithProceduralEmission, decorateProceduralEmission, proceduralSlotMeshes, setProceduralEmission, } from './lib/procedural-emission';
48
56
  export { detectRendererCapability, initializeGpuRenderer, } from './lib/renderer-capability';
57
+ export { commitEditCandidates, commitRevealCandidates } from './lib/reveal-candidates';
58
+ export { ANIMATION_SPEEDS, DEFAULT_ANIMATION_SPEED, FRAMING_PACE, LAZY_REVEAL_BASE_TIMING, LAZY_REVEAL_TIMING, lazyTimingAt, normalizeAnimationSpeed, pacedLazyTiming, planLazyReveal, retractTimingAt, revealTimingAt, } from './lib/reveal-schedule';
59
+ export { planRevealWindows } from './lib/reveal-windows';
60
+ export { createSceneSupportHeightSampler } from './lib/scene-support-height';
49
61
  export { getSceneTheme, SCENE_THEME_IDS, SCENE_THEMES, } from './lib/scene-themes';
50
- export { hideFromScene, showInScene, temporarilyShowShadowOnly, } from './lib/scene-visibility';
51
- export { createSnapshotPipeline, SNAPSHOT_MAX_EDGE, SNAPSHOT_MIME, SNAPSHOT_QUALITY, THUMBNAIL_HEIGHT, THUMBNAIL_WIDTH, } from './lib/snapshot-pipeline';
62
+ export { hideFromScene, showInScene, temporarilyShowPresentation, temporarilyShowShadowOnly, } from './lib/scene-visibility';
63
+ export { SCRIPTED_MODEL_FLAG } from './lib/scripted-opening';
64
+ export { SITE_FOUNDATION, SITE_GROUND, siteFoundation, siteGround, siteSurfaces, temporarilyVeilGround, } from './lib/site-surfaces';
65
+ export { createPlainSnapshotPipeline, createSnapshotPipeline, SNAPSHOT_MAX_EDGE, SNAPSHOT_MIME, SNAPSHOT_QUALITY, THUMBNAIL_HEIGHT, THUMBNAIL_WIDTH, } from './lib/snapshot-pipeline';
52
66
  export { buildTerrainPerimeterFillGeometry, } from './lib/terrain-perimeter-fill';
53
67
  export { getPascalTextureRef, stampPascalTextureRef, textureMapForSlot, } from './lib/texture-reference';
54
68
  export { packNormalToRGB, unpackRGBToNormal } from './lib/tsl-compat';
55
- export { useItemLightPool } from './store/use-item-light-pool';
56
- export { applyCountryUnitDefault, default as useViewer, } from './store/use-viewer';
57
- export { CeilingSystem } from './systems/ceiling/ceiling-system';
69
+ export { AMBIANCE_SECONDS, ambianceNow, ambianceTarget, easeAmbiance, eyeUnderTheGround, FADE_SECONDS, groundHoleOpenNode, groundHoleOpenNow, stepAmbianceProgress, temporarilyWithoutAmbiance, UNDERGROUND_RIM, UNDERGROUND_RING, undergroundAmbianceNode, } from './lib/underground-ambiance';
70
+ export { createZoneShape, createZoneWallGeometry } from './lib/zone-geometry';
71
+ export { catalogLightSource, useItemLightPool } from './store/use-item-light-pool';
72
+ export { anyGroundVeiled, applyCountryUnitDefault, DEFAULT_UNDERGROUND_LOOK, default as useViewer, groundVeiled, siteGroundShown, } from './store/use-viewer';
73
+ export { CEILING_REGION_MESH, CeilingSystem, } from './systems/ceiling/ceiling-system';
58
74
  export { createColumnBoxGeometry, createColumnCylinderGeometry, createColumnSphereGeometry, createColumnTorusGeometry, } from './systems/column/column-geometry';
75
+ export { ConstructionReveal, emitRevealPuff, getRetractTurn, getRevealPlanSpeed, getRevealPlanState, getRevealTurn, isNodeRevealing, isRevealAssembling, retractNodes, revealChangedNodeIds, revealClockMs, revealMotionOff, seatLiftedNow, setRevealPreroll, startConstructionReveal, subscribeRevealAssembling, subscribeRevealEvents, subscribeRevealPhases, subscribeRevealTicks, useRevealPending, useRevealPlanActive, useRevealWaiting, } from './systems/construction-reveal/construction-reveal';
59
76
  export { DoorAnimationSystem } from './systems/door/door-animation-system';
60
77
  export { buildDoorPreviewMesh, DoorSystem, poseDoorMovingParts } from './systems/door/door-system';
61
78
  export { ElevatorInteractionSystem } from './systems/elevator/elevator-interaction-system';
62
- // Fence system follows the wall re-export pattern — composed into the
63
- // registry-driven fence definition's `def.system`. Removed in Phase 6
64
- // alongside the legacy fence mount point.
65
- export { FenceSystem, generateFenceGeometry, generateFenceSlotGeometries, } from './systems/fence/fence-system';
66
79
  // Generic floor-elevation system. Lifts the rendered mesh of any kind
67
80
  // whose definition declares `capabilities.floorPlaced` by the slab
68
81
  // elevation under its footprint. Replaces the per-kind elevation block
@@ -70,19 +83,20 @@ export { FenceSystem, generateFenceGeometry, generateFenceSlotGeometries, } from
70
83
  export { FloorElevationSystem } from './systems/floor-elevation/floor-elevation-system';
71
84
  export { GuideSystem } from './systems/guide/guide-system';
72
85
  export { InteractiveSystem } from './systems/interactive/interactive-system';
86
+ export { ScriptedClips, useClipActions, } from './systems/interactive/scripted-clips';
73
87
  // Item systems for the registry-driven item definition. ItemSystem
74
88
  // applies attachTo-driven transforms each frame; ItemLightSystem
75
89
  // manages item-mounted light sources.
76
90
  export { ItemSystem } from './systems/item/item-system';
77
91
  export { ItemLightSystem } from './systems/item-light/item-light-system';
78
92
  export { LevelSystem } from './systems/level/level-system';
79
- export { EXPLODED_GAP, getLevelPresentationY, snapLevelsToTruePositions, } from './systems/level/level-utils';
80
- export { getRoofMaterialArray } from './systems/roof/roof-materials';
93
+ export { EXPLODED_GAP, getLevelPresentationY, presentLevelsForCapture, snapLevelsToTruePositions, } from './systems/level/level-utils';
94
+ export { getRoofMaterialArray, levelWallCladdingRef } from './systems/roof/roof-materials';
81
95
  // Generic roof-segment primitives. Kinds that compose CSG against
82
96
  // the roof shell (chimney's self-trim, dormer's virtual-segment cut)
83
97
  // read these through the public surface. No kind-specific helpers
84
98
  // belong here — those live in `@pascal-app/nodes/<kind>/`.
85
- export { clipGeometryBySegmentTrim, generateRoofSegmentGeometry, getRoofOuterSurfaceFrameAtPoint, getRoofSegmentBrushes, mapRoofGroupMaterialIndex, ROOF_MATERIAL_SLOT_COUNT, RoofSystem, remapRoofShellFaces, roofCsgDummyMats, } from './systems/roof/roof-system';
99
+ export { clipDirectRoofGeometryAgainstSiblings, clipGeometryBySegmentTrim, generateRoofSegmentGeometry, getPendingRoofMergeCount, getRoofOuterSurfaceFrameAtPoint, getRoofSegmentBrushes, mapRoofGroupMaterialIndex, ROOF_MATERIAL_SLOT_COUNT, RoofSystem, remapRoofShellFaces, roofCsgDummyMats, } from './systems/roof/roof-system';
86
100
  export { ScanSystem } from './systems/scan/scan-system';
87
101
  // Pure slab geometry generator — composed into the registry-driven slab
88
102
  // definition's `def.geometry` in `@pascal-app/nodes`.
@@ -95,6 +109,7 @@ export { StairSystem } from './systems/stair/stair-system';
95
109
  export { buildOpeningCutoutGeometry, buildOpeningCutoutShape, getOpeningCutoutBottomPadding, hasFlatOpeningCutoutBottom, } from './systems/wall/opening-cutout-geometry';
96
110
  export { getWallHideState, WallCutout } from './systems/wall/wall-cutout';
97
111
  export { WallCutoutCache, } from './systems/wall/wall-cutout-cache';
112
+ export { getWallFaceBaseAt, getWallFinishData, getWallFinishRefs, } from './systems/wall/wall-finish-data';
98
113
  export { getMaterialsForWall, getVisibleWallMaterials, } from './systems/wall/wall-materials';
99
114
  // Wall internals re-exported so `@pascal-app/nodes`' registry-driven wall
100
115
  // definition can compose them into `def.system` without duplicating the
@@ -1 +1 @@
1
- {"version":3,"file":"asset-url.d.ts","sourceRoot":"","sources":["../../src/lib/asset-url.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,QAAwE,CAAA;AAEnG;;;;;;GAMG;AACH,wBAAsB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAgB5F;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAiB3E"}
1
+ {"version":3,"file":"asset-url.d.ts","sourceRoot":"","sources":["../../src/lib/asset-url.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,QAAwE,CAAA;AAEnG;;;;;;GAMG;AACH,wBAAsB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAkB5F;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAoB3E"}
@@ -1,4 +1,4 @@
1
- import { loadAssetUrl } from '@pascal-app/core';
1
+ import { loadAssetUrl, resolveArtifactUrl } from '@pascal-app/core';
2
2
  export const ASSETS_CDN_URL = process.env.NEXT_PUBLIC_ASSETS_CDN_URL || 'https://editor.pascal.app';
3
3
  /**
4
4
  * Resolves an asset URL to the appropriate format:
@@ -10,6 +10,8 @@ export const ASSETS_CDN_URL = process.env.NEXT_PUBLIC_ASSETS_CDN_URL || 'https:/
10
10
  export async function resolveAssetUrl(url) {
11
11
  if (!url)
12
12
  return null;
13
+ if (url.startsWith('artifact://'))
14
+ return resolveArtifactUrl(url);
13
15
  // External URL - use as-is
14
16
  if (url.startsWith('http://') || url.startsWith('https://')) {
15
17
  return url;
@@ -29,6 +31,10 @@ export async function resolveAssetUrl(url) {
29
31
  export function resolveCdnUrl(url) {
30
32
  if (!url)
31
33
  return null;
34
+ if (url.startsWith('artifact://'))
35
+ return resolveArtifactUrl(url);
36
+ if (url.startsWith('blob:'))
37
+ return url;
32
38
  // External URL - use as-is
33
39
  if (url.startsWith('http://') || url.startsWith('https://')) {
34
40
  return url;