@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.
- package/dist/camera-animation.d.ts +20 -32
- package/dist/camera-animation.d.ts.map +1 -1
- package/dist/camera-animation.js +71 -358
- package/dist/camera-animation.js.map +1 -1
- package/dist/camera-controls.d.ts +11 -51
- package/dist/camera-controls.d.ts.map +1 -1
- package/dist/camera-controls.js +140 -12
- package/dist/camera-controls.js.map +1 -1
- package/dist/camera-first-person.d.ts +52 -0
- package/dist/camera-first-person.d.ts.map +1 -0
- package/dist/camera-first-person.js +119 -0
- package/dist/camera-first-person.js.map +1 -0
- package/dist/camera-fit-policy.d.ts.map +1 -1
- package/dist/camera-fit-policy.js +18 -7
- package/dist/camera-fit-policy.js.map +1 -1
- package/dist/camera-framing.d.ts +86 -0
- package/dist/camera-framing.d.ts.map +1 -0
- package/dist/camera-framing.js +230 -0
- package/dist/camera-framing.js.map +1 -0
- package/dist/camera-guards.d.ts +148 -0
- package/dist/camera-guards.d.ts.map +1 -0
- package/dist/camera-guards.js +150 -0
- package/dist/camera-guards.js.map +1 -0
- package/dist/camera-matrices.d.ts +14 -0
- package/dist/camera-matrices.d.ts.map +1 -0
- package/dist/camera-matrices.js +146 -0
- package/dist/camera-matrices.js.map +1 -0
- package/dist/camera-preset-view.d.ts +56 -0
- package/dist/camera-preset-view.d.ts.map +1 -0
- package/dist/camera-preset-view.js +180 -0
- package/dist/camera-preset-view.js.map +1 -0
- package/dist/camera-projection.d.ts +1 -1
- package/dist/camera-projection.d.ts.map +1 -1
- package/dist/camera-projection.js +83 -30
- package/dist/camera-projection.js.map +1 -1
- package/dist/camera-state.d.ts +62 -0
- package/dist/camera-state.d.ts.map +1 -0
- package/dist/camera-state.js +5 -0
- package/dist/camera-state.js.map +1 -0
- package/dist/camera.d.ts +22 -11
- package/dist/camera.d.ts.map +1 -1
- package/dist/camera.js +110 -85
- package/dist/camera.js.map +1 -1
- package/dist/deviation/deviation-pipeline.d.ts.map +1 -1
- package/dist/deviation/deviation-pipeline.js +21 -4
- package/dist/deviation/deviation-pipeline.js.map +1 -1
- package/dist/environment.d.ts.map +1 -1
- package/dist/environment.js +23 -1
- package/dist/environment.js.map +1 -1
- package/dist/index.d.ts +333 -43
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +753 -704
- package/dist/index.js.map +1 -1
- package/dist/math.d.ts +59 -2
- package/dist/math.d.ts.map +1 -1
- package/dist/math.js +173 -23
- package/dist/math.js.map +1 -1
- package/dist/model-bounds-tracker.d.ts +96 -0
- package/dist/model-bounds-tracker.d.ts.map +1 -0
- package/dist/model-bounds-tracker.js +147 -0
- package/dist/model-bounds-tracker.js.map +1 -0
- package/dist/pointcloud/point-cloud-node.d.ts.map +1 -1
- package/dist/pointcloud/point-cloud-node.js +24 -4
- package/dist/pointcloud/point-cloud-node.js.map +1 -1
- package/dist/render-degradation.d.ts +77 -0
- package/dist/render-degradation.d.ts.map +1 -0
- package/dist/render-degradation.js +52 -0
- package/dist/render-degradation.js.map +1 -0
- package/dist/render-section-draw.d.ts +51 -0
- package/dist/render-section-draw.d.ts.map +1 -0
- package/dist/render-section-draw.js +66 -0
- package/dist/render-section-draw.js.map +1 -0
- package/dist/render-section-plane.d.ts +128 -0
- package/dist/render-section-plane.d.ts.map +1 -0
- package/dist/render-section-plane.js +298 -0
- package/dist/render-section-plane.js.map +1 -0
- package/dist/renderer-overlays.d.ts +144 -0
- package/dist/renderer-overlays.d.ts.map +1 -0
- package/dist/renderer-overlays.js +257 -0
- package/dist/renderer-overlays.js.map +1 -0
- package/dist/renderer-symbolic-overlays.d.ts +52 -0
- package/dist/renderer-symbolic-overlays.d.ts.map +1 -0
- package/dist/renderer-symbolic-overlays.js +115 -0
- package/dist/renderer-symbolic-overlays.js.map +1 -0
- package/dist/scene-geometry.d.ts +32 -0
- package/dist/scene-geometry.d.ts.map +1 -1
- package/dist/scene-geometry.js +66 -0
- package/dist/scene-geometry.js.map +1 -1
- package/dist/scene.d.ts +86 -1
- package/dist/scene.d.ts.map +1 -1
- package/dist/scene.js +391 -201
- package/dist/scene.js.map +1 -1
- package/dist/section-2d-lift.d.ts +105 -0
- package/dist/section-2d-lift.d.ts.map +1 -0
- package/dist/section-2d-lift.js +162 -0
- package/dist/section-2d-lift.js.map +1 -0
- package/dist/section-2d-line-buffer.d.ts +58 -0
- package/dist/section-2d-line-buffer.d.ts.map +1 -0
- package/dist/section-2d-line-buffer.js +109 -0
- package/dist/section-2d-line-buffer.js.map +1 -0
- package/dist/section-2d-overlay.d.ts +43 -75
- package/dist/section-2d-overlay.d.ts.map +1 -1
- package/dist/section-2d-overlay.js +189 -559
- package/dist/section-2d-overlay.js.map +1 -1
- package/dist/section-plane-basis.d.ts +22 -3
- package/dist/section-plane-basis.d.ts.map +1 -1
- package/dist/section-plane-basis.js +51 -10
- package/dist/section-plane-basis.js.map +1 -1
- package/dist/section-plane.d.ts.map +1 -1
- package/dist/section-plane.js +10 -1
- package/dist/section-plane.js.map +1 -1
- package/dist/shaders/section-2d-overlay.wgsl.d.ts +102 -0
- package/dist/shaders/section-2d-overlay.wgsl.d.ts.map +1 -0
- package/dist/shaders/section-2d-overlay.wgsl.js +281 -0
- package/dist/shaders/section-2d-overlay.wgsl.js.map +1 -0
- package/dist/visual-enhancement.d.ts +33 -0
- package/dist/visual-enhancement.d.ts.map +1 -0
- package/dist/visual-enhancement.js +46 -0
- package/dist/visual-enhancement.js.map +1 -0
- package/package.json +4 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"point-cloud-node.js","sourceRoot":"","sources":["../../src/pointcloud/point-cloud-node.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAY/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AA0DxE;;;;;;;;;GASG;AACH;;;;;;;;;;;GAWG;AACH,MAAM,UA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}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* When "degrade this frame" has stopped being a transient blip (issue #2417).
|
|
3
|
+
*
|
|
4
|
+
* `Renderer.render()` deliberately does NOT latch on a throw that is not a
|
|
5
|
+
* device-loss signal: a `RangeError` from a buffer the host cannot back happens
|
|
6
|
+
* on a perfectly healthy device, and turning it into a permanent stop would kill
|
|
7
|
+
* a live session (see `isDeviceLossThrow`). The cost of that choice is that a
|
|
8
|
+
* failure which never clears looks exactly like one that did: the viewport is
|
|
9
|
+
* wedged, and nothing anywhere says so.
|
|
10
|
+
*
|
|
11
|
+
* This is the "and it never cleared" signal — the policy only, kept out of the
|
|
12
|
+
* renderer so the threshold has a home that can be read and tested on its own.
|
|
13
|
+
*/
|
|
14
|
+
/** Payload of `Renderer.onPersistentRenderDegradation`. */
|
|
15
|
+
export interface RenderDegradationInfo {
|
|
16
|
+
/**
|
|
17
|
+
* Degraded frames in an UNBROKEN run — counted since the last frame that
|
|
18
|
+
* completed, and reset to zero by any frame that does.
|
|
19
|
+
*
|
|
20
|
+
* Consecutive, never cumulative, and the distinction is the whole signal:
|
|
21
|
+
* a renderer-lifetime total would also be reached by isolated failures
|
|
22
|
+
* spread across an hour of otherwise healthy rendering, each of which
|
|
23
|
+
* recovered on the next frame. Those are exactly the transient host-memory
|
|
24
|
+
* spikes the non-latching branch exists to absorb silently, and reporting
|
|
25
|
+
* them would fire this on the wrong population while telling us nothing new
|
|
26
|
+
* about the wedged viewports it was built for.
|
|
27
|
+
*/
|
|
28
|
+
consecutiveDegradedFrames: number;
|
|
29
|
+
/** Message of the throw that crossed the threshold. */
|
|
30
|
+
detail: string;
|
|
31
|
+
/**
|
|
32
|
+
* Which region of the frame the crossing throw came from: `frame` is
|
|
33
|
+
* everything outside the encode body (canvas resize, context setup,
|
|
34
|
+
* evicted-batch restore), `encode` is the command-encoder region — the one
|
|
35
|
+
* that had no device discrimination at all before #2417.
|
|
36
|
+
*/
|
|
37
|
+
origin: 'frame' | 'encode';
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* CONSECUTIVE degraded frames before a viewport is called persistently
|
|
41
|
+
* degraded — i.e. frames that all failed with not one success between them.
|
|
42
|
+
*
|
|
43
|
+
* Derived from the retry budget rather than picked: `render()` re-requests at
|
|
44
|
+
* most `MAX_DEGRADED_SELF_RETRIES` (3) frames after a failure and then goes
|
|
45
|
+
* quiet, so the renderer can drive at most four consecutive degraded frames on
|
|
46
|
+
* its own — the one that failed plus its three self-retries. Past that, every
|
|
47
|
+
* further frame in the run was driven back in by the app's own dirty signals
|
|
48
|
+
* (interaction, streaming, animation) and failed again, having never once
|
|
49
|
+
* succeeded in between. Four times that budget is a dozen externally-driven
|
|
50
|
+
* frames that all failed: "this viewport is not recovering", not "a transient
|
|
51
|
+
* host-memory spike", which is exactly what the retry budget absorbs silently.
|
|
52
|
+
*/
|
|
53
|
+
export declare const PERSISTENT_DEGRADATION_FRAMES = 16;
|
|
54
|
+
/**
|
|
55
|
+
* Once-per-session latch over the consecutive-degraded-frame count. Holds no
|
|
56
|
+
* counter of its own — the renderer already tracks the run in
|
|
57
|
+
* `consecutiveDegradedFrames`, which its own reset-on-success is responsible
|
|
58
|
+
* for, and a second counter here would be a second truth that can drift out of
|
|
59
|
+
* step with that reset.
|
|
60
|
+
*/
|
|
61
|
+
export declare class RenderDegradationMonitor {
|
|
62
|
+
private reported;
|
|
63
|
+
/**
|
|
64
|
+
* Record a degraded frame.
|
|
65
|
+
*
|
|
66
|
+
* @param consecutiveDegradedFrames length of the CURRENT unbroken run of
|
|
67
|
+
* degraded frames, as reset by the renderer on any frame that
|
|
68
|
+
* completes. Passing a lifetime total here would silently turn this
|
|
69
|
+
* into "the Nth failure ever", which fires on sessions that
|
|
70
|
+
* recovered every time.
|
|
71
|
+
* @returns the report payload when THIS frame crossed the threshold, and
|
|
72
|
+
* `null` every other time — before the crossing and, because the
|
|
73
|
+
* latch is permanent, ever after it.
|
|
74
|
+
*/
|
|
75
|
+
note(consecutiveDegradedFrames: number, detail: string, origin: 'frame' | 'encode'): RenderDegradationInfo | null;
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=render-degradation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render-degradation.d.ts","sourceRoot":"","sources":["../src/render-degradation.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,2DAA2D;AAC3D,MAAM,WAAW,qBAAqB;IAClC;;;;;;;;;;;OAWG;IACH,yBAAyB,EAAE,MAAM,CAAC;IAClC,uDAAuD;IACvD,MAAM,EAAE,MAAM,CAAC;IACf;;;;;OAKG;IACH,MAAM,EAAE,OAAO,GAAG,QAAQ,CAAC;CAC9B;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,6BAA6B,KAAK,CAAC;AAEhD;;;;;;GAMG;AACH,qBAAa,wBAAwB;IACjC,OAAO,CAAC,QAAQ,CAAS;IAEzB;;;;;;;;;;;OAWG;IACH,IAAI,CACA,yBAAyB,EAAE,MAAM,EACjC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,OAAO,GAAG,QAAQ,GAC3B,qBAAqB,GAAG,IAAI;CASlC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
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
|
+
/**
|
|
5
|
+
* CONSECUTIVE degraded frames before a viewport is called persistently
|
|
6
|
+
* degraded — i.e. frames that all failed with not one success between them.
|
|
7
|
+
*
|
|
8
|
+
* Derived from the retry budget rather than picked: `render()` re-requests at
|
|
9
|
+
* most `MAX_DEGRADED_SELF_RETRIES` (3) frames after a failure and then goes
|
|
10
|
+
* quiet, so the renderer can drive at most four consecutive degraded frames on
|
|
11
|
+
* its own — the one that failed plus its three self-retries. Past that, every
|
|
12
|
+
* further frame in the run was driven back in by the app's own dirty signals
|
|
13
|
+
* (interaction, streaming, animation) and failed again, having never once
|
|
14
|
+
* succeeded in between. Four times that budget is a dozen externally-driven
|
|
15
|
+
* frames that all failed: "this viewport is not recovering", not "a transient
|
|
16
|
+
* host-memory spike", which is exactly what the retry budget absorbs silently.
|
|
17
|
+
*/
|
|
18
|
+
export const PERSISTENT_DEGRADATION_FRAMES = 16;
|
|
19
|
+
/**
|
|
20
|
+
* Once-per-session latch over the consecutive-degraded-frame count. Holds no
|
|
21
|
+
* counter of its own — the renderer already tracks the run in
|
|
22
|
+
* `consecutiveDegradedFrames`, which its own reset-on-success is responsible
|
|
23
|
+
* for, and a second counter here would be a second truth that can drift out of
|
|
24
|
+
* step with that reset.
|
|
25
|
+
*/
|
|
26
|
+
export class RenderDegradationMonitor {
|
|
27
|
+
reported = false;
|
|
28
|
+
/**
|
|
29
|
+
* Record a degraded frame.
|
|
30
|
+
*
|
|
31
|
+
* @param consecutiveDegradedFrames length of the CURRENT unbroken run of
|
|
32
|
+
* degraded frames, as reset by the renderer on any frame that
|
|
33
|
+
* completes. Passing a lifetime total here would silently turn this
|
|
34
|
+
* into "the Nth failure ever", which fires on sessions that
|
|
35
|
+
* recovered every time.
|
|
36
|
+
* @returns the report payload when THIS frame crossed the threshold, and
|
|
37
|
+
* `null` every other time — before the crossing and, because the
|
|
38
|
+
* latch is permanent, ever after it.
|
|
39
|
+
*/
|
|
40
|
+
note(consecutiveDegradedFrames, detail, origin) {
|
|
41
|
+
if (this.reported)
|
|
42
|
+
return null;
|
|
43
|
+
// `>=`, not `===`: the renderer is not obliged to call this on every
|
|
44
|
+
// single degraded frame, and a run that steps over the threshold must
|
|
45
|
+
// still report rather than sail past it forever.
|
|
46
|
+
if (consecutiveDegradedFrames < PERSISTENT_DEGRADATION_FRAMES)
|
|
47
|
+
return null;
|
|
48
|
+
this.reported = true;
|
|
49
|
+
return { consecutiveDegradedFrames, detail, origin };
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=render-degradation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render-degradation.js","sourceRoot":"","sources":["../src/render-degradation.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AA0C/D;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,EAAE,CAAC;AAEhD;;;;;;GAMG;AACH,MAAM,OAAO,wBAAwB;IACzB,QAAQ,GAAG,KAAK,CAAC;IAEzB;;;;;;;;;;;OAWG;IACH,IAAI,CACA,yBAAiC,EACjC,MAAc,EACd,MAA0B;QAE1B,IAAI,IAAI,CAAC,QAAQ;YAAE,OAAO,IAAI,CAAC;QAC/B,qEAAqE;QACrE,sEAAsE;QACtE,iDAAiD;QACjD,IAAI,yBAAyB,GAAG,6BAA6B;YAAE,OAAO,IAAI,CAAC;QAC3E,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QACrB,OAAO,EAAE,yBAAyB,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IACzD,CAAC;CACJ"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The section feature's DRAW half, lifted verbatim out of
|
|
3
|
+
* `RendererOverlays.draw()` (issue #2451 review).
|
|
4
|
+
*
|
|
5
|
+
* `render-section-plane.ts` is the "what does this frame CLIP against, and over
|
|
6
|
+
* what range" half; this is its mirror: "what does this frame DRAW for the
|
|
7
|
+
* section" — the plane gizmo quad, and the 2D drawing that doubles as the 3D
|
|
8
|
+
* cut cap. Both are pure translations of `RenderOptions.sectionPlane` into a
|
|
9
|
+
* draw-parameter object (the preview flag, the cap-style merge, the hatch
|
|
10
|
+
* pattern id lookup), which is a different concern from owning overlay GPU
|
|
11
|
+
* objects and fronting their upload/clear facade.
|
|
12
|
+
*
|
|
13
|
+
* Crucially it does NOT take ownership of anything. The two nullable renderers
|
|
14
|
+
* arrive as arguments and stay owned by `RendererOverlays`, which alone creates
|
|
15
|
+
* them in `init()` and nulls them in `destroy()`. That is what makes this seam
|
|
16
|
+
* available where a class-shaped split is not: the `Section2DOverlayRenderer`
|
|
17
|
+
* instance backs the section cap AND five independent 3D line families, so
|
|
18
|
+
* carving those apart into two owning classes would give one nullable GPU
|
|
19
|
+
* object two owners in two files. Passing it is free; co-owning it is not.
|
|
20
|
+
*/
|
|
21
|
+
import type { SectionPlaneRenderer } from './section-plane.js';
|
|
22
|
+
import type { Section2DOverlayRenderer } from './section-2d-overlay.js';
|
|
23
|
+
import type { RenderOptions } from './types.js';
|
|
24
|
+
/** World-space AABB in the renderer's Y-up frame. */
|
|
25
|
+
export type ModelBounds = {
|
|
26
|
+
min: {
|
|
27
|
+
x: number;
|
|
28
|
+
y: number;
|
|
29
|
+
z: number;
|
|
30
|
+
};
|
|
31
|
+
max: {
|
|
32
|
+
x: number;
|
|
33
|
+
y: number;
|
|
34
|
+
z: number;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
/** The slice of the frame in flight that the section draw reads. */
|
|
38
|
+
export interface SectionDrawContext {
|
|
39
|
+
options: RenderOptions;
|
|
40
|
+
viewProj: Float32Array;
|
|
41
|
+
/** The bounds this frame resolved the section slider against. */
|
|
42
|
+
modelBounds: ModelBounds | null;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Draw the section-plane gizmo and, when the section is active, the cut cap.
|
|
46
|
+
*
|
|
47
|
+
* Both renderers are nullable because they only exist between `init()` and
|
|
48
|
+
* `destroy()`; a null one simply draws nothing.
|
|
49
|
+
*/
|
|
50
|
+
export declare function drawSectionOverlays(pass: GPURenderPassEncoder, gizmo: SectionPlaneRenderer | null, cap: Section2DOverlayRenderer | null, ctx: SectionDrawContext): void;
|
|
51
|
+
//# sourceMappingURL=render-section-draw.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render-section-draw.d.ts","sourceRoot":"","sources":["../src/render-section-draw.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAExE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,qDAAqD;AACrD,MAAM,MAAM,WAAW,GAAG;IACtB,GAAG,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACzC,GAAG,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC5C,CAAC;AAEF,oEAAoE;AACpE,MAAM,WAAW,kBAAkB;IAC/B,OAAO,EAAE,aAAa,CAAC;IACvB,QAAQ,EAAE,YAAY,CAAC;IACvB,iEAAiE;IACjE,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;CACnC;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAC/B,IAAI,EAAE,oBAAoB,EAC1B,KAAK,EAAE,oBAAoB,GAAG,IAAI,EAClC,GAAG,EAAE,wBAAwB,GAAG,IAAI,EACpC,GAAG,EAAE,kBAAkB,GACxB,IAAI,CA+DN"}
|
|
@@ -0,0 +1,66 @@
|
|
|
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 { DEFAULT_CAP_STYLE, HATCH_PATTERN_IDS } from './section-cap-style.js';
|
|
5
|
+
/**
|
|
6
|
+
* Draw the section-plane gizmo and, when the section is active, the cut cap.
|
|
7
|
+
*
|
|
8
|
+
* Both renderers are nullable because they only exist between `init()` and
|
|
9
|
+
* `destroy()`; a null one simply draws nothing.
|
|
10
|
+
*/
|
|
11
|
+
export function drawSectionOverlays(pass, gizmo, cap, ctx) {
|
|
12
|
+
const { options, viewProj, modelBounds } = ctx;
|
|
13
|
+
// Draw section plane visual BEFORE pass.end() (within same MSAA render pass)
|
|
14
|
+
// Always show plane when sectionPlane options are provided (as preview or active)
|
|
15
|
+
if (options.sectionPlane && gizmo && modelBounds) {
|
|
16
|
+
gizmo.draw(pass, {
|
|
17
|
+
axis: options.sectionPlane.axis,
|
|
18
|
+
position: options.sectionPlane.position,
|
|
19
|
+
bounds: modelBounds,
|
|
20
|
+
viewProj,
|
|
21
|
+
isPreview: !options.sectionPlane.enabled, // Preview mode when not enabled
|
|
22
|
+
min: options.sectionPlane.min,
|
|
23
|
+
max: options.sectionPlane.max,
|
|
24
|
+
// Custom-plane gizmo override (issue #243). When both
|
|
25
|
+
// are set the gizmo bypasses the cardinal path; see
|
|
26
|
+
// SectionPlaneRenderer.calculatePlaneVerticesFromNormal.
|
|
27
|
+
normal: options.sectionPlane.normal,
|
|
28
|
+
distance: options.sectionPlane.distance,
|
|
29
|
+
});
|
|
30
|
+
// Draw 2D section overlay on the section plane (when section is
|
|
31
|
+
// active, not preview). The overlay is also the 3D SECTION CAP:
|
|
32
|
+
// its polygon fills come from `SectionCutter` (exact triangle-
|
|
33
|
+
// plane intersection), and the new fill shader applies the
|
|
34
|
+
// user's screen-space hatch + colour directly on those
|
|
35
|
+
// polygons. This replaces the old stencil-parity cap, which
|
|
36
|
+
// bled hatch into empty sky on non-manifold IFC geometry —
|
|
37
|
+
// the polygons here are mathematically correct, so the cap
|
|
38
|
+
// silhouette matches the 2D drawing exactly.
|
|
39
|
+
if (options.sectionPlane.enabled && cap?.hasGeometry()) {
|
|
40
|
+
const o = options.sectionPlane;
|
|
41
|
+
const showFills = o.showCap !== false;
|
|
42
|
+
const showOutlines = o.showOutlines !== false;
|
|
43
|
+
const style = { ...DEFAULT_CAP_STYLE, ...(o.capStyle ?? {}) };
|
|
44
|
+
cap.draw(pass, {
|
|
45
|
+
axis: o.axis,
|
|
46
|
+
position: o.position,
|
|
47
|
+
bounds: modelBounds,
|
|
48
|
+
viewProj,
|
|
49
|
+
min: o.min,
|
|
50
|
+
max: o.max,
|
|
51
|
+
showFills,
|
|
52
|
+
showOutlines,
|
|
53
|
+
capStyle: showFills ? {
|
|
54
|
+
fillColor: style.fillColor,
|
|
55
|
+
strokeColor: style.strokeColor,
|
|
56
|
+
patternId: HATCH_PATTERN_IDS[style.pattern],
|
|
57
|
+
spacingPx: style.spacingPx,
|
|
58
|
+
angleRad: style.angleRad,
|
|
59
|
+
widthPx: style.widthPx,
|
|
60
|
+
secondaryAngleRad: style.secondaryAngleRad,
|
|
61
|
+
} : undefined,
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=render-section-draw.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render-section-draw.js","sourceRoot":"","sources":["../src/render-section-draw.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAyB/D,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAiB9E;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAC/B,IAA0B,EAC1B,KAAkC,EAClC,GAAoC,EACpC,GAAuB;IAEvB,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,GAAG,GAAG,CAAC;IAE/C,6EAA6E;IAC7E,kFAAkF;IAClF,IAAI,OAAO,CAAC,YAAY,IAAI,KAAK,IAAI,WAAW,EAAE,CAAC;QAC/C,KAAK,CAAC,IAAI,CACN,IAAI,EACJ;YACI,IAAI,EAAE,OAAO,CAAC,YAAY,CAAC,IAAI;YAC/B,QAAQ,EAAE,OAAO,CAAC,YAAY,CAAC,QAAQ;YACvC,MAAM,EAAE,WAAW;YACnB,QAAQ;YACR,SAAS,EAAE,CAAC,OAAO,CAAC,YAAY,CAAC,OA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EAAI,KAAK,CAAC,SAAS;oBAC5B,QAAQ,EAAK,KAAK,CAAC,QAAQ;oBAC3B,OAAO,EAAM,KAAK,CAAC,OAAO;oBAC1B,iBAAiB,EAAE,KAAK,CAAC,iBAAiB;iBAC7C,CAAC,CAAC,CAAC,SAAS;aAChB,CACJ,CAAC;QACN,CAAC;IAEL,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-frame section-plane resolution, lifted verbatim out of
|
|
3
|
+
* `Renderer.renderFrame()` (issue #2425).
|
|
4
|
+
*
|
|
5
|
+
* This is the "what does this frame clip against, and over what range" half of
|
|
6
|
+
* the section feature: it aggregates the bounds the slider is expressed in,
|
|
7
|
+
* turns `RenderOptions.sectionPlane` (or `terrainClipY`) into the world-space
|
|
8
|
+
* normal + distance the shader uniform carries, and reports the one-shot
|
|
9
|
+
* diagnostic log. It touches no GPU object and no `Renderer` field, which is
|
|
10
|
+
* why it can live here: everything it needs arrives as an argument. The bounds
|
|
11
|
+
* it computed come back in the return value for the caller to apply; the
|
|
12
|
+
* one-shot log latch is committed through the injected `spendLogLatch` so it
|
|
13
|
+
* still lands BEFORE the log, exactly as it did inline.
|
|
14
|
+
*/
|
|
15
|
+
import type { BatchedMesh, Mesh, RenderOptions } from './types.js';
|
|
16
|
+
/** World-space AABB in the renderer's Y-up frame. */
|
|
17
|
+
interface SectionFrameBounds {
|
|
18
|
+
min: {
|
|
19
|
+
x: number;
|
|
20
|
+
y: number;
|
|
21
|
+
z: number;
|
|
22
|
+
};
|
|
23
|
+
max: {
|
|
24
|
+
x: number;
|
|
25
|
+
y: number;
|
|
26
|
+
z: number;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* The distance range an AABB spans along `normal`: the min and max of
|
|
31
|
+
* `dot(corner, normal)` over the eight corners (issue #2447).
|
|
32
|
+
*
|
|
33
|
+
* This is the quantity a section slider has to travel over, because the plane
|
|
34
|
+
* the shader clips against is `dot(worldPos, normal) = distance`. Reading the
|
|
35
|
+
* range off one axis of the AABB instead is only the same quantity when
|
|
36
|
+
* `normal` IS that unit axis; on a rotated building it is short by up to
|
|
37
|
+
* `(1 - cos45) * extent` at each end, so the slider's 0-100% cannot reach the
|
|
38
|
+
* model's extremes (a 40 x 20 footprint cut on `side` at 45 degrees spans 40
|
|
39
|
+
* units where the true extent along the normal is 42.426).
|
|
40
|
+
*
|
|
41
|
+
* When `normal` IS a unit axis the loop collapses to that axis's extent
|
|
42
|
+
* bit-for-bit (`x * 1 + y * 0 + z * 0 === x` for finite inputs), so unrotated
|
|
43
|
+
* models are unaffected.
|
|
44
|
+
*
|
|
45
|
+
* Exported so the 2D cap upload can share the one formula instead of carrying
|
|
46
|
+
* a second copy — see `RendererOverlays.uploadSection2DOverlay`, which passes
|
|
47
|
+
* the un-rotated axis normal on purpose.
|
|
48
|
+
*/
|
|
49
|
+
export declare function projectedBoundsRange(boundsMin: {
|
|
50
|
+
x: number;
|
|
51
|
+
y: number;
|
|
52
|
+
z: number;
|
|
53
|
+
}, boundsMax: {
|
|
54
|
+
x: number;
|
|
55
|
+
y: number;
|
|
56
|
+
z: number;
|
|
57
|
+
}, normal: readonly [number, number, number]): {
|
|
58
|
+
min: number;
|
|
59
|
+
max: number;
|
|
60
|
+
};
|
|
61
|
+
/** The clip plane a frame hands to the mesh / point / instanced shaders. */
|
|
62
|
+
interface SectionPlaneFrameData {
|
|
63
|
+
normal: [number, number, number];
|
|
64
|
+
distance: number;
|
|
65
|
+
enabled: boolean;
|
|
66
|
+
}
|
|
67
|
+
export interface SectionPlaneFrameInput {
|
|
68
|
+
options: RenderOptions;
|
|
69
|
+
/**
|
|
70
|
+
* `Scene.getBatchedMeshes()`. The primary bounds source — individual
|
|
71
|
+
* meshes are deliberately excluded, see the comment on the aggregation.
|
|
72
|
+
*/
|
|
73
|
+
batchedMeshes: ReadonlyArray<BatchedMesh>;
|
|
74
|
+
/**
|
|
75
|
+
* The frame's individual-mesh list, used only as the streaming/degenerate
|
|
76
|
+
* bounds fallback. NOT raw `Scene.getMeshes()`: the call site passes the
|
|
77
|
+
* list *after* frustum culling and the hidden/isolated filters, which is
|
|
78
|
+
* what the pre-extraction code aggregated. Passing an unfiltered list would
|
|
79
|
+
* silently widen the fallback bounds, and with them the section slider's
|
|
80
|
+
* range, whenever the batched path has no bounds yet.
|
|
81
|
+
*/
|
|
82
|
+
meshes: ReadonlyArray<Mesh>;
|
|
83
|
+
/** `PointCloudRenderer.getBounds()`, or null when no points are loaded. */
|
|
84
|
+
pointCloudBounds: {
|
|
85
|
+
min: [number, number, number];
|
|
86
|
+
max: [number, number, number];
|
|
87
|
+
} | null;
|
|
88
|
+
/**
|
|
89
|
+
* Whether the one-shot "Y-up bounds used for clip" diagnostic has still to
|
|
90
|
+
* fire. The renderer owns the latch (`_loggedSectionBounds`, re-armed by
|
|
91
|
+
* `destroy()` for the next model).
|
|
92
|
+
*/
|
|
93
|
+
logSectionBounds: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* Commit the renderer's one-shot latch. Called immediately BEFORE the
|
|
96
|
+
* diagnostic is emitted, not after this function returns.
|
|
97
|
+
*
|
|
98
|
+
* The ordering is load-bearing and matches the pre-extraction code
|
|
99
|
+
* (`this._loggedSectionBounds = true;` then `console.info(...)`). Spending
|
|
100
|
+
* the latch afterwards would leave it unspent if `console.info` threw — a
|
|
101
|
+
* monkey-patched console is the only realistic way that happens — and this
|
|
102
|
+
* runs inside `renderFrame`'s encode `try`, so every later section-enabled
|
|
103
|
+
* frame would throw again and be contained as a degraded frame, eventually
|
|
104
|
+
* firing `onPersistentRenderDegradation`. The original cost one contained
|
|
105
|
+
* frame, ever.
|
|
106
|
+
*/
|
|
107
|
+
spendLogLatch: () => void;
|
|
108
|
+
}
|
|
109
|
+
export interface SectionPlaneFrameResult {
|
|
110
|
+
/** Undefined when nothing clips this frame. */
|
|
111
|
+
sectionPlaneData: SectionPlaneFrameData | undefined;
|
|
112
|
+
/**
|
|
113
|
+
* The bounds the section slider was resolved against, or null when
|
|
114
|
+
* `options.sectionPlane` was absent (in which case the renderer's cached
|
|
115
|
+
* model bounds are left alone).
|
|
116
|
+
*/
|
|
117
|
+
bounds: SectionFrameBounds | null;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Resolve this frame's clip plane and the bounds it is expressed in.
|
|
121
|
+
*
|
|
122
|
+
* Pure apart from the one-shot diagnostic, which is gated by
|
|
123
|
+
* `input.logSectionBounds` and commits its latch through
|
|
124
|
+
* `input.spendLogLatch` before logging.
|
|
125
|
+
*/
|
|
126
|
+
export declare function resolveSectionPlaneFrame(input: SectionPlaneFrameInput): SectionPlaneFrameResult;
|
|
127
|
+
export {};
|
|
128
|
+
//# sourceMappingURL=render-section-plane.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render-section-plane.d.ts","sourceRoot":"","sources":["../src/render-section-plane.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEnE,qDAAqD;AACrD,UAAU,kBAAkB;IACxB,GAAG,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACzC,GAAG,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC5C;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,oBAAoB,CAChC,SAAS,EAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAC9C,SAAS,EAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,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