@ifc-lite/renderer 1.50.0 → 2.0.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 (82) hide show
  1. package/README.md +4 -0
  2. package/dist/camera-animation.d.ts.map +1 -1
  3. package/dist/camera-animation.js +37 -27
  4. package/dist/camera-animation.js.map +1 -1
  5. package/dist/camera-controls.d.ts +26 -15
  6. package/dist/camera-controls.d.ts.map +1 -1
  7. package/dist/camera-controls.js +32 -18
  8. package/dist/camera-controls.js.map +1 -1
  9. package/dist/camera-framing.d.ts +60 -21
  10. package/dist/camera-framing.d.ts.map +1 -1
  11. package/dist/camera-framing.js +168 -131
  12. package/dist/camera-framing.js.map +1 -1
  13. package/dist/camera-preset-view.d.ts +2 -2
  14. package/dist/camera-preset-view.d.ts.map +1 -1
  15. package/dist/camera-preset-view.js +52 -42
  16. package/dist/camera-preset-view.js.map +1 -1
  17. package/dist/camera.d.ts +26 -6
  18. package/dist/camera.d.ts.map +1 -1
  19. package/dist/camera.js +41 -12
  20. package/dist/camera.js.map +1 -1
  21. package/dist/federation-registry.d.ts.map +1 -1
  22. package/dist/federation-registry.js +19 -2
  23. package/dist/federation-registry.js.map +1 -1
  24. package/dist/index.d.ts +42 -59
  25. package/dist/index.d.ts.map +1 -1
  26. package/dist/index.js +43 -73
  27. package/dist/index.js.map +1 -1
  28. package/dist/instanced-override-color.d.ts +17 -0
  29. package/dist/instanced-override-color.d.ts.map +1 -0
  30. package/dist/instanced-override-color.js +22 -0
  31. package/dist/instanced-override-color.js.map +1 -0
  32. package/dist/instanced-render.d.ts +10 -0
  33. package/dist/instanced-render.d.ts.map +1 -1
  34. package/dist/instanced-render.js +13 -3
  35. package/dist/instanced-render.js.map +1 -1
  36. package/dist/pick-resolve.d.ts +125 -0
  37. package/dist/pick-resolve.d.ts.map +1 -0
  38. package/dist/pick-resolve.js +127 -0
  39. package/dist/pick-resolve.js.map +1 -0
  40. package/dist/picker.d.ts.map +1 -1
  41. package/dist/picker.js +20 -46
  42. package/dist/picker.js.map +1 -1
  43. package/dist/picking-manager.d.ts.map +1 -1
  44. package/dist/picking-manager.js +13 -1
  45. package/dist/picking-manager.js.map +1 -1
  46. package/dist/raycast-engine.d.ts +4 -4
  47. package/dist/raycast-engine.d.ts.map +1 -1
  48. package/dist/raycast-engine.js.map +1 -1
  49. package/dist/renderer-overlays.d.ts +3 -21
  50. package/dist/renderer-overlays.d.ts.map +1 -1
  51. package/dist/renderer-overlays.js +57 -85
  52. package/dist/renderer-overlays.js.map +1 -1
  53. package/dist/renderer-symbolic-overlays.d.ts +29 -2
  54. package/dist/renderer-symbolic-overlays.d.ts.map +1 -1
  55. package/dist/renderer-symbolic-overlays.js +61 -16
  56. package/dist/renderer-symbolic-overlays.js.map +1 -1
  57. package/dist/scene-contents.d.ts +132 -0
  58. package/dist/scene-contents.d.ts.map +1 -0
  59. package/dist/scene-contents.js +5 -0
  60. package/dist/scene-contents.js.map +1 -0
  61. package/dist/scene-raycaster.d.ts +14 -8
  62. package/dist/scene-raycaster.d.ts.map +1 -1
  63. package/dist/scene-raycaster.js +6 -2
  64. package/dist/scene-raycaster.js.map +1 -1
  65. package/dist/scene.d.ts.map +1 -1
  66. package/dist/scene.js +21 -7
  67. package/dist/scene.js.map +1 -1
  68. package/dist/section-2d-overlay.d.ts +52 -63
  69. package/dist/section-2d-overlay.d.ts.map +1 -1
  70. package/dist/section-2d-overlay.js +69 -130
  71. package/dist/section-2d-overlay.js.map +1 -1
  72. package/dist/shaders/section-2d-overlay.wgsl.d.ts +2 -2
  73. package/dist/shaders/section-2d-overlay.wgsl.d.ts.map +1 -1
  74. package/dist/shaders/section-2d-overlay.wgsl.js +2 -2
  75. package/dist/shaders/section-2d-overlay.wgsl.js.map +1 -1
  76. package/dist/symbolic-overlay-pipelines.d.ts +11 -12
  77. package/dist/symbolic-overlay-pipelines.d.ts.map +1 -1
  78. package/dist/symbolic-overlay-pipelines.js +7 -12
  79. package/dist/symbolic-overlay-pipelines.js.map +1 -1
  80. package/dist/types.d.ts +5 -19
  81. package/dist/types.d.ts.map +1 -1
  82. package/package.json +4 -4
