@ifc-lite/renderer 1.41.1 → 1.44.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/dist/camera-animation.d.ts +20 -32
  2. package/dist/camera-animation.d.ts.map +1 -1
  3. package/dist/camera-animation.js +71 -358
  4. package/dist/camera-animation.js.map +1 -1
  5. package/dist/camera-controls.d.ts +11 -51
  6. package/dist/camera-controls.d.ts.map +1 -1
  7. package/dist/camera-controls.js +140 -12
  8. package/dist/camera-controls.js.map +1 -1
  9. package/dist/camera-first-person.d.ts +52 -0
  10. package/dist/camera-first-person.d.ts.map +1 -0
  11. package/dist/camera-first-person.js +119 -0
  12. package/dist/camera-first-person.js.map +1 -0
  13. package/dist/camera-fit-policy.d.ts.map +1 -1
  14. package/dist/camera-fit-policy.js +18 -7
  15. package/dist/camera-fit-policy.js.map +1 -1
  16. package/dist/camera-framing.d.ts +86 -0
  17. package/dist/camera-framing.d.ts.map +1 -0
  18. package/dist/camera-framing.js +230 -0
  19. package/dist/camera-framing.js.map +1 -0
  20. package/dist/camera-guards.d.ts +148 -0
  21. package/dist/camera-guards.d.ts.map +1 -0
  22. package/dist/camera-guards.js +150 -0
  23. package/dist/camera-guards.js.map +1 -0
  24. package/dist/camera-matrices.d.ts +14 -0
  25. package/dist/camera-matrices.d.ts.map +1 -0
  26. package/dist/camera-matrices.js +146 -0
  27. package/dist/camera-matrices.js.map +1 -0
  28. package/dist/camera-preset-view.d.ts +56 -0
  29. package/dist/camera-preset-view.d.ts.map +1 -0
  30. package/dist/camera-preset-view.js +180 -0
  31. package/dist/camera-preset-view.js.map +1 -0
  32. package/dist/camera-projection.d.ts +1 -1
  33. package/dist/camera-projection.d.ts.map +1 -1
  34. package/dist/camera-projection.js +83 -30
  35. package/dist/camera-projection.js.map +1 -1
  36. package/dist/camera-state.d.ts +62 -0
  37. package/dist/camera-state.d.ts.map +1 -0
  38. package/dist/camera-state.js +5 -0
  39. package/dist/camera-state.js.map +1 -0
  40. package/dist/camera.d.ts +22 -11
  41. package/dist/camera.d.ts.map +1 -1
  42. package/dist/camera.js +110 -85
  43. package/dist/camera.js.map +1 -1
  44. package/dist/deviation/deviation-pipeline.d.ts.map +1 -1
  45. package/dist/deviation/deviation-pipeline.js +21 -4
  46. package/dist/deviation/deviation-pipeline.js.map +1 -1
  47. package/dist/environment.d.ts.map +1 -1
  48. package/dist/environment.js +23 -1
  49. package/dist/environment.js.map +1 -1
  50. package/dist/index.d.ts +333 -43
  51. package/dist/index.d.ts.map +1 -1
  52. package/dist/index.js +753 -704
  53. package/dist/index.js.map +1 -1
  54. package/dist/math.d.ts +59 -2
  55. package/dist/math.d.ts.map +1 -1
  56. package/dist/math.js +173 -23
  57. package/dist/math.js.map +1 -1
  58. package/dist/model-bounds-tracker.d.ts +96 -0
  59. package/dist/model-bounds-tracker.d.ts.map +1 -0
  60. package/dist/model-bounds-tracker.js +147 -0
  61. package/dist/model-bounds-tracker.js.map +1 -0
  62. package/dist/pointcloud/point-cloud-node.d.ts.map +1 -1
  63. package/dist/pointcloud/point-cloud-node.js +24 -4
  64. package/dist/pointcloud/point-cloud-node.js.map +1 -1
  65. package/dist/render-degradation.d.ts +77 -0
  66. package/dist/render-degradation.d.ts.map +1 -0
  67. package/dist/render-degradation.js +52 -0
  68. package/dist/render-degradation.js.map +1 -0
  69. package/dist/render-section-draw.d.ts +51 -0
  70. package/dist/render-section-draw.d.ts.map +1 -0
  71. package/dist/render-section-draw.js +66 -0
  72. package/dist/render-section-draw.js.map +1 -0
  73. package/dist/render-section-plane.d.ts +128 -0
  74. package/dist/render-section-plane.d.ts.map +1 -0
  75. package/dist/render-section-plane.js +298 -0
  76. package/dist/render-section-plane.js.map +1 -0
  77. package/dist/renderer-overlays.d.ts +144 -0
  78. package/dist/renderer-overlays.d.ts.map +1 -0
  79. package/dist/renderer-overlays.js +257 -0
  80. package/dist/renderer-overlays.js.map +1 -0
  81. package/dist/renderer-symbolic-overlays.d.ts +52 -0
  82. package/dist/renderer-symbolic-overlays.d.ts.map +1 -0
  83. package/dist/renderer-symbolic-overlays.js +115 -0
  84. package/dist/renderer-symbolic-overlays.js.map +1 -0
  85. package/dist/scene-geometry.d.ts +32 -0
  86. package/dist/scene-geometry.d.ts.map +1 -1
  87. package/dist/scene-geometry.js +66 -0
  88. package/dist/scene-geometry.js.map +1 -1
  89. package/dist/scene.d.ts +86 -1
  90. package/dist/scene.d.ts.map +1 -1
  91. package/dist/scene.js +391 -201
  92. package/dist/scene.js.map +1 -1
  93. package/dist/section-2d-lift.d.ts +105 -0
  94. package/dist/section-2d-lift.d.ts.map +1 -0
  95. package/dist/section-2d-lift.js +162 -0
  96. package/dist/section-2d-lift.js.map +1 -0
  97. package/dist/section-2d-line-buffer.d.ts +58 -0
  98. package/dist/section-2d-line-buffer.d.ts.map +1 -0
  99. package/dist/section-2d-line-buffer.js +109 -0
  100. package/dist/section-2d-line-buffer.js.map +1 -0
  101. package/dist/section-2d-overlay.d.ts +43 -75
  102. package/dist/section-2d-overlay.d.ts.map +1 -1
  103. package/dist/section-2d-overlay.js +189 -559
  104. package/dist/section-2d-overlay.js.map +1 -1
  105. package/dist/section-plane-basis.d.ts +22 -3
  106. package/dist/section-plane-basis.d.ts.map +1 -1
  107. package/dist/section-plane-basis.js +51 -10
  108. package/dist/section-plane-basis.js.map +1 -1
  109. package/dist/section-plane.d.ts.map +1 -1
  110. package/dist/section-plane.js +10 -1
  111. package/dist/section-plane.js.map +1 -1
  112. package/dist/shaders/section-2d-overlay.wgsl.d.ts +102 -0
  113. package/dist/shaders/section-2d-overlay.wgsl.d.ts.map +1 -0
  114. package/dist/shaders/section-2d-overlay.wgsl.js +281 -0
  115. package/dist/shaders/section-2d-overlay.wgsl.js.map +1 -0
  116. package/dist/visual-enhancement.d.ts +33 -0
  117. package/dist/visual-enhancement.d.ts.map +1 -0
  118. package/dist/visual-enhancement.js +46 -0
  119. package/dist/visual-enhancement.js.map +1 -0
  120. package/package.json +4 -3
