@pascal-app/viewer 1.0.4 → 1.0.6

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 (183) 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 +4 -1
  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.map +1 -1
  9. package/dist/components/viewer/glb-interactive.js +1 -1
  10. package/dist/components/viewer/glb-reference-nodes.js +1 -1
  11. package/dist/components/viewer/glb-replace-instances.js +1 -1
  12. package/dist/components/viewer/glb-scene.d.ts.map +1 -1
  13. package/dist/components/viewer/glb-scene.js +2 -3
  14. package/dist/components/viewer/glb-walkthrough-controller.js +1 -1
  15. package/dist/components/viewer/index.d.ts +10 -1
  16. package/dist/components/viewer/index.d.ts.map +1 -1
  17. package/dist/components/viewer/index.js +28 -12
  18. package/dist/components/viewer/lights.d.ts.map +1 -1
  19. package/dist/components/viewer/lights.js +107 -21
  20. package/dist/components/viewer/perf-panel.d.ts.map +1 -1
  21. package/dist/components/viewer/perf-panel.js +1 -1
  22. package/dist/components/viewer/post-processing.d.ts.map +1 -1
  23. package/dist/components/viewer/post-processing.js +96 -33
  24. package/dist/components/viewer/registered-systems.js +1 -1
  25. package/dist/components/viewer/scene-bvh.d.ts.map +1 -1
  26. package/dist/components/viewer/scene-bvh.js +1 -1
  27. package/dist/components/viewer/scene-environment.d.ts.map +1 -1
  28. package/dist/components/viewer/scene-environment.js +31 -11
  29. package/dist/components/viewer/selection-manager.js +15 -7
  30. package/dist/components/viewer/underground-ambiance.d.ts +9 -0
  31. package/dist/components/viewer/underground-ambiance.d.ts.map +1 -0
  32. package/dist/components/viewer/underground-ambiance.js +105 -0
  33. package/dist/components/viewer/viewer-camera.d.ts.map +1 -1
  34. package/dist/components/viewer/viewer-camera.js +1 -1
  35. package/dist/components/viewer/viewer-presentations.d.ts.map +1 -1
  36. package/dist/hooks/use-gltf-ktx2.d.ts.map +1 -1
  37. package/dist/hooks/use-gltf-ktx2.js +2 -0
  38. package/dist/hooks/use-node-events.d.ts.map +1 -1
  39. package/dist/index.d.ts +16 -7
  40. package/dist/index.d.ts.map +1 -1
  41. package/dist/index.js +16 -7
  42. package/dist/lib/backdrop.d.ts +17 -0
  43. package/dist/lib/backdrop.d.ts.map +1 -1
  44. package/dist/lib/backdrop.js +18 -1
  45. package/dist/lib/construction-dust.d.ts +57 -0
  46. package/dist/lib/construction-dust.d.ts.map +1 -0
  47. package/dist/lib/construction-dust.js +187 -0
  48. package/dist/lib/csg-utils.js +1 -1
  49. package/dist/lib/foundation-materials.d.ts +26 -0
  50. package/dist/lib/foundation-materials.d.ts.map +1 -0
  51. package/dist/lib/foundation-materials.js +65 -0
  52. package/dist/lib/gltf-unlit.d.ts +10 -0
  53. package/dist/lib/gltf-unlit.d.ts.map +1 -0
  54. package/dist/lib/gltf-unlit.js +23 -0
  55. package/dist/lib/ground-window.d.ts +33 -0
  56. package/dist/lib/ground-window.d.ts.map +1 -0
  57. package/dist/lib/ground-window.js +114 -0
  58. package/dist/lib/hero-pose.d.ts +1 -1
  59. package/dist/lib/hero-pose.d.ts.map +1 -1
  60. package/dist/lib/ink-edges.d.ts +2 -1
  61. package/dist/lib/ink-edges.d.ts.map +1 -1
  62. package/dist/lib/ktx2-loader.d.ts +7 -0
  63. package/dist/lib/ktx2-loader.d.ts.map +1 -1
  64. package/dist/lib/ktx2-loader.js +35 -0
  65. package/dist/lib/layer-pass.d.ts.map +1 -1
  66. package/dist/lib/layers.d.ts +11 -7
  67. package/dist/lib/layers.d.ts.map +1 -1
  68. package/dist/lib/layers.js +16 -6
  69. package/dist/lib/materials.d.ts +5 -0
  70. package/dist/lib/materials.d.ts.map +1 -1
  71. package/dist/lib/materials.js +34 -4
  72. package/dist/lib/merged-outline-node.d.ts +5 -0
  73. package/dist/lib/merged-outline-node.d.ts.map +1 -1
  74. package/dist/lib/merged-outline-node.js +80 -2
  75. package/dist/lib/pointer-events.d.ts +20 -4
  76. package/dist/lib/pointer-events.d.ts.map +1 -1
  77. package/dist/lib/pointer-events.js +78 -14
  78. package/dist/lib/post-processing-resources.d.ts.map +1 -1
  79. package/dist/lib/reveal-candidates.d.ts +80 -0
  80. package/dist/lib/reveal-candidates.d.ts.map +1 -0
  81. package/dist/lib/reveal-candidates.js +524 -0
  82. package/dist/lib/reveal-ghost.d.ts +9 -0
  83. package/dist/lib/reveal-ghost.d.ts.map +1 -0
  84. package/dist/lib/reveal-ghost.js +62 -0
  85. package/dist/lib/reveal-pending.d.ts +12 -0
  86. package/dist/lib/reveal-pending.d.ts.map +1 -0
  87. package/dist/lib/reveal-pending.js +12 -0
  88. package/dist/lib/reveal-pose.d.ts +70 -0
  89. package/dist/lib/reveal-pose.d.ts.map +1 -0
  90. package/dist/lib/reveal-pose.js +248 -0
  91. package/dist/lib/reveal-schedule.d.ts +208 -0
  92. package/dist/lib/reveal-schedule.d.ts.map +1 -0
  93. package/dist/lib/reveal-schedule.js +410 -0
  94. package/dist/lib/reveal-texture-scale.d.ts +5 -0
  95. package/dist/lib/reveal-texture-scale.d.ts.map +1 -0
  96. package/dist/lib/reveal-texture-scale.js +113 -0
  97. package/dist/lib/reveal-windows.d.ts +23 -0
  98. package/dist/lib/reveal-windows.d.ts.map +1 -0
  99. package/dist/lib/reveal-windows.js +31 -0
  100. package/dist/lib/reveal-wipe.d.ts +71 -0
  101. package/dist/lib/reveal-wipe.d.ts.map +1 -0
  102. package/dist/lib/reveal-wipe.js +105 -0
  103. package/dist/lib/scene-pass-mrt.d.ts +12 -0
  104. package/dist/lib/scene-pass-mrt.d.ts.map +1 -0
  105. package/dist/lib/scene-pass-mrt.js +23 -0
  106. package/dist/lib/scene-themes.d.ts +30 -8
  107. package/dist/lib/scene-themes.d.ts.map +1 -1
  108. package/dist/lib/scene-themes.js +36 -0
  109. package/dist/lib/scene-visibility.d.ts +11 -1
  110. package/dist/lib/scene-visibility.d.ts.map +1 -1
  111. package/dist/lib/scene-visibility.js +38 -0
  112. package/dist/lib/site-surfaces.d.ts +32 -0
  113. package/dist/lib/site-surfaces.d.ts.map +1 -0
  114. package/dist/lib/site-surfaces.js +70 -0
  115. package/dist/lib/snapshot-pipeline.d.ts +2 -1
  116. package/dist/lib/snapshot-pipeline.d.ts.map +1 -1
  117. package/dist/lib/snapshot-pipeline.js +35 -15
  118. package/dist/lib/tsl-compat.d.ts +2 -2
  119. package/dist/lib/tsl-compat.d.ts.map +1 -1
  120. package/dist/lib/underground-ambiance.d.ts +168 -0
  121. package/dist/lib/underground-ambiance.d.ts.map +1 -0
  122. package/dist/lib/underground-ambiance.js +334 -0
  123. package/dist/store/use-viewer.d.ts +184 -27
  124. package/dist/store/use-viewer.d.ts.map +1 -1
  125. package/dist/store/use-viewer.js +155 -19
  126. package/dist/systems/ceiling/ceiling-system.d.ts.map +1 -1
  127. package/dist/systems/ceiling/ceiling-system.js +2 -0
  128. package/dist/systems/construction-reveal/construction-dust.d.ts +16 -0
  129. package/dist/systems/construction-reveal/construction-dust.d.ts.map +1 -0
  130. package/dist/systems/construction-reveal/construction-dust.js +92 -0
  131. package/dist/systems/construction-reveal/construction-reveal.d.ts +276 -0
  132. package/dist/systems/construction-reveal/construction-reveal.d.ts.map +1 -0
  133. package/dist/systems/construction-reveal/construction-reveal.js +2383 -0
  134. package/dist/systems/construction-reveal/dust-material.d.ts +10 -0
  135. package/dist/systems/construction-reveal/dust-material.d.ts.map +1 -0
  136. package/dist/systems/construction-reveal/dust-material.js +17 -0
  137. package/dist/systems/construction-reveal/ghost-dress.d.ts +10 -0
  138. package/dist/systems/construction-reveal/ghost-dress.d.ts.map +1 -0
  139. package/dist/systems/construction-reveal/ghost-dress.js +24 -0
  140. package/dist/systems/elevator/elevator-interaction-system.d.ts +7 -0
  141. package/dist/systems/elevator/elevator-interaction-system.d.ts.map +1 -1
  142. package/dist/systems/elevator/elevator-interaction-system.js +18 -1
  143. package/dist/systems/geometry/geometry-system.d.ts.map +1 -1
  144. package/dist/systems/interactive/control-widget.d.ts.map +1 -1
  145. package/dist/systems/interactive/interactive-system.d.ts.map +1 -1
  146. package/dist/systems/interactive/interactive-system.js +16 -6
  147. package/dist/systems/interactive/scripted-clips.js +1 -1
  148. package/dist/systems/item-light/item-light-system.js +1 -1
  149. package/dist/systems/level/level-hold.d.ts +4 -0
  150. package/dist/systems/level/level-hold.d.ts.map +1 -0
  151. package/dist/systems/level/level-hold.js +14 -0
  152. package/dist/systems/level/level-system.d.ts.map +1 -1
  153. package/dist/systems/level/level-system.js +16 -1
  154. package/dist/systems/level/level-utils.d.ts +13 -3
  155. package/dist/systems/level/level-utils.d.ts.map +1 -1
  156. package/dist/systems/level/level-utils.js +56 -8
  157. package/dist/systems/roof/__fixtures__/roof-plane-cases.d.ts +103 -0
  158. package/dist/systems/roof/__fixtures__/roof-plane-cases.d.ts.map +1 -0
  159. package/dist/systems/roof/__fixtures__/roof-plane-cases.js +317 -0
  160. package/dist/systems/roof/roof-materials.d.ts +4 -2
  161. package/dist/systems/roof/roof-materials.d.ts.map +1 -1
  162. package/dist/systems/roof/roof-materials.js +18 -24
  163. package/dist/systems/roof/roof-system.d.ts +8 -1
  164. package/dist/systems/roof/roof-system.d.ts.map +1 -1
  165. package/dist/systems/roof/roof-system.js +195 -45
  166. package/dist/systems/wall/wall-cutout-cache.d.ts +32 -3
  167. package/dist/systems/wall/wall-cutout-cache.d.ts.map +1 -1
  168. package/dist/systems/wall/wall-cutout-cache.js +95 -2
  169. package/dist/systems/wall/wall-cutout.d.ts.map +1 -1
  170. package/dist/systems/wall/wall-material-variant.d.ts.map +1 -1
  171. package/dist/systems/wall/wall-materials.d.ts.map +1 -1
  172. package/dist/systems/wall/wall-materials.js +39 -4
  173. package/dist/systems/wall/wall-placeholder-sweep.d.ts.map +1 -1
  174. package/dist/systems/wall/wall-system.d.ts +5 -0
  175. package/dist/systems/wall/wall-system.d.ts.map +1 -1
  176. package/dist/systems/wall/wall-system.js +42 -19
  177. package/dist/systems/window/corner-frame.d.ts +10 -0
  178. package/dist/systems/window/corner-frame.d.ts.map +1 -0
  179. package/dist/systems/window/corner-frame.js +17 -0
  180. package/dist/systems/window/window-system.d.ts +1 -1
  181. package/dist/systems/window/window-system.d.ts.map +1 -1
  182. package/dist/systems/window/window-system.js +31 -6
  183. package/package.json +8 -8