@@ -37,7 +37,7 @@
37
37
  * renderer's copy through the narrow `OverlayHost` seam below.
38
38
  */
39
39
  import type { Camera } from './camera.js';
40
- import { type CutPolygon2D, type DrawingLine2D } from './section-2d-overlay.js';
40
+ import { type CutPolygon2D, type DrawingLine2D, type LineOverlayChannel } from './section-2d-overlay.js';
41
41
  import type { SymbolicFillInput, SymbolicTextInput } from './symbolic-overlay-pipelines.js';
42
42
  import { type ClashSolidInput } from './clash-solid-pipeline.js';
43
43
  import { type ModelBounds } from './render-section-draw.js';
@@ -102,26 +102,8 @@ export declare class RendererOverlays {
102
102
  clearSection2DOverlay(): void;
103
103
  /** See `Renderer.setOverlayLineColor` for the published contract. */
104
104
  setOverlayLineColor(color: readonly [number, number, number, number]): void;
105
- /** See `Renderer.uploadAnnotationLines3D` for the published contract. */
106
- uploadAnnotationLines3D(vertices: Float32Array): void;
107
- /** See `Renderer.clearAnnotationLines3D` for the published contract. */
108
- clearAnnotationLines3D(): void;
109
- /** See `Renderer.uploadAlignmentLines3D` for the published contract. */
110
- uploadAlignmentLines3D(vertices: Float32Array): void;
111
- /** See `Renderer.clearAlignmentLines3D` for the published contract. */
112
- clearAlignmentLines3D(): void;
113
- /**
114
- * See `Renderer.uploadGridLines3D` for the published contract. Unlike
115
- * alignment, grids do NOT expand model bounds: they're behind a visibility
116
- * toggle, so toggling them on must not reframe the camera.
117
- */
118
- uploadGridLines3D(vertices: Float32Array): void;
119
- /** See `Renderer.clearGridLines3D` for the published contract. */
120
- clearGridLines3D(): void;
121
- /** See `Renderer.uploadDxfLines3D` for the published contract. */
122
- uploadDxfLines3D(vertices: Float32Array): void;
123
- /** See `Renderer.clearDxfLines3D` for the published contract. */
124
- clearDxfLines3D(): void;
105
+ /** See `Renderer.setLineOverlay` for the published contract. */
106
+ setLineOverlay(channel: LineOverlayChannel, vertices: Float32Array | null): void;
125
107
  /** See `Renderer.setClashOverlapBox` for the published contract. */
126
108
  setClashOverlapBox(box: {
127
109
  min: [number, number, number];
@@ -1 +1 @@
1
- {"version":3,"file":"renderer-overlays.d.ts","sourceRoot":"","sources":["../src/renderer-overlays.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,EAA4B,KAAK,YAAY,EAAE,KAAK,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE1G,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAC5F,OAAO,EAAsB,KAAK,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAGrF,OAAO,EAAuB,KAAK,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACjF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD;;;;GAIG;AACH,MAAM,WAAW,WAAW;IACxB,qEAAqE;IACrE,cAAc,IAAI,WAAW,GAAG,IAAI,CAAC;IACrC,sEAAsE;IACtE,iCAAiC,CAAC,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACjF,gEAAgE;IAChE,qBAAqB,IAAI,IAAI,CAAC;IAC9B,4DAA4D;IAC5D,aAAa,IAAI,IAAI,CAAC;CACzB;AAED,uEAAuE;AACvE,MAAM,WAAW,kBAAkB;IAC/B,OAAO,EAAE,aAAa,CAAC;IACvB,QAAQ,EAAE,YAAY,CAAC;IACvB,iEAAiE;IACjE,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;CACxB;AAED,qBAAa,gBAAgB;IASb,OAAO,CAAC,QAAQ,CAAC,IAAI;IARjC,OAAO,CAAC,oBA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AAM,EAAE,MAAM,CAAC,CAAC;QAAC,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;KAAE,GAAG,IAAI,GACtH,IAAI;IAYP;;;OAGG;IACH,oBAAoB,CAChB,KAAK,EAAE;QAAE,QAAQ,EAAE,YAAY,CAAC;QAAC,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;KAAE,GAAG,IAAI,GAClF,IAAI;IAYP,2EAA2E;IAC3E,yBAAyB,CAAC,KAAK,EAAE,eAAe,GAAG,IAAI,GAAG,IAAI;IAM9D,yEAAyE;IACzE,uBAAuB,CAAC,KAAK,EAAE,SAAS,iBAAiB,EAAE,GAAG,IAAI;IAIlE,yEAAyE;IACzE,uBAAuB,CAAC,KAAK,EAAE,SAAS,iBAAiB,EAAE,GAAG,IAAI;IAIlE,qEAAqE;IACrE,mBAAmB,IAAI,OAAO;CAGjC"}
@@ -2,12 +2,40 @@
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 { SectionPlaneRenderer } from './section-plane.js';
5
- import { Section2DOverlayRenderer } from './section-2d-overlay.js';
5
+ import { Section2DOverlayRenderer, LINE_OVERLAY_CHANNELS, } from './section-2d-overlay.js';
6
6
  import { SymbolicOverlays } from './renderer-symbolic-overlays.js';
7
7
  import { ClashSolidPipeline } from './clash-solid-pipeline.js';
8
8
  import { aabbEdgeLineList } from './aabb-edges.js';
9
9
  import { projectedBoundsRange } from './render-section-plane.js';
10
10
  import { drawSectionOverlays } from './render-section-draw.js';
11
+ /**
12
+ * Whether setting a channel grows the scene AABB.
13
+ *
14
+ * The one behavioural difference between the four channels, and the reason
15
+ * `setLineOverlay` is a table lookup rather than a plain forward. The
16
+ * per-channel rationale is on `Renderer.setLineOverlay`, which is what
17
+ * consumers read in the emitted `.d.ts`; it is not repeated here.
18
+ *
19
+ * The rule is "does this content DEFINE the model's extent, so that a file
20
+ * containing only it must still be framable". It is NOT "is it behind a
21
+ * visibility toggle" — annotations sit behind `ifcAnnotationsVisible` too and
22
+ * they DO expand. Anyone adding a fifth channel should answer the first
23
+ * question, not the second.
24
+ *
25
+ * Known gap, pre-dating this table: `useSymbolicAnnotations` lifts IfcGrid
26
+ * geometry into the SAME buffer as the IfcAnnotation curves, so an
27
+ * annotations-off / grid-on session reaches `annotation` carrying only grid
28
+ * lines, which then expand the bounds that `grid: false` exists to protect.
29
+ * The table is keyed by channel; the policy really wants to be keyed by
30
+ * content. Routing that lift into the `grid` channel is the fix and is a
31
+ * change of its own, tracked as #3359.
32
+ */
33
+ const CHANNEL_EXPANDS_MODEL_BOUNDS = {
34
+ annotation: true,
35
+ alignment: true,
36
+ grid: false,
37
+ dxf: false,
38
+ };
11
39
  export class RendererOverlays {
12
40
  host;
13
41
  sectionPlaneRenderer = null;
@@ -65,20 +93,19 @@ export class RendererOverlays {
65
93
  // Order: fills (background) → lines (outlines on top) →
66
94
  // texts (labels above everything).
67
95
  this.symbolic.drawFills(pass, viewProj);
68
- if (this.section2DOverlayRenderer?.hasAnnotationLines3D()) {
69
- this.section2DOverlayRenderer.drawAnnotationLines3D(pass, viewProj);
70
- }
71
- if (this.section2DOverlayRenderer?.hasAlignmentLines3D()) {
72
- this.section2DOverlayRenderer.drawAlignmentLines3D(pass, viewProj);
73
- }
74
- if (this.section2DOverlayRenderer?.hasGridLines3D()) {
75
- this.section2DOverlayRenderer.drawGridLines3D(pass, viewProj);
76
- }
77
- if (this.section2DOverlayRenderer?.hasDxfLines3D()) {
78
- this.section2DOverlayRenderer.drawDxfLines3D(pass, viewProj);
79
- }
80
- if (this.section2DOverlayRenderer?.hasClashBoxLines3D()) {
81
- this.section2DOverlayRenderer.drawClashBoxLines3D(pass, viewProj);
96
+ // `LINE_OVERLAY_CHANNELS` is in draw order: annotation, alignment,
97
+ // grid, DXF. All four share the overlay colour and the line pipeline,
98
+ // so the order only decides who wins a depth tie.
99
+ const overlay = this.section2DOverlayRenderer;
100
+ if (overlay) {
101
+ for (const channel of LINE_OVERLAY_CHANNELS) {
102
+ if (overlay.hasLineOverlay(channel)) {
103
+ overlay.drawLineOverlay(pass, viewProj, channel);
104
+ }
105
+ }
106
+ if (overlay.hasClashBoxLines3D()) {
107
+ overlay.drawClashBoxLines3D(pass, viewProj);
108
+ }
82
109
  }
83
110
  // Drawn after the box/contact lines and — crucially — after every
84
111
  // ghosted (depth-non-writing) element in the main pass, so the true
@@ -97,7 +124,7 @@ export class RendererOverlays {
97
124
  // overlay geometry has to request a frame or the new drawing only
98
125
  // appears when something unrelated next dirties the viewport (#2442).
99
126
  // The two early returns below leave the geometry untouched, so they
100
- // correctly ask for nothing — matching `uploadGridLines3D` and friends.
127
+ // correctly ask for nothing — matching `setLineOverlay` before init.
101
128
  if (!this.section2DOverlayRenderer)
102
129
  return;
103
130
  if (customPlane) {
@@ -150,80 +177,25 @@ export class RendererOverlays {
150
177
  this.section2DOverlayRenderer?.setOverlayLineColor(color);
151
178
  this.host.requestRender();
152
179
  }
153
- /** See `Renderer.uploadAnnotationLines3D` for the published contract. */
154
- uploadAnnotationLines3D(vertices) {
180
+ /** See `Renderer.setLineOverlay` for the published contract. */
181
+ setLineOverlay(channel, vertices) {
155
182
  if (!this.section2DOverlayRenderer)
156
183
  return;
157
- this.section2DOverlayRenderer.uploadAnnotationLines3D(vertices);
158
- // Contribute annotation extents to modelBounds + camera sceneBounds
159
- // so an annotation-only model (no IfcProduct meshes — common for
160
- // separate "annotation sheets") gets framed by Home / fit-to-view
161
- // AND has correct near/far clipping. Without sceneBounds the camera
162
- // frustum doesn't include the annotation cluster and they're clipped
163
- // away even when the camera is pointed at them. Mirror the
164
- // point-cloud upload path (`addPointClouds`, `setPointClouds`) which
165
- // does the same thing.
166
- this.host.expandModelBoundsWithFlatVertices(vertices, 3);
167
- this.host.syncCameraSceneBounds();
168
- this.host.requestRender();
169
- }
170
- /** See `Renderer.clearAnnotationLines3D` for the published contract. */
171
- clearAnnotationLines3D() {
172
- if (this.section2DOverlayRenderer) {
173
- this.section2DOverlayRenderer.clearAnnotationLines3D();
174
- this.host.requestRender();
184
+ this.section2DOverlayRenderer.setLineOverlay(channel, vertices);
185
+ if (vertices !== null && CHANNEL_EXPANDS_MODEL_BOUNDS[channel]) {
186
+ // Mirrors the point-cloud upload path (`addPointClouds`,
187
+ // `setPointClouds`): without `syncCameraSceneBounds` the frustum
188
+ // excludes the cluster and it is clipped away even when the camera
189
+ // points straight at it. See CHANNEL_EXPANDS_MODEL_BOUNDS.
190
+ this.host.expandModelBoundsWithFlatVertices(vertices, 3);
191
+ this.host.syncCameraSceneBounds();
175
192
  }
176
- }
177
- /** See `Renderer.uploadAlignmentLines3D` for the published contract. */
178
- uploadAlignmentLines3D(vertices) {
179
- if (!this.section2DOverlayRenderer)
180
- return;
181
- this.section2DOverlayRenderer.uploadAlignmentLines3D(vertices);
182
- // Frame alignment-only files the same way annotation overlays are
183
- // framed (see uploadAnnotationLines3D).
184
- this.host.expandModelBoundsWithFlatVertices(vertices, 3);
185
- this.host.syncCameraSceneBounds();
193
+ // Rendering is dirty-flag gated (#2442): a channel that changed has to
194
+ // ask for a frame or the change waits for something unrelated to
195
+ // dirty the viewport. Clearing counts as a change; a pre-init call
196
+ // returns above without asking, because it changed nothing.
186
197
  this.host.requestRender();
187
198
  }
188
- /** See `Renderer.clearAlignmentLines3D` for the published contract. */
189
- clearAlignmentLines3D() {
190
- if (this.section2DOverlayRenderer) {
191
- this.section2DOverlayRenderer.clearAlignmentLines3D();
192
- this.host.requestRender();
193
- }
194
- }
195
- /**
196
- * See `Renderer.uploadGridLines3D` for the published contract. Unlike
197
- * alignment, grids do NOT expand model bounds: they're behind a visibility
198
- * toggle, so toggling them on must not reframe the camera.
199
- */
200
- uploadGridLines3D(vertices) {
201
- if (!this.section2DOverlayRenderer)
202
- return;
203
- this.section2DOverlayRenderer.uploadGridLines3D(vertices);
204
- this.host.requestRender();
205
- }
206
- /** See `Renderer.clearGridLines3D` for the published contract. */
207
- clearGridLines3D() {
208
- if (this.section2DOverlayRenderer) {
209
- this.section2DOverlayRenderer.clearGridLines3D();
210
- this.host.requestRender();
211
- }
212
- }
213
- /** See `Renderer.uploadDxfLines3D` for the published contract. */
214
- uploadDxfLines3D(vertices) {
215
- if (!this.section2DOverlayRenderer)
216
- return;
217
- this.section2DOverlayRenderer.uploadDxfLines3D(vertices);
218
- this.host.requestRender();
219
- }
220
- /** See `Renderer.clearDxfLines3D` for the published contract. */
221
- clearDxfLines3D() {
222
- if (this.section2DOverlayRenderer) {
223
- this.section2DOverlayRenderer.clearDxfLines3D();
224
- this.host.requestRender();
225
- }
226
- }
227
199
  /** See `Renderer.setClashOverlapBox` for the published contract. */
228
200
  setClashOverlapBox(box) {
229
201
  if (!this.section2DOverlayRenderer)
@@ -1 +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,kBAAkB,EAAwB,MAAM,2BAA2B,CAAC;AACrF,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;IASI;IARrB,oBAAoB,GAAgC,IAAI,CAAC;IACzD,wBAAwB,GAAoC,IAAI,CAAC;IACzE,8DAA8D;IAC9D,+EAA+E;IACvE,gBAAgB,GAA8C,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CA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AC9B,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"}
@@ -44,9 +44,36 @@ export declare class SymbolicOverlays {
44
44
  drawFills(pass: GPURenderPassEncoder, viewProj: Float32Array): void;
45
45
  /** Label layer: painted after everything else. */
46
46
  drawTexts(pass: GPURenderPassEncoder, viewProj: Float32Array, canvasWidth: number, canvasHeight: number, camera: Camera): void;
47
- /** See `Renderer.uploadAnnotationFills3D` for the published contract. */
47
+ /**
48
+ * See `Renderer.uploadAnnotationFills3D` for the published contract.
49
+ *
50
+ * `definesExtent: false` draws the fill without letting it grow the scene
51
+ * AABB (#3359). This is the fill half of the policy `setLineOverlay` keys
52
+ * by channel: `grid` lines are excluded from the bounds because a grid is a
53
+ * reference layer that routinely reaches past the model envelope, and
54
+ * framing the camera on it is what #967 removed. Grid BUBBLES are fills and
55
+ * texts, not lines, so they never passed through that table at all — with
56
+ * annotations off and the grid on, a perfect line routing still reframed
57
+ * the camera on the bubbles, which sit a fixed offset beyond each axis
58
+ * endpoint (BUBBLE_OFFSET_M in rust/processing/src/symbolic/grid.rs) and
59
+ * are therefore the outermost grid content there is.
60
+ *
61
+ * Per ITEM rather than per call because `upload` REPLACES the whole array
62
+ * TODAY: these two pipelines each own one buffer, so one annotation call
63
+ * plus one grid call is not something a caller can currently do and the
64
+ * declaration has to travel with the item. That is a property of the
65
+ * present pipeline, not of the problem. The shape that removes this flag
66
+ * is a channel-keyed upload matching `setLineOverlay(channel, ...)`, which
67
+ * would answer from `CHANNEL_EXPANDS_MODEL_BOUNDS` alone; it needs
68
+ * per-channel buffers and a draw per channel, so it is deliberately not
69
+ * this change. Default true, so every caller that says nothing keeps the
70
+ * old behaviour exactly.
71
+ */
48
72
  uploadFills(fills: readonly SymbolicFillInput[]): void;
49
- /** See `Renderer.uploadAnnotationTexts3D` for the published contract. */
73
+ /**
74
+ * See `Renderer.uploadAnnotationTexts3D` for the published contract, and
75
+ * `uploadFills` above for what `definesExtent: false` is for (#3359).
76
+ */
50
77
  uploadTexts(texts: readonly SymbolicTextInput[]): void;
51
78
  }
52
79
  //# sourceMappingURL=renderer-symbolic-overlays.d.ts.map
@@ -1 +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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AoB,EAC1B,QAAQ,EAAE,YAAY,EACtB,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,MAAM,GACf,IAAI;IAqCP;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,WAAW,CAAC,KAAK,EAAE,SAAS,iBAAiB,EAAE,GAAG,IAAI;IA0BtD;;;OAGG;IACH,WAAW,CAAC,KAAK,EAAE,SAAS,iBAAiB,EAAE,GAAG,IAAI;CA0BzD"}
@@ -68,15 +68,39 @@ export class SymbolicOverlays {
68
68
  const basis = viewBasis(camera.getPosition(), camera.getTarget(), camera.getUp());
69
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
70
  }
71
- /** See `Renderer.uploadAnnotationFills3D` for the published contract. */
71
+ /**
72
+ * See `Renderer.uploadAnnotationFills3D` for the published contract.
73
+ *
74
+ * `definesExtent: false` draws the fill without letting it grow the scene
75
+ * AABB (#3359). This is the fill half of the policy `setLineOverlay` keys
76
+ * by channel: `grid` lines are excluded from the bounds because a grid is a
77
+ * reference layer that routinely reaches past the model envelope, and
78
+ * framing the camera on it is what #967 removed. Grid BUBBLES are fills and
79
+ * texts, not lines, so they never passed through that table at all — with
80
+ * annotations off and the grid on, a perfect line routing still reframed
81
+ * the camera on the bubbles, which sit a fixed offset beyond each axis
82
+ * endpoint (BUBBLE_OFFSET_M in rust/processing/src/symbolic/grid.rs) and
83
+ * are therefore the outermost grid content there is.
84
+ *
85
+ * Per ITEM rather than per call because `upload` REPLACES the whole array
86
+ * TODAY: these two pipelines each own one buffer, so one annotation call
87
+ * plus one grid call is not something a caller can currently do and the
88
+ * declaration has to travel with the item. That is a property of the
89
+ * present pipeline, not of the problem. The shape that removes this flag
90
+ * is a channel-keyed upload matching `setLineOverlay(channel, ...)`, which
91
+ * would answer from `CHANNEL_EXPANDS_MODEL_BOUNDS` alone; it needs
92
+ * per-channel buffers and a draw per channel, so it is deliberately not
93
+ * this change. Default true, so every caller that says nothing keeps the
94
+ * old behaviour exactly.
95
+ */
72
96
  uploadFills(fills) {
73
97
  if (!this.fillPipeline)
74
98
  return;
75
99
  this.fillPipeline.upload(fills);
76
- // Contribute fill extents to modelBounds — see uploadAnnotationLines3D.
100
+ let expanded = false;
77
101
  for (const fill of fills) {
78
102
  const pts = fill.points;
79
- if (pts.length === 0)
103
+ if (pts.length === 0 || fill.definesExtent === false)
80
104
  continue;
81
105
  // points are flat [x,z,x,z,...]; lift to (x, fill.worldY, z) per
82
106
  // vertex so we expand bounds in the same world space the renderer draws in.
@@ -87,26 +111,47 @@ export class SymbolicOverlays {
87
111
  lifted[j + 2] = pts[i + 1];
88
112
  }
89
113
  this.host.expandModelBoundsWithFlatVertices(lifted, 3);
114
+ expanded = true;
90
115
  }
91
- this.host.syncCameraSceneBounds();
116
+ // Only re-fit the camera when something actually moved the bounds. The
117
+ // old code synced on every call including a clear, which pushed an
118
+ // unchanged AABB back at the camera; `setLineOverlay` has always been
119
+ // conditional this way.
120
+ if (expanded)
121
+ this.host.syncCameraSceneBounds();
92
122
  this.host.requestRender();
93
123
  }
94
- /** See `Renderer.uploadAnnotationTexts3D` for the published contract. */
124
+ /**
125
+ * See `Renderer.uploadAnnotationTexts3D` for the published contract, and
126
+ * `uploadFills` above for what `definesExtent: false` is for (#3359).
127
+ */
95
128
  uploadTexts(texts) {
96
129
  if (!this.textPipeline)
97
130
  return;
98
131
  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);
132
+ // A clear allocates nothing. Main guarded this behind `texts.length > 0`
133
+ // and the rewrite lost it, which matters here: "every text waived" is
134
+ // this change's own scenario (annotations off, grid on).
135
+ if (texts.length === 0) {
136
+ this.host.requestRender();
137
+ return;
138
+ }
139
+ // Text origins are single points. Written straight into a worst-case
140
+ // buffer and passed on as a subarray: filtering first would allocate a
141
+ // second array holding every framing text just to read its length, and
142
+ // annotation-heavy models push thousands.
143
+ const buf = new Float32Array(texts.length * 3);
144
+ let n = 0;
145
+ for (const t of texts) {
146
+ if (t.definesExtent === false)
147
+ continue;
148
+ buf[n * 3 + 0] = t.worldPos[0];
149
+ buf[n * 3 + 1] = t.worldPos[1];
150
+ buf[n * 3 + 2] = t.worldPos[2];
151
+ n++;
152
+ }
153
+ if (n > 0) {
154
+ this.host.expandModelBoundsWithFlatVertices(buf.subarray(0, n * 3), 3);
110
155
  this.host.syncCameraSceneBounds();
111
156
  }
112
157
  this.host.requestRender();
@@ -1 +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,C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a,KAAK,KAAK;gBAAE,SAAS;YACxC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YAC/B,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YAC/B,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YAC/B,CAAC,EAAE,CAAC;QACR,CAAC;QACD,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;YACR,IAAI,CAAC,IAAI,CAAC,iCAAiC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;YACvE,IAAI,CAAC,IAAI,CAAC,qBAAqB,EAAE,CAAC;QACtC,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;IAC9B,CAAC;CACJ"}
@@ -0,0 +1,132 @@
1
+ /**
2
+ * `SceneContents` — the scene surface `Renderer.getScene()` hands across the
3
+ * package boundary.
4
+ *
5
+ * WHY THIS EXISTS: `getScene()` used to return the `Scene` class itself. `Scene`
6
+ * is 4400+ lines, so a consumer of `@ifc-lite/renderer` had to learn `Renderer`
7
+ * PLUS the whole of `Scene` — and every method added to `Scene` silently became
8
+ * published API. This interface freezes that leak at its measured width.
9
+ *
10
+ * HOW THE MEMBER LIST WAS CHOSEN: it is not a design sketch, it is a
11
+ * measurement. Every `renderer.getScene()` call site in `apps/viewer` and
12
+ * `apps/viewer-embed` was resolved with the TypeScript checker and the returned
13
+ * value followed through locals, class fields, object-literal properties,
14
+ * parameters and function returns until it was dereferenced; the members below
15
+ * are exactly the ones something outside `packages/renderer/src` reaches for.
16
+ *
17
+ * ADDING A MEMBER IS A DECISION, NOT A DETAIL. A new entry here is a new
18
+ * published API for `@ifc-lite/renderer` and cannot be taken back without a
19
+ * major bump. Add one when a caller genuinely needs it — not because `Scene`
20
+ * already has it.
21
+ *
22
+ * `Scene` is NOT declared `implements SceneContents`: an `implements` clause
23
+ * would let the class's own surface drift wider without the interface noticing,
24
+ * which is the thing this file exists to stop. The check that the class still
25
+ * satisfies this shape is the `return this.scene` in `Renderer.getScene()`.
26
+ *
27
+ * Be precise about what that catches, because it is less than it looks: a
28
+ * REMOVED member or an incompatible RETURN type. It does not catch a parameter
29
+ * turning required, because assignability checks arity rather than optionality,
30
+ * and method parameters stay bivariant even under `strict`. Five members here
31
+ * declare optional parameters (`getMeshDataPieces`, `appendToBatches`,
32
+ * `finalizeStreamingAsync`, `processResidencyRestores`, `addInstancedShard`)
33
+ * and are unguarded in that direction.
34
+ *
35
+ * `GPUDevice` and `RenderPipeline` stay concrete in these signatures on
36
+ * purpose. Callers never reach into either one; they take the handles from
37
+ * `getGPUDevice()` / `getPipeline()` and hand them straight back to the upload
38
+ * methods here. Replacing them with narrower stand-ins would only be honest if
39
+ * `Scene`'s own signatures were narrowed too, which is a different change.
40
+ */
41
+ import type { Mesh, BatchedMesh } from './types.js';
42
+ import type { MeshData, DecodedInstancedShard } from '@ifc-lite/geometry';
43
+ import type { RenderPipeline } from './pipeline.js';
44
+ import type { BoundingBox } from './scene-raycaster.js';
45
+ import type { ResidentGpuBytes } from './render-stats.js';
46
+ import type { ColdGeometryProvider } from './residency.js';
47
+ import type { SpatialChunkingConfig } from './chunk-grid.js';
48
+ /** The measured external scene surface. See the module doc before widening. */
49
+ export interface SceneContents {
50
+ queueMeshes(meshes: MeshData[]): void;
51
+ hasQueuedMeshes(): boolean;
52
+ flushPending(device: GPUDevice, pipeline: RenderPipeline): boolean;
53
+ appendToBatches(meshDataArray: MeshData[], device: GPUDevice, pipeline: RenderPipeline, isStreaming?: boolean): void;
54
+ hasPendingBatches(): boolean;
55
+ rebuildPendingBatches(device: GPUDevice, pipeline: RenderPipeline): void;
56
+ hasStreamingFragments(): boolean;
57
+ finalizeStreaming(device: GPUDevice, pipeline: RenderPipeline): void;
58
+ finalizeStreamingAsync(device: GPUDevice, pipeline: RenderPipeline, budgetMs?: number): Promise<void>;
59
+ isFinalizeInProgress(): boolean;
60
+ setEphemeralStreamingMode(enabled: boolean): void;
61
+ isEphemeralStreaming(): boolean;
62
+ finishEphemeralStreaming(): void;
63
+ getMeshes(): Mesh[];
64
+ getBatchedMeshes(): BatchedMesh[];
65
+ getMeshDataPieces(expressId: number, modelIndex?: number): MeshData[] | undefined;
66
+ /**
67
+ * O(1) "is this id in the flat mesh map" — the presence question, without
68
+ * `getMeshDataPieces`' per-entity extraction out of a colour-merged batch.
69
+ * Pair it with `isInstancedEntity` to ask the same thing of both geometry
70
+ * paths (`useColorOverlaySync` does, per settled geometry batch).
71
+ */
72
+ hasMeshData(expressId: number, modelIndex?: number): boolean;
73
+ getAllMeshDataExpressIds(): number[];
74
+ getBounds(): {
75
+ min: {
76
+ x: number;
77
+ y: number;
78
+ z: number;
79
+ };
80
+ max: {
81
+ x: number;
82
+ y: number;
83
+ z: number;
84
+ };
85
+ } | null;
86
+ getEntityBoundingBox(expressId: number): BoundingBox | null;
87
+ addInstancedShard(device: GPUDevice, shard: DecodedInstancedShard, modelIndex?: number): void;
88
+ getAllInstancedMeshData(): MeshData[];
89
+ getInstancedMeshDataPieces(expressId: number): MeshData[] | undefined;
90
+ /**
91
+ * O(1) instanced-membership test. `getInstancedMeshDataPieces` MATERIALIZES
92
+ * world-space triangles per occurrence, so it is never the right way to ask
93
+ * whether an id exists.
94
+ */
95
+ isInstancedEntity(expressId: number): boolean;
96
+ getInstancedEntityBounds(expressId: number): BoundingBox | null;
97
+ getInstancedEntityCount(): number;
98
+ getInstancedEntityIds(): IterableIterator<number>;
99
+ getInstancedModelIndices(): number[];
100
+ removeInstancedTemplatesForModel(modelIndex: number): number;
101
+ setInstancedVisible(visible: boolean): void;
102
+ removeMeshesForEntities(expressIds: Iterable<number>): number;
103
+ translateMeshesForEntities(updates: Map<number, [number, number, number]>): number;
104
+ rotateMeshesForEntities(updates: Map<number, {
105
+ angle: number;
106
+ pivot: [number, number, number];
107
+ }>): number;
108
+ setColorOverrides(overrides: Map<number, [number, number, number, number]>, device: GPUDevice, pipeline: RenderPipeline): void;
109
+ /**
110
+ * The overrides currently installed, or null when nothing is painted. The
111
+ * store's `pendingColorUpdates` is a one-shot signal that is nulled after it
112
+ * flushes, so this retained map is the only readable record of what is
113
+ * painted — `useColorOverlaySync` re-hands it back to `setColorOverrides` so
114
+ * meshes that streamed in after the flush get their colour (#3890).
115
+ */
116
+ getColorOverrides(): ReadonlyMap<number, readonly [number, number, number, number]> | null;
117
+ clearColorOverrides(): void;
118
+ updateMeshColors(updates: Map<number, [number, number, number, number]>, device: GPUDevice, pipeline: RenderPipeline): void;
119
+ setSpatialChunking(config: SpatialChunkingConfig | null): void;
120
+ setLodBuildsEnabled(enabled: boolean): void;
121
+ setHostResidencyBudget(bytes: number | null): void;
122
+ setGpuResidencyBudget(bytes: number | null): void;
123
+ setColdGeometryProvider(provider: ColdGeometryProvider | null): void;
124
+ hasResidencyRestoreWork(): boolean;
125
+ processResidencyRestores(device: GPUDevice, pipeline: RenderPipeline, budgetMs?: number): number;
126
+ drainColdTier(): Promise<void>;
127
+ getResidentCpuBytes(): number;
128
+ getResidentGpuBytes(): ResidentGpuBytes;
129
+ clearFlatGeometry(): void;
130
+ clear(): void;
131
+ }
132
+ //# sourceMappingURL=scene-contents.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scene-contents.d.ts","sourceRoot":"","sources":["../src/scene-contents.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAA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ACrE,uBAAuB,IAAI,OAAO,CAAC;IACnC,wBAAwB,CACtB,MAAM,EAAE,SAAS,EACjB,QAAQ,EAAE,cAAc,EACxB,QAAQ,CAAC,EAAE,MAAM,GAChB,MAAM,CAAC;IACV,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,mBAAmB,IAAI,MAAM,CAAC;IAC9B,mBAAmB,IAAI,gBAAgB,CAAC;IAGxC,iBAAiB,IAAI,IAAI,CAAC;IAC1B,KAAK,IAAI,IAAI,CAAC;CACf"}
@@ -0,0 +1,5 @@
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
+ export {};
5
+ //# sourceMappingURL=scene-contents.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scene-contents.js","sourceRoot":"","sources":["../src/scene-contents.ts"],"names":[],"mappings":"AAAA;;+DAE+D"}