@@ -0,0 +1,257 @@
1
+ /* This Source Code Form is subject to the terms of the Mozilla Public
2
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
3
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4
+ import { SectionPlaneRenderer } from './section-plane.js';
5
+ import { Section2DOverlayRenderer } from './section-2d-overlay.js';
6
+ import { SymbolicOverlays } from './renderer-symbolic-overlays.js';
7
+ import { aabbEdgeLineList } from './aabb-edges.js';
8
+ import { projectedBoundsRange } from './render-section-plane.js';
9
+ import { drawSectionOverlays } from './render-section-draw.js';
10
+ export class RendererOverlays {
11
+ host;
12
+ sectionPlaneRenderer = null;
13
+ section2DOverlayRenderer = null;
14
+ // Overlay/section-cut line colour, kept here so it survives a
15
+ // pre-init call and a section2DOverlayRenderer re-creation (re-applied below).
16
+ overlayLineColor = [0, 0, 0, 1];
17
+ symbolic;
18
+ constructor(host) {
19
+ this.host = host;
20
+ this.symbolic = new SymbolicOverlays(host);
21
+ }
22
+ /**
23
+ * Create the overlay GPU objects. Called from `Renderer.init()` once the
24
+ * device and the main pipeline (for its sample count) exist.
25
+ */
26
+ init(device, format, sampleCount) {
27
+ this.sectionPlaneRenderer = new SectionPlaneRenderer(device, format, sampleCount);
28
+ this.section2DOverlayRenderer = new Section2DOverlayRenderer(device, format, sampleCount);
29
+ // Re-apply any colour set before this (re)creation so it isn't lost.
30
+ this.section2DOverlayRenderer.setOverlayLineColor(this.overlayLineColor);
31
+ this.symbolic.init(device, format, sampleCount);
32
+ }
33
+ /** Release every overlay GPU resource. Idempotent, like `Renderer.destroy()`. */
34
+ destroy() {
35
+ this.sectionPlaneRenderer?.destroy();
36
+ this.sectionPlaneRenderer = null;
37
+ this.section2DOverlayRenderer?.dispose();
38
+ this.section2DOverlayRenderer = null;
39
+ this.symbolic.destroy();
40
+ }
41
+ /**
42
+ * Draw every overlay into the frame's render pass, in the documented order.
43
+ * Called from the encode region right before `pass.end()`.
44
+ */
45
+ draw(pass, ctx) {
46
+ const { viewProj, camera } = ctx;
47
+ drawSectionOverlays(pass, this.sectionPlaneRenderer, this.section2DOverlayRenderer, ctx);
48
+ // Standalone IFC annotation overlay (issue #653). The line
49
+ // vertices were pre-lifted to world space at upload time, so
50
+ // this draw happens regardless of whether a section plane is
51
+ // active — annotations are a free-floating "drawing layer"
52
+ // that sits at each annotation's storey elevation.
53
+ //
54
+ // This block was previously nested inside the `if (options.sectionPlane && ...)`
55
+ // guard above, contradicting its own comment. Loading an
56
+ // annotation-only model with no section plane meant the entire
57
+ // overlay was skipped at draw time even though 9000+ vertices
58
+ // had been uploaded successfully. Pulled out to its own block.
59
+ //
60
+ // Order: fills (background) → lines (outlines on top) →
61
+ // texts (labels above everything).
62
+ this.symbolic.drawFills(pass, viewProj);
63
+ if (this.section2DOverlayRenderer?.hasAnnotationLines3D()) {
64
+ this.section2DOverlayRenderer.drawAnnotationLines3D(pass, viewProj);
65
+ }
66
+ if (this.section2DOverlayRenderer?.hasAlignmentLines3D()) {
67
+ this.section2DOverlayRenderer.drawAlignmentLines3D(pass, viewProj);
68
+ }
69
+ if (this.section2DOverlayRenderer?.hasGridLines3D()) {
70
+ this.section2DOverlayRenderer.drawGridLines3D(pass, viewProj);
71
+ }
72
+ if (this.section2DOverlayRenderer?.hasDxfLines3D()) {
73
+ this.section2DOverlayRenderer.drawDxfLines3D(pass, viewProj);
74
+ }
75
+ if (this.section2DOverlayRenderer?.hasClashBoxLines3D()) {
76
+ this.section2DOverlayRenderer.drawClashBoxLines3D(pass, viewProj);
77
+ }
78
+ this.symbolic.drawTexts(pass, viewProj, ctx.canvasWidth, ctx.canvasHeight, camera);
79
+ }
80
+ /** See `Renderer.uploadSection2DOverlay` for the published contract. */
81
+ uploadSection2DOverlay(polygons, lines, axis, position, // 0-100 percentage
82
+ sectionRange, // Same storey-based range as section plane
83
+ flipped = false, customPlane) {
84
+ // Rendering is dirty-flag gated, so every path that actually CHANGES
85
+ // overlay geometry has to request a frame or the new drawing only
86
+ // appears when something unrelated next dirties the viewport (#2442).
87
+ // The two early returns below leave the geometry untouched, so they
88
+ // correctly ask for nothing — matching `uploadGridLines3D` and friends.
89
+ if (!this.section2DOverlayRenderer)
90
+ return;
91
+ if (customPlane) {
92
+ // Custom-plane path: planePosition / axis are unused — the
93
+ // basis the cap shader needs travels in `customPlane`. We pass
94
+ // 0 for `planePosition` and the existing `axis` so the cardinal
95
+ // shader code path that callers depend on (e.g. legacy SVG
96
+ // export) keeps working when customPlane is omitted.
97
+ this.section2DOverlayRenderer.uploadDrawing(polygons, lines, axis, 0, flipped, customPlane);
98
+ this.host.requestRender();
99
+ return;
100
+ }
101
+ // Same range formula as the clip plane (`resolveSectionPlaneFrame`),
102
+ // shared rather than copied — but deliberately evaluated against the
103
+ // UN-ROTATED axis normal, which is what makes the two agree instead of
104
+ // merely look alike (#2447).
105
+ //
106
+ // `planePosition` is not a plane distance here: `transform2Dto3D` lifts
107
+ // the cardinal drawing onto an AXIS-ALIGNED plane at that world
108
+ // coordinate (`side` -> `[planePosition, y, x]`), and the polygons it
109
+ // lifts were cut on that same axis-aligned plane upstream. Feeding it
110
+ // the rotated plane's distance would move the cap off the geometry it
111
+ // was cut from. A rotated or face-picked plane reaches the cap through
112
+ // `customPlane` above, which carries its own basis.
113
+ const axisNormal = axis === 'side' ? [1, 0, 0] : axis === 'down' ? [0, 1, 0] : [0, 0, 1];
114
+ const modelBounds = this.host.getModelBounds();
115
+ // Allow upload if either sectionRange has both values, or modelBounds exists as fallback
116
+ const hasFullRange = sectionRange?.min !== undefined && sectionRange?.max !== undefined;
117
+ if (!hasFullRange && !modelBounds)
118
+ return;
119
+ const axisRange = modelBounds ? projectedBoundsRange(modelBounds.min, modelBounds.max, axisNormal) : null;
120
+ const minVal = sectionRange?.min ?? axisRange.min;
121
+ const maxVal = sectionRange?.max ?? axisRange.max;
122
+ const planePosition = minVal + (position / 100) * (maxVal - minVal);
123
+ this.section2DOverlayRenderer.uploadDrawing(polygons, lines, axis, planePosition, flipped);
124
+ this.host.requestRender();
125
+ }
126
+ /** See `Renderer.clearSection2DOverlay` for the published contract. */
127
+ clearSection2DOverlay() {
128
+ if (this.section2DOverlayRenderer) {
129
+ this.section2DOverlayRenderer.clearGeometry();
130
+ this.host.requestRender();
131
+ }
132
+ }
133
+ /** See `Renderer.setOverlayLineColor` for the published contract. */
134
+ setOverlayLineColor(color) {
135
+ // Persist here so a pre-init call (and any later overlay
136
+ // re-creation) keeps the colour — init() re-applies this.overlayLineColor.
137
+ this.overlayLineColor = color;
138
+ this.section2DOverlayRenderer?.setOverlayLineColor(color);
139
+ this.host.requestRender();
140
+ }
141
+ /** See `Renderer.uploadAnnotationLines3D` for the published contract. */
142
+ uploadAnnotationLines3D(vertices) {
143
+ if (!this.section2DOverlayRenderer)
144
+ return;
145
+ this.section2DOverlayRenderer.uploadAnnotationLines3D(vertices);
146
+ // Contribute annotation extents to modelBounds + camera sceneBounds
147
+ // so an annotation-only model (no IfcProduct meshes — common for
148
+ // separate "annotation sheets") gets framed by Home / fit-to-view
149
+ // AND has correct near/far clipping. Without sceneBounds the camera
150
+ // frustum doesn't include the annotation cluster and they're clipped
151
+ // away even when the camera is pointed at them. Mirror the
152
+ // point-cloud upload path (`addPointClouds`, `setPointClouds`) which
153
+ // does the same thing.
154
+ this.host.expandModelBoundsWithFlatVertices(vertices, 3);
155
+ this.host.syncCameraSceneBounds();
156
+ this.host.requestRender();
157
+ }
158
+ /** See `Renderer.clearAnnotationLines3D` for the published contract. */
159
+ clearAnnotationLines3D() {
160
+ if (this.section2DOverlayRenderer) {
161
+ this.section2DOverlayRenderer.clearAnnotationLines3D();
162
+ this.host.requestRender();
163
+ }
164
+ }
165
+ /** See `Renderer.uploadAlignmentLines3D` for the published contract. */
166
+ uploadAlignmentLines3D(vertices) {
167
+ if (!this.section2DOverlayRenderer)
168
+ return;
169
+ this.section2DOverlayRenderer.uploadAlignmentLines3D(vertices);
170
+ // Frame alignment-only files the same way annotation overlays are
171
+ // framed (see uploadAnnotationLines3D).
172
+ this.host.expandModelBoundsWithFlatVertices(vertices, 3);
173
+ this.host.syncCameraSceneBounds();
174
+ this.host.requestRender();
175
+ }
176
+ /** See `Renderer.clearAlignmentLines3D` for the published contract. */
177
+ clearAlignmentLines3D() {
178
+ if (this.section2DOverlayRenderer) {
179
+ this.section2DOverlayRenderer.clearAlignmentLines3D();
180
+ this.host.requestRender();
181
+ }
182
+ }
183
+ /**
184
+ * See `Renderer.uploadGridLines3D` for the published contract. Unlike
185
+ * alignment, grids do NOT expand model bounds: they're behind a visibility
186
+ * toggle, so toggling them on must not reframe the camera.
187
+ */
188
+ uploadGridLines3D(vertices) {
189
+ if (!this.section2DOverlayRenderer)
190
+ return;
191
+ this.section2DOverlayRenderer.uploadGridLines3D(vertices);
192
+ this.host.requestRender();
193
+ }
194
+ /** See `Renderer.clearGridLines3D` for the published contract. */
195
+ clearGridLines3D() {
196
+ if (this.section2DOverlayRenderer) {
197
+ this.section2DOverlayRenderer.clearGridLines3D();
198
+ this.host.requestRender();
199
+ }
200
+ }
201
+ /** See `Renderer.uploadDxfLines3D` for the published contract. */
202
+ uploadDxfLines3D(vertices) {
203
+ if (!this.section2DOverlayRenderer)
204
+ return;
205
+ this.section2DOverlayRenderer.uploadDxfLines3D(vertices);
206
+ this.host.requestRender();
207
+ }
208
+ /** See `Renderer.clearDxfLines3D` for the published contract. */
209
+ clearDxfLines3D() {
210
+ if (this.section2DOverlayRenderer) {
211
+ this.section2DOverlayRenderer.clearDxfLines3D();
212
+ this.host.requestRender();
213
+ }
214
+ }
215
+ /** See `Renderer.setClashOverlapBox` for the published contract. */
216
+ setClashOverlapBox(box) {
217
+ if (!this.section2DOverlayRenderer)
218
+ return;
219
+ if (!box) {
220
+ this.section2DOverlayRenderer.clearClashBoxLines3D();
221
+ this.host.requestRender();
222
+ return;
223
+ }
224
+ this.section2DOverlayRenderer.setClashBoxLineColor(box.color);
225
+ this.section2DOverlayRenderer.uploadClashBoxLines3D(aabbEdgeLineList(box.min, box.max));
226
+ this.host.requestRender();
227
+ }
228
+ /**
229
+ * See `Renderer.setClashContactLines` for the published contract. Shares the
230
+ * clash-box line buffer, so only one of this / setClashOverlapBox shows.
231
+ */
232
+ setClashContactLines(lines) {
233
+ if (!this.section2DOverlayRenderer)
234
+ return;
235
+ if (!lines || lines.vertices.length === 0) {
236
+ this.section2DOverlayRenderer.clearClashBoxLines3D();
237
+ this.host.requestRender();
238
+ return;
239
+ }
240
+ this.section2DOverlayRenderer.setClashBoxLineColor(lines.color);
241
+ this.section2DOverlayRenderer.uploadClashBoxLines3D(lines.vertices);
242
+ this.host.requestRender();
243
+ }
244
+ /** See `Renderer.uploadAnnotationFills3D` for the published contract. */
245
+ uploadAnnotationFills3D(fills) {
246
+ this.symbolic.uploadFills(fills);
247
+ }
248
+ /** See `Renderer.uploadAnnotationTexts3D` for the published contract. */
249
+ uploadAnnotationTexts3D(texts) {
250
+ this.symbolic.uploadTexts(texts);
251
+ }
252
+ /** See `Renderer.hasSection2DOverlay` for the published contract. */
253
+ hasSection2DOverlay() {
254
+ return this.section2DOverlayRenderer?.hasGeometry() ?? false;
255
+ }
256
+ }
257
+ //# sourceMappingURL=renderer-overlays.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderer-overlays.js","sourceRoot":"","sources":["../src/renderer-overlays.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AA0C/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,wBAAwB,EAAyC,MAAM,yBAAyB,CAAC;AAC1G,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAoB,MAAM,0BAA0B,CAAC;AA8BjF,MAAM,OAAO,gBAAgB;IAQI;IAPrB,oBAAoB,GAAgC,IAAI,CA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,KAAK,IAAI,KAAK,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACxC,IAAI,CAAC,wBAAwB,CAAC,oBAAoB,EAAE,CAAC;YACrD,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;YAC1B,OAAO;QACX,CAAC;QACD,IAAI,CAAC,wBAAwB,CAAC,oBAAoB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAChE,IAAI,CAAC,wBAAwB,CAAC,qBAAqB,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QACpE,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;IAC9B,CAAC;IAED,yEAAyE;IACzE,uBAAuB,CAAC,KAAmC;QACvD,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IACrC,CAAC;IAED,yEAAyE;IACzE,uBAAuB,CAAC,KAAmC;QACvD,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IACrC,CAAC;IAED,qEAAqE;IACrE,mBAAmB;QACf,OAAO,IAAI,CAAC,wBAAwB,EAAE,WAAW,EAAE,IAAI,KAAK,CAAC;IACjE,CAAC;CACJ"}
@@ -0,0 +1,52 @@
1
+ /**
2
+ * The symbolic annotation overlay: filled IfcAnnotation regions and world-space
3
+ * text labels (issue #653).
4
+ *
5
+ * Split out of `RendererOverlays` because these are a genuinely separate pair of
6
+ * GPU objects — `SymbolicFillPipeline` and `SymbolicTextPipeline` own their own
7
+ * buffers, sampler and glyph-atlas texture, and share no state whatsoever with
8
+ * the `Section2DOverlayRenderer` that backs the section cap and every 3D line
9
+ * layer. `RendererOverlays` composes this and drives the draw order, because the
10
+ * order is the one thing the two families do share: fills paint underneath the
11
+ * line layers, text labels on top of everything.
12
+ */
13
+ import type { Camera } from './camera.js';
14
+ import { type SymbolicFillInput, type SymbolicTextInput } from './symbolic-overlay-pipelines.js';
15
+ /**
16
+ * The model-bounds bookkeeping the symbolic uploads borrow from `Renderer`.
17
+ * Structurally narrower than `OverlayHost` on purpose: this module never reads
18
+ * the bounds back, it only grows them and asks for a frame.
19
+ */
20
+ export interface SymbolicOverlayHost {
21
+ expandModelBoundsWithFlatVertices(positions: Float32Array, stride: number): void;
22
+ syncCameraSceneBounds(): void;
23
+ requestRender(): void;
24
+ }
25
+ export declare class SymbolicOverlays {
26
+ private readonly host;
27
+ private fillPipeline;
28
+ private textPipeline;
29
+ constructor(host: SymbolicOverlayHost);
30
+ /**
31
+ * Share the device + presentation format AND the MSAA sample count +
32
+ * objectId attachment shape with the rest of the renderer so these
33
+ * composite into the same RGBA pass without WebGPU pass-compatibility
34
+ * validation errors.
35
+ */
36
+ init(device: GPUDevice, format: GPUTextureFormat, sampleCount: number): void;
37
+ /**
38
+ * These pipelines own their own GPU buffers, sampler, and atlas texture —
39
+ * recreating the viewer without releasing them leaks resources on every
40
+ * reload.
41
+ */
42
+ destroy(): void;
43
+ /** Background layer: painted before the 3D line overlays. */
44
+ drawFills(pass: GPURenderPassEncoder, viewProj: Float32Array): void;
45
+ /** Label layer: painted after everything else. */
46
+ drawTexts(pass: GPURenderPassEncoder, viewProj: Float32Array, canvasWidth: number, canvasHeight: number, camera: Camera): void;
47
+ /** See `Renderer.uploadAnnotationFills3D` for the published contract. */
48
+ uploadFills(fills: readonly SymbolicFillInput[]): void;
49
+ /** See `Renderer.uploadAnnotationTexts3D` for the published contract. */
50
+ uploadTexts(texts: readonly SymbolicTextInput[]): void;
51
+ }
52
+ //# sourceMappingURL=renderer-symbolic-overlays.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderer-symbolic-overlays.d.ts","sourceRoot":"","sources":["../src/renderer-symbolic-overlays.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,EAGH,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACzB,MAAM,iCAAiC,CAAC;AAEzC;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAChC,iCAAiC,CAAC,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACjF,qBAAqB,IAAI,IAAI,CAAC;IAC9B,aAAa,IAAI,IAAI,CAAC;CACzB;AAED,qBAAa,gBAAgB;IAIb,OAAO,CAAC,QAAQ,CAAC,IAAI;IAHjC,OAAO,CAAC,YAAY,CAAqC;IACzD,OAAO,CAAC,YAAY,CAAqC;gBAE5B,IAAI,EAAE,mBAAmB;IAEtD;;;;;OAKG;IACH,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI;IAK5E;;;;OAIG;IACH,OAAO,IAAI,IAAI;IAOf,6DAA6D;IAC7D,SAAS,CAAC,IAAI,EAAE,oBAAoB,EAAE,QAAQ,EAAE,YAAY,GAAG,IAAI;IAMnE,kDAAkD;IAClD,SAAS,CACL,IAAI,EAAE,oBAAoB,EAC1B,QAAQ,EAAE,YAAY,EACtB,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,MAAM,GACf,IAAI;IAqCP,yEAAyE;IACzE,WAAW,CAAC,KAAK,EAAE,SAAS,iBAAiB,EAAE,GAAG,IAAI;IAqBtD,yEAAyE;IACzE,WAAW,CAAC,KAAK,EAAE,SAAS,iBAAiB,EAAE,GAAG,IAAI;CAkBzD"}
@@ -0,0 +1,115 @@
1
+ /* This Source Code Form is subject to the terms of the Mozilla Public
2
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
3
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4
+ import { viewBasis } from './math.js';
5
+ import { SymbolicFillPipeline, SymbolicTextPipeline, } from './symbolic-overlay-pipelines.js';
6
+ export class SymbolicOverlays {
7
+ host;
8
+ fillPipeline = null;
9
+ textPipeline = null;
10
+ constructor(host) {
11
+ this.host = host;
12
+ }
13
+ /**
14
+ * Share the device + presentation format AND the MSAA sample count +
15
+ * objectId attachment shape with the rest of the renderer so these
16
+ * composite into the same RGBA pass without WebGPU pass-compatibility
17
+ * validation errors.
18
+ */
19
+ init(device, format, sampleCount) {
20
+ this.fillPipeline = new SymbolicFillPipeline(device, format, sampleCount);
21
+ this.textPipeline = new SymbolicTextPipeline(device, format, sampleCount);
22
+ }
23
+ /**
24
+ * These pipelines own their own GPU buffers, sampler, and atlas texture —
25
+ * recreating the viewer without releasing them leaks resources on every
26
+ * reload.
27
+ */
28
+ destroy() {
29
+ this.fillPipeline?.destroy();
30
+ this.fillPipeline = null;
31
+ this.textPipeline?.destroy();
32
+ this.textPipeline = null;
33
+ }
34
+ /** Background layer: painted before the 3D line overlays. */
35
+ drawFills(pass, viewProj) {
36
+ if (this.fillPipeline?.hasGeometry()) {
37
+ this.fillPipeline.render(pass, viewProj);
38
+ }
39
+ }
40
+ /** Label layer: painted after everything else. */
41
+ drawTexts(pass, viewProj, canvasWidth, canvasHeight, camera) {
42
+ if (!this.textPipeline?.hasGeometry())
43
+ return;
44
+ // Pass viewport pixel dimensions so the shader can scale glyphs
45
+ // to a constant on-screen size (BIMvision-style annotations)
46
+ // regardless of camera distance or authored text height.
47
+ //
48
+ // Also pass the screen-aligned camera basis (right, up) so
49
+ // billboarded glyphs (grid bubble tags) can face the camera
50
+ // in any orientation — top-down, eye-level, oblique alike.
51
+ //
52
+ // `viewBasis` rather than a local `cross(forward, up)` (#2489): this
53
+ // used to be a third independent derivation of the same basis the
54
+ // view matrix is built from, and like the unprojection ray's copy
55
+ // that #2467 removed it disagreed with `lookAt` about every
56
+ // degenerate pose. It guarded the two divisors with `|| 1` but not
57
+ // the numerators, so an infinite or NaN coordinate anywhere in the
58
+ // pose produced NaN axes; and for the two *finite* degeneracies —
59
+ // `eye === target`, and an `up` parallel to the view direction (a
60
+ // plan pose, or a restored BCF viewpoint) — it produced a zero-length
61
+ // right/up, which collapses every glyph quad to a point. Both are
62
+ // exactly the cases `viewBasis` substitutes a deterministic hint for,
63
+ // and taking that substitute is what makes the labels billboard
64
+ // against the basis the frame was actually drawn with.
65
+ //
66
+ // Only `right`/`up` are read here: a screen-aligned quad needs the
67
+ // screen plane, not the view direction.
68
+ const basis = viewBasis(camera.getPosition(), camera.getTarget(), camera.getUp());
69
+ this.textPipeline.render(pass, viewProj, canvasWidth, canvasHeight, [basis.right.x, basis.right.y, basis.right.z], [basis.up.x, basis.up.y, basis.up.z]);
70
+ }
71
+ /** See `Renderer.uploadAnnotationFills3D` for the published contract. */
72
+ uploadFills(fills) {
73
+ if (!this.fillPipeline)
74
+ return;
75
+ this.fillPipeline.upload(fills);
76
+ // Contribute fill extents to modelBounds — see uploadAnnotationLines3D.
77
+ for (const fill of fills) {
78
+ const pts = fill.points;
79
+ if (pts.length === 0)
80
+ continue;
81
+ // points are flat [x,z,x,z,...]; lift to (x, fill.worldY, z) per
82
+ // vertex so we expand bounds in the same world space the renderer draws in.
83
+ const lifted = new Float32Array((pts.length / 2) * 3);
84
+ for (let i = 0, j = 0; i < pts.length; i += 2, j += 3) {
85
+ lifted[j] = pts[i];
86
+ lifted[j + 1] = fill.worldY;
87
+ lifted[j + 2] = pts[i + 1];
88
+ }
89
+ this.host.expandModelBoundsWithFlatVertices(lifted, 3);
90
+ }
91
+ this.host.syncCameraSceneBounds();
92
+ this.host.requestRender();
93
+ }
94
+ /** See `Renderer.uploadAnnotationTexts3D` for the published contract. */
95
+ uploadTexts(texts) {
96
+ if (!this.textPipeline)
97
+ return;
98
+ this.textPipeline.upload(texts);
99
+ // Text origins are single points; pack them into a flat buffer and
100
+ // expand bounds. Glyph extents are small enough that origin-only
101
+ // suffices for framing.
102
+ if (texts.length > 0) {
103
+ const buf = new Float32Array(texts.length * 3);
104
+ for (let i = 0; i < texts.length; i++) {
105
+ buf[i * 3 + 0] = texts[i].worldPos[0];
106
+ buf[i * 3 + 1] = texts[i].worldPos[1];
107
+ buf[i * 3 + 2] = texts[i].worldPos[2];
108
+ }
109
+ this.host.expandModelBoundsWithFlatVertices(buf, 3);
110
+ this.host.syncCameraSceneBounds();
111
+ }
112
+ this.host.requestRender();
113
+ }
114
+ }
115
+ //# sourceMappingURL=renderer-symbolic-overlays.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderer-symbolic-overlays.js","sourceRoot":"","sources":["../src/renderer-symbolic-overlays.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAgB/D,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EACH,oBAAoB,EACpB,oBAAoB,GAGvB,MAAM,iCAAiC,CAAC;AAazC,MAAM,OAAO,gBAAgB;IAII;IAHrB,YAAY,GAAgC,IAAI,CAAC;IACjD,YAAY,GAAgC,IAAI,CAAC;IAEzD,YAA6B,IAAyB;QAAzB,SAAI,GAAJ,IAAI,CAAqB;IAAG,CAAC;IAE1D;;;;;OAKG;IACH,IAAI,CAAC,MAAiB,EAAE,MAAwB,EAAE,WAAmB;QACjE,IAAI,CAAC,YAAY,GAAG,IAAI,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC;QAC1E,IAAI,CAAC,YAAY,GAAG,IAAI,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC;IAC9E,CAAC;IAED;;;;OAIG;IACH,OAAO;QACH,IAAI,CAAC,YAAY,EAAE,OAAO,EAAE,CAAC;QAC7B,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;QACzB,IAAI,CAAC,YAAY,EAAE,OAAO,EAAE,CAAC;QAC7B,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;IAC7B,CAAC;IAED,6DAA6D;IAC7D,SAAS,CAAC,IAA0B,EAAE,QAAsB;QACxD,IAAI,IAAI,CAAC,YAAY,EAAE,WAAW,EAAE,EAAE,CAAC;YACnC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QA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E,CAAC,EAAE,EAAE,CAAC;gBACpC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;gBACtC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;gBACtC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YAC1C,CAAC;YACD,IAAI,CAAC,IAAI,CAAC,iCAAiC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;YACpD,IAAI,CAAC,IAAI,CAAC,qBAAqB,EAAE,CAAC;QACtC,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;IAC9B,CAAC;CACJ"}
@@ -5,6 +5,38 @@
5
5
  * No dependency on Scene internal state or GPU device.