@@ -1,7 +1,8 @@
1
- import type { AnyNode, BaseNode, BuildingNode, LevelNode, UnitNode, ZoneNode } from '@pascal-app/core';
1
+ import type { AnyNode, BaseNode, BuildingNode, GroundBox, LevelGradeStanding, LevelNode, SitePresentation, UnitNode, ZoneNode } from '@pascal-app/core';
2
2
  import type { Object3D } from 'three';
3
3
  import type { EdgeMode } from '../lib/edge-style';
4
4
  import type { ColorPreset, RenderShading } from '../lib/materials';
5
+ import { type SceneTheme } from '../lib/scene-themes';
5
6
  export type RenderContext = 'editor' | 'viewer';
6
7
  export type MetricNotation = 'meters' | 'millimeters';
7
8
  export type WallMode = 'up' | 'cutaway' | 'down' | 'translucent';
@@ -15,6 +16,14 @@ type Outliner = {
15
16
  selectedObjects: Object3D[];
16
17
  hoveredObjects: Object3D[];
17
18
  };
19
+ type LookDefaults = {
20
+ theme: string;
21
+ edges: EdgeMode;
22
+ shadows: boolean;
23
+ };
24
+ type LocalLook = Partial<LookDefaults> & {
25
+ shadingByContext?: Partial<Record<RenderContext, RenderShading>>;
26
+ };
18
27
  type ViewerState = {
19
28
  selection: SelectionPath;
20
29
  focusedUnitId: UnitNode['id'] | null;
@@ -25,6 +34,11 @@ type ViewerState = {
25
34
  * selection paths without changing the local user's editable selection. */
26
35
  externalSelectedIds: BaseNode['id'][];
27
36
  setExternalSelectedIds: (ids: BaseNode['id'][]) => void;
37
+ /** Elements a chat context chip points at (Point and ask), drawn in the `point` outline style.
38
+ * Its own slot, so a teammate's highlight in `externalSelectedIds` is never clobbered. */
39
+ pointedIds: BaseNode['id'][];
40
+ /** `null` clears it. */
41
+ setPointedIds: (ids: BaseNode['id'][] | null) => void;
28
42
  hoverHighlightMode: string;
29
43
  setHoverHighlightMode: (mode: string) => void;
30
44
  hoveredId: AnyNode['id'] | ZoneNode['id'] | null;
@@ -32,14 +46,21 @@ type ViewerState = {
32
46
  cameraMode: 'perspective' | 'orthographic';
33
47
  setCameraMode: (mode: 'perspective' | 'orthographic') => void;
34
48
  sceneTheme: string;
35
- /** The user's own pick, and the only theme that persists. */
49
+ sceneAppearance: SceneTheme;
50
+ lookDefaults: LookDefaults;
51
+ projectPresentation?: SitePresentation;
52
+ setProjectPresentation: (presentation: SitePresentation | undefined) => void;
53
+ resetProjectLook: () => void;
54
+ previewSceneTheme: string | null;
55
+ contextDefaultShading: RenderShading;
56
+ /** The selected project/global theme before a temporary preview. */
36
57
  savedSceneTheme: string;
37
58
  setSceneTheme: (id: string) => void;
38
59
  /** Show a theme without saving it (e.g. a project's own mood); `null`
39
60
  * returns to the saved one. */
40
61
  showSceneTheme: (id: string | null) => void;
41
62
  renderContext: RenderContext;
42
- setRenderContext: (context: RenderContext) => void;
63
+ setRenderContext: (context: RenderContext, defaultShading?: RenderShading) => void;
43
64
  /** True during a GLB bake/export pass. Renderers that normally draw via a
44
65
  * collective InstancedMesh (`def.system`) and mount only an invisible per-node
45
66
  * proxy can watch this to emit real, visible geometry so the exporter — which
@@ -84,6 +105,81 @@ type ViewerState = {
84
105
  * while editing; never persisted, so the viewer app keeps its own mode.
85
106
  */
86
107
  hideLevelsAboveSelection: boolean;
108
+ /**
109
+ * The levels a construction reveal is playing on (a build, an undo, a move): each shows while its
110
+ * work plays, whatever the level display hides, so the animation is seen. Set by the reveal, never
111
+ * persisted; the author's own hiding of a level still wins.
112
+ */
113
+ levelsRevealing: readonly string[];
114
+ /**
115
+ * The nodes a construction reveal is playing now (moving in, going out, carried, or an edit
116
+ * replaying): the cutaway leaves each of them, and the openings it hosts, in view while it
117
+ * plays, whatever the wall mode. Set by the reveal, never persisted; the person's own wall mode
118
+ * is not written.
119
+ */
120
+ nodesRevealing: readonly string[];
121
+ /**
122
+ * The level shown lies below grade, the storeys above it hidden. Set by the host's level display
123
+ * beside `hideLevelsAboveSelection`; never persisted. Whether the ground over it is veiled also
124
+ * depends on `groundMode`: read both through `groundVeiled`.
125
+ */
126
+ belowGrade: boolean;
127
+ /**
128
+ * The shown level's standing against the sculpted terrain, set beside `belowGrade`:
129
+ * only partly below grade, the ground veils just where it stands in the way (the ground
130
+ * window), not wholesale.
131
+ */
132
+ gradeStanding: LevelGradeStanding;
133
+ /**
134
+ * The box the ground window opens for: the shown level, or the whole building when it is
135
+ * shown. Set by the host (never on the site phase, where the ground is the work); never
136
+ * persisted. `null` closes the window.
137
+ */
138
+ groundWindowBox: GroundBox | null;
139
+ /** Ground stands between the eye and `groundWindowBox` now, set by the site renderer. */
140
+ groundWindowVeiled: boolean;
141
+ /** The person's choice for the ground over a level below grade. Not persisted. */
142
+ groundMode: GroundMode;
143
+ setGroundMode: (mode: GroundMode) => void;
144
+ /**
145
+ * The scene has a level below grade (the below-grade footprint is not empty): set by the site
146
+ * renderer. The ground materials carry the hole's mask, and the eye's fill light is mounted,
147
+ * from the moment this is true, so that changing floors changes uniforms and never materials
148
+ * or the light count; scenes without a level below grade keep plain materials. Never persisted.
149
+ */
150
+ hasLevelBelowGrade: boolean;
151
+ /**
152
+ * The host lets the eye dive under the ground (the editor's orbit may, with the ground on Auto).
153
+ * The eye's fill light is mounted, from the moment this is true, so that the first crossing of the
154
+ * ground compiles nothing: a scene with no level below grade is dived under as well. Set by the
155
+ * host's camera; never persisted.
156
+ */
157
+ diveAvailable: boolean;
158
+ /**
159
+ * The eye lies under the ground at its own position (a free orbit under the lid). Set by the
160
+ * viewer's underground ambiance from the camera; never persisted.
161
+ */
162
+ eyeUnderGround: boolean;
163
+ /**
164
+ * Levels whose foundation a plugin is drawing under the ground right now (a framing plugin pours
165
+ * the real footing and stem from the building's record). The generic foundation derived from the
166
+ * walls is not drawn under these levels, so nothing is drawn twice. Written by that plugin while
167
+ * its meshes are mounted, empty otherwise; never persisted.
168
+ */
169
+ pluginFoundationLevelIds: readonly string[];
170
+ /**
171
+ * The world is turned, or turning, to earth (the underground ambiance's factor is above 0).
172
+ * Its factor itself eases every frame and lives with the shaders, not here; this flips only at
173
+ * the crossing's ends. Set by the viewer's underground ambiance; never persisted.
174
+ */
175
+ ambianceActive: boolean;
176
+ /**
177
+ * How the ground reads as a medium: the edge of the hole over a level below grade and the
178
+ * crossing as the eye dives under the ground. Variants the owner and the team choose from;
179
+ * every one is a uniform, so changing it compiles nothing. Never persisted.
180
+ */
181
+ undergroundLook: UndergroundLook;
182
+ setUndergroundLook: (look: Partial<UndergroundLook>) => void;
87
183
  wallMode: WallMode;
88
184
  setWallMode: (mode: WallMode) => void;
89
185
  showScans: boolean;
@@ -103,6 +199,7 @@ type ViewerState = {
103
199
  projectId: string | null;
104
200
  setProjectId: (id: string | null) => void;
105
201
  projectPreferences: Record<string, {
202
+ look?: LocalLook;
106
203
  showScans?: boolean;
107
204
  showGuides?: boolean;
108
205
  showGrid?: boolean;
@@ -140,28 +237,33 @@ type ViewerState = {
140
237
  inputDragging: boolean;
141
238
  setInputDragging: (dragging: boolean) => void;
142
239
  };
143
- declare const useViewer: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<ViewerState>, "setState" | "persist"> & {
144
- setState(partial: ViewerState | Partial<ViewerState> | ((state: ViewerState) => ViewerState | Partial<ViewerState>), replace?: false | undefined): unknown;
240
+ /** The owner's pick (16 Oct): the section cut's clean edge over earth walls, and the simple fade. */
241
+ export declare const DEFAULT_UNDERGROUND_LOOK: UndergroundLook;
242
+ declare const useViewer: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<ViewerState>, "persist" | "setState"> & {
243
+ setState(partial: Partial<ViewerState> | ViewerState | ((state: ViewerState) => Partial<ViewerState> | ViewerState), replace?: false | undefined): unknown;
145
244
  setState(state: ViewerState | ((state: ViewerState) => ViewerState), replace: true): unknown;
146
245
  persist: {
147
246
  setOptions: (options: Partial<import("zustand/middleware").PersistOptions<ViewerState, {
148
- metricNotation: MetricNotation;
149
- levelMode: "manual" | "stacked" | "exploded" | "solo";
150
- wallMode: WallMode;
151
- projectPreferences: Record<string, {
152
- showScans?: boolean;
153
- showGuides?: boolean;
154
- showGrid?: boolean;
155
- showMeasurements?: boolean;
156
- }>;
157
- unit?: "metric" | "imperial" | undefined;
158
- cameraMode: "perspective" | "orthographic";
247
+ cameraMode: "orthographic" | "perspective";
159
248
  sceneTheme: string;
160
249
  shadingByContext: Partial<Record<RenderContext, RenderShading>>;
161
250
  textures: boolean;
162
251
  colorPreset: ColorPreset;
163
252
  edges: EdgeMode;
164
253
  shadows: boolean;
254
+ unit?: "imperial" | "metric" | undefined;
255
+ metricNotation: MetricNotation;
256
+ levelMode: "exploded" | "manual" | "solo" | "stacked";
257
+ wallMode: WallMode;
258
+ projectPreferences: {
259
+ [k: string]: {
260
+ look?: LocalLook;
261
+ showScans?: boolean;
262
+ showGuides?: boolean;
263
+ showGrid?: boolean;
264
+ showMeasurements?: boolean;
265
+ };
266
+ };
165
267
  }, unknown>>) => void;
166
268
  clearStorage: () => void;
167
269
  rehydrate: () => Promise<void> | void;
@@ -169,26 +271,81 @@ declare const useViewer: import("zustand").UseBoundStore<Omit<import("zustand").
169
271
  onHydrate: (fn: (state: ViewerState) => void) => () => void;
170
272
  onFinishHydration: (fn: (state: ViewerState) => void) => () => void;
171
273
  getOptions: () => Partial<import("zustand/middleware").PersistOptions<ViewerState, {
172
- metricNotation: MetricNotation;
173
- levelMode: "manual" | "stacked" | "exploded" | "solo";
174
- wallMode: WallMode;
175
- projectPreferences: Record<string, {
176
- showScans?: boolean;
177
- showGuides?: boolean;
178
- showGrid?: boolean;
179
- showMeasurements?: boolean;
180
- }>;
181
- unit?: "metric" | "imperial" | undefined;
182
- cameraMode: "perspective" | "orthographic";
274
+ cameraMode: "orthographic" | "perspective";
183
275
  sceneTheme: string;
184
276
  shadingByContext: Partial<Record<RenderContext, RenderShading>>;
185
277
  textures: boolean;
186
278
  colorPreset: ColorPreset;
187
279
  edges: EdgeMode;
188
280
  shadows: boolean;
281
+ unit?: "imperial" | "metric" | undefined;
282
+ metricNotation: MetricNotation;
283
+ levelMode: "exploded" | "manual" | "solo" | "stacked";
284
+ wallMode: WallMode;
285
+ projectPreferences: {
286
+ [k: string]: {
287
+ look?: LocalLook;
288
+ showScans?: boolean;
289
+ showGuides?: boolean;
290
+ showGrid?: boolean;
291
+ showMeasurements?: boolean;
292
+ };
293
+ };
189
294
  }, unknown>>;
190
295
  };
191
296
  }>;
297
+ /**
298
+ * Over a level below grade the ground is `auto`: drawn as a faint veil, so the floor under it is
299
+ * seen and clicked; `solid` keeps it as it is everywhere else.
300
+ */
301
+ export type GroundMode = 'auto' | 'solid';
302
+ /**
303
+ * The hole's edge seen from above: `noise` the eroded, scalloped border (today's), `quiet` the
304
+ * same with a fine, faint noise (almost straight from the default camera), `section` an
305
+ * architect's section cut (a constant offset of the footprint, straight edges, a flat face with a
306
+ * thin line at grade), `section-earth` the same outline over the earth's walls (topsoil, strata,
307
+ * a low crumble that is zero at the rim).
308
+ */
309
+ export type UndergroundEdge = 'noise' | 'quiet' | 'section' | 'section-earth';
310
+ /** The dive under the ground: `noise` closes a noise mask over the screen, `fade` fades the whole frame at once. */
311
+ export type UndergroundTransition = 'noise' | 'fade';
312
+ export type UndergroundLook = {
313
+ edge: UndergroundEdge;
314
+ transition: UndergroundTransition;
315
+ };
316
+ /**
317
+ * Whether the site's ground is drawn as a veil wholesale: a level below grade is shown, the
318
+ * ground on auto. A level only partly below grade is the exception — there the ground window
319
+ * veils just the ground in the way, and the rest stays solid. The walkthrough walks on its
320
+ * floors: its ground is always solid, whatever level the overview had shown.
321
+ */
322
+ export declare function groundVeiled(state: {
323
+ belowGrade: boolean;
324
+ groundMode: GroundMode;
325
+ gradeStanding?: LevelGradeStanding;
326
+ walkthroughMode?: boolean;
327
+ }): boolean;
328
+ /** Whether any ground is veiled now, wholesale or through the eye's window. */
329
+ export declare function anyGroundVeiled(state: {
330
+ belowGrade: boolean;
331
+ groundMode: GroundMode;
332
+ gradeStanding?: LevelGradeStanding;
333
+ groundWindowVeiled: boolean;
334
+ walkthroughMode?: boolean;
335
+ }): boolean;
336
+ /**
337
+ * Whether the site draws its own ground. `showGround: false` says other geometry supplies the
338
+ * ground (an authored landscape), which stands on a level above a basement; while a level below
339
+ * grade is shown, the level display hides the storeys above it (`belowGrade`) and the landscape
340
+ * with them. The site's ground stands in then, with its veil, hole and pit, so the basement is
341
+ * seen through an opening and not through nothing. With a level at or above grade shown, the
342
+ * landscape is shown and `showGround` is the author's.
343
+ */
344
+ export declare function siteGroundShown(site: {
345
+ showGround?: boolean;
346
+ }, state: {
347
+ belowGrade: boolean;
348
+ }): boolean;
192
349
  /** Apply an authoritative country code (e.g. IP-derived by the host app) as
193
350
  * the unit default. Stronger signal than the timezone heuristic used at store
194
351
  * creation, but still a default: it never overrides an explicit user choice
@@ -1 +1 @@
1
- {"version":3,"file":"use-viewer.d.ts","sourceRoot":"","sources":["../../src/store/use-viewer.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,OAAO,EACP,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,QAAQ,EACR,QAAQ,EACT,MAAM,kBAAkB,CAAA;AACzB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAIrC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAGlE,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,QAAQ,CAAA;AAC/C,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,aAAa,CAAA;AAC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AMG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,GAAG,eAAe,CAAA;AAE7E,oHAAoH;AACpH,MAAM,MAAM,qBAAqB,GAAG,OAAO,GAAG,MAAM,CAAA;AAEpD,MAAM,MAAM,eAAe,GAAG;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,UAAU,EAAE,qBAAqB,CAAA;CAAE,CAAA;AAE1F;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE;IAClC,UAAU,EAAE,OAAO,CAAA;IACnB,UAAU,EAAE,UAAU,CAAA;IACtB,aAAa,CAAC,EAAE,kBAAkB,CAAA;IAClC,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,GAAG,OAAO,CAOV;AAED,+EAA+E;AAC/E,wBAAgB,eAAe,CAAC,KAAK,EAAE;IACrC,UAAU,EAAE,OAAO,CAAA;IACnB,UAAU,EAAE,UAAU,CAAA;IACtB,aAAa,CAAC,EAAE,kBAAkB,CAAA;IAClC,kBAAkB,EAAE,OAAO,CAAA;IAC3B,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,GAAG,OAAO,CAKV;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE;IAAE,UAAU,CAAC,EAAE,OAAO,CAAA;CAAE,EAC9B,KAAK,EAAE;IAAE,UAAU,EAAE,OAAO,CAAA;CAAE,GAC7B,OAAO,CAET;AAED;;;;cAIc;AACd,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,QAMzE;eAEc,SAAS"}
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import { create } from 'zustand';
3
3
  import { persist } from 'zustand/middleware';
4
- import { SCENE_THEME_IDS } from '../lib/scene-themes';
4
+ import { getSceneTheme, projectSceneTheme, SCENE_THEME_IDS, } from '../lib/scene-themes';
5
5
  const CAMERA_MODES = ['perspective', 'orthographic'];
6
6
  const RENDER_SHADINGS = ['solid', 'rendered'];
7
7
  const COLOR_PRESETS = ['clay', 'white', 'mono', 'blueprint'];
@@ -89,7 +89,24 @@ function normalizeProjectPreferences(value) {
89
89
  if (!preferences || typeof preferences !== 'object' || Array.isArray(preferences))
90
90
  continue;
91
91
  const record = preferences;
92
+ const look = record.look && typeof record.look === 'object'
93
+ ? record.look
94
+ : undefined;
92
95
  next[projectId] = {
96
+ ...(look
97
+ ? {
98
+ look: {
99
+ ...(typeof look.theme === 'string' && SCENE_THEME_IDS.includes(look.theme)
100
+ ? { theme: look.theme }
101
+ : {}),
102
+ ...(typeof look.edges === 'string' && EDGE_MODES.includes(look.edges)
103
+ ? { edges: look.edges }
104
+ : {}),
105
+ ...(typeof look.shadows === 'boolean' ? { shadows: look.shadows } : {}),
106
+ shadingByContext: normalizeShadingByContext(look.shadingByContext),
107
+ },
108
+ }
109
+ : {}),
93
110
  ...(typeof record.showScans === 'boolean' ? { showScans: record.showScans } : {}),
94
111
  ...(typeof record.showGuides === 'boolean' ? { showGuides: record.showGuides } : {}),
95
112
  ...(typeof record.showGrid === 'boolean' ? { showGrid: record.showGrid } : {}),
@@ -120,6 +137,47 @@ function normalizePersistedViewerState(value) {
120
137
  projectPreferences: normalizeProjectPreferences(state.projectPreferences),
121
138
  };
122
139
  }
140
+ /** The owner's pick (16 Oct): the section cut's clean edge over earth walls, and the simple fade. */
141
+ export const DEFAULT_UNDERGROUND_LOOK = {
142
+ edge: 'section-earth',
143
+ transition: 'fade',
144
+ };
145
+ function resolveLook(state, patch) {
146
+ const next = { ...state, ...patch };
147
+ const local = next.projectPreferences[next.projectId ?? '']?.look;
148
+ const savedTheme = local?.theme ?? next.projectPresentation?.theme ?? next.lookDefaults.theme;
149
+ const theme = getSceneTheme(next.previewSceneTheme ?? savedTheme);
150
+ return {
151
+ ...patch,
152
+ savedSceneTheme: savedTheme,
153
+ sceneTheme: theme.id,
154
+ sceneAppearance: projectSceneTheme(theme, next.previewSceneTheme === null && !local?.theme ? next.projectPresentation : undefined),
155
+ shading: local?.shadingByContext?.[next.renderContext] ??
156
+ next.projectPresentation?.shading ??
157
+ next.shadingByContext[next.renderContext] ??
158
+ next.contextDefaultShading,
159
+ edges: local?.edges ?? next.projectPresentation?.edges ?? next.lookDefaults.edges,
160
+ shadows: local?.shadows ?? next.projectPresentation?.shadows ?? next.lookDefaults.shadows,
161
+ };
162
+ }
163
+ function chooseLook(state, look) {
164
+ const key = state.projectId ?? '';
165
+ const previous = state.projectPreferences[key];
166
+ const { shadingByContext, ...defaults } = look;
167
+ return resolveLook(state, {
168
+ ...(!state.projectId
169
+ ? {
170
+ lookDefaults: { ...state.lookDefaults, ...defaults },
171
+ shadingByContext: { ...state.shadingByContext, ...shadingByContext },
172
+ }
173
+ : {}),
174
+ projectPreferences: {
175
+ ...state.projectPreferences,
176
+ [key]: { ...previous, look: { ...previous?.look, ...look } },
177
+ },
178
+ ...('theme' in look ? { previewSceneTheme: null } : {}),
179
+ });
180
+ }
123
181
  const useViewer = create()(persist((set) => ({
124
182
  selection: { buildingId: null, levelId: null, zoneId: null, selectedIds: [] },
125
183
  focusedUnitId: null,
@@ -134,6 +192,15 @@ const useViewer = create()(persist((set) => ({
134
192
  }
135
193
  return { externalSelectedIds: ids };
136
194
  }),
195
+ pointedIds: [],
196
+ setPointedIds: (ids) => set((state) => {
197
+ const next = ids ?? [];
198
+ if (state.pointedIds.length === next.length &&
199
+ state.pointedIds.every((id, index) => id === next[index])) {
200
+ return state;
201
+ }
202
+ return { pointedIds: next };
203
+ }),
137
204
  hoverHighlightMode: 'default',
138
205
  setHoverHighlightMode: (mode) => set((state) => (state.hoverHighlightMode === mode ? state : { hoverHighlightMode: mode })),
139
206
  hoveredId: null,
@@ -141,11 +208,24 @@ const useViewer = create()(persist((set) => ({
141
208
  cameraMode: 'perspective',
142
209
  setCameraMode: (mode) => set({ cameraMode: mode }),
143
210
  sceneTheme: 'studio',
211
+ sceneAppearance: getSceneTheme('studio'),
212
+ lookDefaults: { theme: 'studio', edges: 'soft', shadows: true },
213
+ projectPresentation: undefined,
214
+ setProjectPresentation: (projectPresentation) => set((state) => resolveLook(state, { projectPresentation })),
215
+ resetProjectLook: () => set((state) => {
216
+ const projectPreferences = { ...state.projectPreferences };
217
+ const key = state.projectId ?? '';
218
+ const { look: _look, ...rest } = projectPreferences[key] ?? {};
219
+ projectPreferences[key] = rest;
220
+ return resolveLook(state, { projectPreferences, previewSceneTheme: null });
221
+ }),
222
+ previewSceneTheme: null,
223
+ contextDefaultShading: 'rendered',
144
224
  savedSceneTheme: 'studio',
145
- setSceneTheme: (id) => set({ sceneTheme: id, savedSceneTheme: id }),
146
- showSceneTheme: (id) => set((state) => ({ sceneTheme: id ?? state.savedSceneTheme })),
225
+ setSceneTheme: (id) => set((state) => chooseLook(state, { theme: id })),
226
+ showSceneTheme: (id) => set((state) => resolveLook(state, { previewSceneTheme: id })),
147
227
  renderContext: 'editor',
148
- setRenderContext: (context) => set({ renderContext: context }),
228
+ setRenderContext: (context, defaultShading = 'rendered') => set((state) => resolveLook(state, { renderContext: context, contextDefaultShading: defaultShading })),
149
229
  isExporting: false,
150
230
  setExporting: (value) => set({ isExporting: value }),
151
231
  itemLoadFailures: {},
@@ -163,18 +243,20 @@ const useViewer = create()(persist((set) => ({
163
243
  setRenderPaused: (value) => set({ renderPaused: value }),
164
244
  shading: 'rendered',
165
245
  shadingByContext: {},
166
- setShading: (shading) => set((state) => ({
167
- shading,
168
- shadingByContext: { ...state.shadingByContext, [state.renderContext]: shading },
246
+ setShading: (shading) => set((state) => chooseLook(state, {
247
+ shadingByContext: {
248
+ ...state.projectPreferences[state.projectId ?? '']?.look?.shadingByContext,
249
+ [state.renderContext]: shading,
250
+ },
169
251
  })),
170
252
  textures: true,
171
253
  setTextures: (textures) => set({ textures }),
172
254
  colorPreset: 'clay',
173
255
  setColorPreset: (preset) => set({ colorPreset: preset }),
174
256
  edges: 'soft',
175
- setEdges: (edges) => set({ edges }),
257
+ setEdges: (edges) => set((state) => chooseLook(state, { edges })),
176
258
  shadows: true,
177
- setShadows: (shadows) => set({ shadows }),
259
+ setShadows: (shadows) => set((state) => chooseLook(state, { shadows })),
178
260
  unit: detectDefaultUnit(),
179
261
  metricNotation: 'meters',
180
262
  unitExplicit: false,
@@ -183,6 +265,21 @@ const useViewer = create()(persist((set) => ({
183
265
  levelMode: 'stacked',
184
266
  setLevelMode: (mode) => set({ levelMode: mode }),
185
267
  hideLevelsAboveSelection: false,
268
+ levelsRevealing: [],
269
+ nodesRevealing: [],
270
+ belowGrade: false,
271
+ gradeStanding: 'at-grade',
272
+ groundWindowBox: null,
273
+ groundWindowVeiled: false,
274
+ groundMode: 'auto',
275
+ setGroundMode: (mode) => set({ groundMode: mode }),
276
+ hasLevelBelowGrade: false,
277
+ diveAvailable: false,
278
+ eyeUnderGround: false,
279
+ pluginFoundationLevelIds: [],
280
+ ambianceActive: false,
281
+ undergroundLook: DEFAULT_UNDERGROUND_LOOK,
282
+ setUndergroundLook: (look) => set((state) => ({ undergroundLook: { ...state.undergroundLook, ...look } })),
186
283
  wallMode: 'up',
187
284
  setWallMode: (mode) => set({ wallMode: mode }),
188
285
  showScans: true,
@@ -237,16 +334,20 @@ const useViewer = create()(persist((set) => ({
237
334
  setInkOpacity: (opacity) => set({ inkOpacity: opacity }),
238
335
  projectId: null,
239
336
  setProjectId: (id) => set((state) => {
240
- if (!id)
241
- return { projectId: id };
242
- const prefs = state.projectPreferences?.[id] || {};
243
- return {
337
+ if (id === state.projectId)
338
+ return state;
339
+ const prefs = (id && state.projectPreferences?.[id]) || {};
340
+ const { '': _unscoped, ...projectPreferences } = state.projectPreferences;
341
+ return resolveLook(state, {
244
342
  projectId: id,
343
+ projectPreferences,
344
+ projectPresentation: undefined,
345
+ previewSceneTheme: null,
245
346
  showScans: prefs.showScans ?? true,
246
347
  showGuides: prefs.showGuides ?? true,
247
348
  showGrid: prefs.showGrid ?? true,
248
349
  showMeasurements: prefs.showMeasurements ?? true,
249
- };
350
+ });
250
351
  }),
251
352
  projectPreferences: {},
252
353
  setSelection: (updates) => set((state) => {
@@ -303,24 +404,59 @@ const useViewer = create()(persist((set) => ({
303
404
  return {
304
405
  ...currentState,
305
406
  ...persisted,
306
- savedSceneTheme: persisted.sceneTheme ?? currentState.savedSceneTheme,
407
+ ...resolveLook(currentState, {
408
+ ...persisted,
409
+ lookDefaults: {
410
+ theme: persisted.sceneTheme ?? currentState.lookDefaults.theme,
411
+ edges: persisted.edges ?? currentState.lookDefaults.edges,
412
+ shadows: persisted.shadows ?? currentState.lookDefaults.shadows,
413
+ },
414
+ }),
307
415
  };
308
416
  },
309
417
  partialize: (state) => ({
310
418
  cameraMode: state.cameraMode,
311
- sceneTheme: state.savedSceneTheme,
419
+ sceneTheme: state.lookDefaults.theme,
312
420
  shadingByContext: state.shadingByContext,
313
421
  textures: state.textures,
314
422
  colorPreset: state.colorPreset,
315
- edges: state.edges,
316
- shadows: state.shadows,
423
+ edges: state.lookDefaults.edges,
424
+ shadows: state.lookDefaults.shadows,
317
425
  ...(state.unitExplicit ? { unit: state.unit } : {}),
318
426
  metricNotation: state.metricNotation,
319
427
  levelMode: state.levelMode,
320
428
  wallMode: state.wallMode,
321
- projectPreferences: state.projectPreferences,
429
+ projectPreferences: Object.fromEntries(Object.entries(state.projectPreferences).filter(([key]) => key !== '')),
322
430
  }),
323
431
  }));
432
+ /**
433
+ * Whether the site's ground is drawn as a veil wholesale: a level below grade is shown, the
434
+ * ground on auto. A level only partly below grade is the exception — there the ground window
435
+ * veils just the ground in the way, and the rest stays solid. The walkthrough walks on its
436
+ * floors: its ground is always solid, whatever level the overview had shown.
437
+ */
438
+ export function groundVeiled(state) {
439
+ return (state.belowGrade &&
440
+ state.groundMode === 'auto' &&
441
+ state.gradeStanding !== 'partly-below-grade' &&
442
+ state.walkthroughMode !== true);
443
+ }
444
+ /** Whether any ground is veiled now, wholesale or through the eye's window. */
445
+ export function anyGroundVeiled(state) {
446
+ return (groundVeiled(state) ||
447
+ (state.groundMode === 'auto' && state.groundWindowVeiled && state.walkthroughMode !== true));
448
+ }
449
+ /**
450
+ * Whether the site draws its own ground. `showGround: false` says other geometry supplies the
451
+ * ground (an authored landscape), which stands on a level above a basement; while a level below
452
+ * grade is shown, the level display hides the storeys above it (`belowGrade`) and the landscape
453
+ * with them. The site's ground stands in then, with its veil, hole and pit, so the basement is
454
+ * seen through an opening and not through nothing. With a level at or above grade shown, the
455
+ * landscape is shown and `showGround` is the author's.
456
+ */
457
+ export function siteGroundShown(site, state) {
458
+ return site.showGround !== false || state.belowGrade;
459
+ }
324
460
  /** Apply an authoritative country code (e.g. IP-derived by the host app) as
325
461
  * the unit default. Stronger signal than the timezone heuristic used at store
326
462
  * creation, but still a default: it never overrides an explicit user choice
@@ -1 +1 @@
1
- {"version":3,"file":"ceiling-system.d.ts","sourceRoot":"","sources":["../../../src/systems/ceiling/ceiling-system.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,WAAW,EAChB,KAAK,kBAAkB,EAYvB,QAAQ,EACT,MAAM,kBAAkB,CAAA;AAEzB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,iFAAiF;AACjF,eAAO,MAAM,mBAAmB,mBAAmB,CAAA;AAEnD;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC,QAAQ,CAAC,KAAK,KAAK,CAAC,QAAQ,CAAA;AAE5F,KAAK,UAAU,GAAG,UAAU,CAAC,OAAO,QAAQ,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAA;AAa/D,eAAO,MAAM,aAAa,YA4BzB,CAAA;AAsCD;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,WAAW,EACjB,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,UAAU,GAAE,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAM,EAC/C,KAAK,GAAE,UAAsC,QA8C9C;AAqDD;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,WAAW,EACxB,UAAU,GAAE,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAM,GAC9C,KAAK,CAAC,cAAc,CA6DtB"}
1
+ {"version":3,"file":"ceiling-system.d.ts","sourceRoot":"","sources":["../../../src/systems/ceiling/ceiling-system.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,WAAW,EAChB,KAAK,kBAAkB,EAYvB,QAAQ,EACT,MAAM,kBAAkB,CAAA;AAEzB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,iFAAiF;AACjF,eAAO,MAAM,mBAAmB,mBAAmB,CAAA;AAEnD;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC,QAAQ,CAAC,KAAK,KAAK,CAAC,QAAQ,CAAA;AAE5F,KAAK,UAAU,GAAG,UAAU,CAAC,OAAO,QAAQ,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAA;AAa/D,eAAO,MAAM,aAAa,YA4BzB,CAAA;AAsCD;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,WAAW,EACjB,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,UAAU,GAAE,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAM,EAC/C,KAAK,GAAE,UAAsC,QA8C9C;AAuDD;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,WAAW,EACxB,UAAU,GAAE,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAM,GAC9C,KAAK,CAAC,cAAc,CA6DtB"}
@@ -127,6 +127,8 @@ function syncCeilingRegionMeshes(mesh, cells) {
127
127
  if (!region) {
128
128
  region = new THREE.Mesh();
129
129
  region.name = CEILING_REGION_MESH;
130
+ region.castShadow = true;
131
+ region.receiveShadow = true;
130
132
  mesh.add(region);
131
133
  }
132
134
  else
@@ -0,0 +1,16 @@
1
+ import { type DustPool } from '../../lib/construction-dust';
2
+ /**
3
+ * Draws a reveal's dust: one instanced mesh of camera-facing soft discs, as
4
+ * many as the pool holds, on the grid layer: inside the scene pass, so walls
5
+ * in front hide it (on the overlay layer it showed through them, Victor run
6
+ * 12), with no depth written, so the ink never outlines it; thumbnails leave
7
+ * it out. Renders nothing itself; it owns the mesh, adds it to the scene and
8
+ * disposes it on unmount.
9
+ */
10
+ export declare function ConstructionDust({ pool, clock }: {
11
+ pool: DustPool;
12
+ clock: {
13
+ current: number;
14
+ };
15
+ }): null;
16
+ //# sourceMappingURL=construction-dust.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"construction-dust.d.ts","sourceRoot":"","sources":["../../../src/systems/construction-reveal/construction-dust.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAE,KAAK,QAAQ,EAAkB,MAAM,6BAA6B,CAAA;AAI3E;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,KAAK,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,QA8E/F"}