6
6
  */
7
7
  import type { MeshData } from '@ifc-lite/geometry';
8
+ import type { BoundingBox } from './scene-raycaster.js';
9
+ /** The subset of `MeshData` a world-space AABB needs. */
10
+ export interface AabbPiece {
11
+ positions: Float32Array;
12
+ origin?: [number, number, number];
13
+ }
14
+ /**
15
+ * World-space AABB over an entity's mesh pieces, or `null` when they contain
16
+ * no vertex a box can be built from (issue #2480).
17
+ *
18
+ * Three copies of this loop lived in `Scene` — `getEntityBoundingBox`,
19
+ * `finishEphemeralStreaming` and `releaseGeometryData` — and all three seeded
20
+ * `±Infinity` and returned whatever the seed was left as. That is the correct
21
+ * identity value for a min/max *accumulation*, and `ModelBoundsTracker` still
22
+ * uses it that way deliberately, but it is not a correct *answer*: a piece
23
+ * with a zero-length positions array made `getEntityBoundingBox` compute — and
24
+ * **cache** — `{ min: +Infinity, max: -Infinity }` for a real entity, which
25
+ * then poisoned the entry for good even after the entity gained real geometry
26
+ * (the cache has no invalidation tied to that).
27
+ *
28
+ * `null` is the answer the class already gives for "this entity has no
29
+ * geometry", and `Scene.getBounds()` — the sibling accumulation over the very
30
+ * same `meshDataMap` — has always screened each vertex with `Number.isFinite`
31
+ * and returned `null` when none survived. This brings the per-entity path in
32
+ * line with the whole-scene one rather than inventing a new contract.
33
+ *
34
+ * Non-finite vertices are skipped rather than poisoning the box, for the same
35
+ * reason: #1645 records NaN placement matrices as a real input class, and one
36
+ * infinite coordinate would otherwise widen the entity's box to infinity and
37
+ * hand that to the camera, raycaster and clash consumers alike.
38
+ */
39
+ export declare function worldAabbFromPieces(pieces: readonly AabbPiece[] | undefined): BoundingBox | null;
8
40
  /**
9
41
  * Per-vertex z-nudge salt (issue: lens/overlay colouring).
10
42
  *
@@ -1 +1 @@
1
- {"version":3,"file":"scene-geometry.d.ts","sourceRoot":"","sources":["../src/scene-geometry.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAMnD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,aAAa,CAAC,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,GAAG,MAAM,CAStE;AAED,8EAA8E;AAC9E,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEtE;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,aAAa,EAAE,QAAQ,EAAE,EASzB,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GACtC;IACD,UAAU,EAAE,YAAY,CAAC;IACzB,OAAO,EAAE,WAAW,CAAC;IACrB,MAAM,EAAE;QAAE,GAAG,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;QAAC,GAAG,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;KAAE,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,CAAC;QAAC,GAAG,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;KAAE,CAAC;IACzE;;qEAEiE;IACjE,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC,CAsGA;AAED;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CAAC,aAAa,EAAE,QAAQ,EAAE,EAAE,aAAa,EAAE,MAAM,GAAG,QAAQ,EAAE,EAAE,CA6C1G"}
@@ -2,6 +2,72 @@
2
2
  * License, v. 2.0. If a copy of the MPL was not distributed with this
3
3
  * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4
4
  import { BATCH_CONSTANTS } from './constants.js';
5
+ /**
6
+ * World-space AABB over an entity's mesh pieces, or `null` when they contain
7
+ * no vertex a box can be built from (issue #2480).
8
+ *
9
+ * Three copies of this loop lived in `Scene` — `getEntityBoundingBox`,
10
+ * `finishEphemeralStreaming` and `releaseGeometryData` — and all three seeded
11
+ * `±Infinity` and returned whatever the seed was left as. That is the correct
12
+ * identity value for a min/max *accumulation*, and `ModelBoundsTracker` still
13
+ * uses it that way deliberately, but it is not a correct *answer*: a piece
14
+ * with a zero-length positions array made `getEntityBoundingBox` compute — and
15
+ * **cache** — `{ min: +Infinity, max: -Infinity }` for a real entity, which
16
+ * then poisoned the entry for good even after the entity gained real geometry
17
+ * (the cache has no invalidation tied to that).
18
+ *
19
+ * `null` is the answer the class already gives for "this entity has no
20
+ * geometry", and `Scene.getBounds()` — the sibling accumulation over the very
21
+ * same `meshDataMap` — has always screened each vertex with `Number.isFinite`
22
+ * and returned `null` when none survived. This brings the per-entity path in
23
+ * line with the whole-scene one rather than inventing a new contract.
24
+ *
25
+ * Non-finite vertices are skipped rather than poisoning the box, for the same
26
+ * reason: #1645 records NaN placement matrices as a real input class, and one
27
+ * infinite coordinate would otherwise widen the entity's box to infinity and
28
+ * hand that to the camera, raycaster and clash consumers alike.
29
+ */
30
+ export function worldAabbFromPieces(pieces) {
31
+ if (!pieces || pieces.length === 0)
32
+ return null;
33
+ let minX = Infinity, minY = Infinity, minZ = Infinity;
34
+ let maxX = -Infinity, maxY = -Infinity, maxZ = -Infinity;
35
+ let hasValidData = false;
36
+ for (const piece of pieces) {
37
+ const positions = piece.positions;
38
+ // world = origin + position (per-element local frame); origin absent or
39
+ // [0,0,0] for legacy absolute meshes.
40
+ const ox = piece.origin ? piece.origin[0] : 0;
41
+ const oy = piece.origin ? piece.origin[1] : 0;
42
+ const oz = piece.origin ? piece.origin[2] : 0;
43
+ for (let i = 0; i + 2 < positions.length; i += 3) {
44
+ const x = positions[i] + ox;
45
+ const y = positions[i + 1] + oy;
46
+ const z = positions[i + 2] + oz;
47
+ if (!Number.isFinite(x) || !Number.isFinite(y) || !Number.isFinite(z))
48
+ continue;
49
+ hasValidData = true;
50
+ if (x < minX)
51
+ minX = x;
52
+ if (y < minY)
53
+ minY = y;
54
+ if (z < minZ)
55
+ minZ = z;
56
+ if (x > maxX)
57
+ maxX = x;
58
+ if (y > maxY)
59
+ maxY = y;
60
+ if (z > maxZ)
61
+ maxZ = z;
62
+ }
63
+ }
64
+ if (!hasValidData)
65
+ return null;
66
+ return {
67
+ min: { x: minX, y: minY, z: minZ },
68
+ max: { x: maxX, y: maxY, z: maxZ },
69
+ };
70
+ }
5
71
  const MAX_ENCODED_ENTITY_ID = 0xFFFFFF;
6
72
  let warnedEntityIdRange = false;
7
73
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"scene-geometry.js","sourceRoot":"","sources":["../src/scene-geometry.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAU/D,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEjD,MAAM,qBAAqB,GAAG,QAAQ,CAAC;AACvC,IAAI,mBAAmB,GAAG,KAAK,CAAC;AAEhC;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,aAAa,CAAC,KAAgC;IAC5D,IAAI,CAAC,KAAK;QAAE,OAAO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