@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
|
@@ -0,0 +1,180 @@
|
|
|
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 { isUsableBounds } from './camera-guards.js';
|
|
5
|
+
import { centerOf, fitDistanceFor, maxExtentOf } from './camera-framing.js';
|
|
6
|
+
/**
|
|
7
|
+
* Get current bounds estimate (simplified - in production would use scene bounds).
|
|
8
|
+
*/
|
|
9
|
+
export function estimateBoundsFromPose(state) {
|
|
10
|
+
// Estimate bounds from camera distance
|
|
11
|
+
const dir = {
|
|
12
|
+
x: state.camera.position.x - state.camera.target.x,
|
|
13
|
+
y: state.camera.position.y - state.camera.target.y,
|
|
14
|
+
z: state.camera.position.z - state.camera.target.z,
|
|
15
|
+
};
|
|
16
|
+
const distance = Math.sqrt(dir.x * dir.x + dir.y * dir.y + dir.z * dir.z);
|
|
17
|
+
const size = distance / 2;
|
|
18
|
+
return {
|
|
19
|
+
min: {
|
|
20
|
+
x: state.camera.target.x - size,
|
|
21
|
+
y: state.camera.target.y - size,
|
|
22
|
+
z: state.camera.target.z - size,
|
|
23
|
+
},
|
|
24
|
+
max: {
|
|
25
|
+
x: state.camera.target.x + size,
|
|
26
|
+
y: state.camera.target.y + size,
|
|
27
|
+
z: state.camera.target.z + size,
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Resolve the box a preset view should fit, from the caller's bounds or the
|
|
33
|
+
* current pose, and reject it if it is not usable.
|
|
34
|
+
*
|
|
35
|
+
* This is the whole admission decision for `setPresetView`, deliberately kept
|
|
36
|
+
* ahead of the rotation-cycling counter: a rejected preset must not advance
|
|
37
|
+
* the cycle, and the caller can only honour that if the verdict arrives before
|
|
38
|
+
* it mutates anything.
|
|
39
|
+
*/
|
|
40
|
+
export function resolvePresetBounds(state, bounds) {
|
|
41
|
+
const useBounds = bounds || estimateBoundsFromPose(state);
|
|
42
|
+
// Both sources need the check, not just the caller's: the pose-derived
|
|
43
|
+
// estimate above starts from the live pose, so a pose that is already
|
|
44
|
+
// malformed produces a malformed box and the ViewCube would then bake it in
|
|
45
|
+
// permanently. Rejecting leaves the preset un-applied, which keeps a
|
|
46
|
+
// recoverable pose recoverable (#2461).
|
|
47
|
+
if (!isUsableBounds(useBounds.min, useBounds.max)) {
|
|
48
|
+
console.warn('[Camera] Non-finite bounds for setPresetView; keeping current view');
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
return useBounds;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Pose for a preset view (Y-up coordinate system).
|
|
55
|
+
*
|
|
56
|
+
* `bounds` must already have passed {@link resolvePresetBounds}; `rotation` is
|
|
57
|
+
* the caller's 0-3 cycle position, which is why this takes it rather than
|
|
58
|
+
* owning it — the counter belongs to the animator, which is what remembers
|
|
59
|
+
* that the same face was clicked twice.
|
|
60
|
+
*
|
|
61
|
+
* @param buildingRotation Optional building rotation in radians (from IfcSite placement)
|
|
62
|
+
*/
|
|
63
|
+
export function presetViewTarget(state, view, bounds, rotation, buildingRotation) {
|
|
64
|
+
const center = centerOf(bounds.min, bounds.max);
|
|
65
|
+
const maxSize = maxExtentOf(bounds.min, bounds.max);
|
|
66
|
+
// Calculate distance based on FOV for proper fit. Aspect-aware: on a
|
|
67
|
+
// portrait viewport the horizontal field is the narrower one, and a preset
|
|
68
|
+
// fitted to the vertical field alone overflows it. See `fitDistanceFor`.
|
|
69
|
+
const distance = fitDistanceFor(state, maxSize, 1.5); // 1.5x for padding
|
|
70
|
+
let endPos;
|
|
71
|
+
const endTarget = center;
|
|
72
|
+
// WebGL uses Y-up coordinate system internally
|
|
73
|
+
// We set both position AND up vector for proper orthogonal views
|
|
74
|
+
let upVector = { x: 0, y: 1, z: 0 }; // Default Y-up
|
|
75
|
+
// Apply building rotation if present (rotate around Y axis).
|
|
76
|
+
//
|
|
77
|
+
// Normalized rather than trusted: this is the IfcSite placement angle,
|
|
78
|
+
// derived from the file and threaded through `Camera.setPresetView` — the
|
|
79
|
+
// published entry point — without ever meeting a guard. `Math.cos(NaN)` is
|
|
80
|
+
// NaN, and the four horizontal presets multiply it straight into `endPos`,
|
|
81
|
+
// so a malformed placement would send the ViewCube to a non-finite pose. A
|
|
82
|
+
// zero rotation is the same answer as "no rotation supplied", which is what
|
|
83
|
+
// the undefined case already resolves to.
|
|
84
|
+
const rotationRadians = Number.isFinite(buildingRotation) ? buildingRotation : 0;
|
|
85
|
+
const cosR = rotationRadians !== 0 ? Math.cos(rotationRadians) : 1.0;
|
|
86
|
+
const sinR = rotationRadians !== 0 ? Math.sin(rotationRadians) : 0.0;
|
|
87
|
+
switch (view) {
|
|
88
|
+
case 'top': {
|
|
89
|
+
// Top view: position camera *just barely* off the +Y pole so the
|
|
90
|
+
// subsequent orbit math has a well-defined polar tangent (no pole
|
|
91
|
+
// singularity). camera.up stays world Y throughout — screen-up is
|
|
92
|
+
// then determined by lookAt projecting (0,1,0) onto perp(look),
|
|
93
|
+
// which falls along the horizontal component of `-look`.
|
|
94
|
+
//
|
|
95
|
+
// The 4 rotation cycles select which compass direction appears at
|
|
96
|
+
// the top of the screen by varying the small horizontal offset
|
|
97
|
+
// (theta in the spherical math).
|
|
98
|
+
// rotation 0 → camera slightly to +Z of center → screen-up = +Z
|
|
99
|
+
// rotation 1 → camera slightly to +X → screen-up = +X
|
|
100
|
+
// rotation 2 → camera slightly to -Z → screen-up = -Z
|
|
101
|
+
// rotation 3 → camera slightly to -X → screen-up = -X
|
|
102
|
+
// Building rotation is applied as the same Y-axis rotation that
|
|
103
|
+
// setPresetView would have used to remap the legacy up vector.
|
|
104
|
+
const poleOffset = Math.sin(0.01) * distance; // ~0.6° tilt
|
|
105
|
+
const verticalOffset = Math.cos(0.01) * distance;
|
|
106
|
+
// `?? 0`: `rotation` is the animator's 0-3 cycle counter today, but it
|
|
107
|
+
// is a plain `number` on the signature, and an out-of-range, fractional
|
|
108
|
+
// or non-finite one indexes past the table and makes `thetaWorld` — and
|
|
109
|
+
// with it the whole preset pose — NaN.
|
|
110
|
+
const thetaPerRotation = [0, Math.PI / 2, Math.PI, -Math.PI / 2];
|
|
111
|
+
const thetaWorld = (thetaPerRotation[rotation] ?? 0) + rotationRadians;
|
|
112
|
+
endPos = {
|
|
113
|
+
x: center.x + poleOffset * Math.sin(thetaWorld),
|
|
114
|
+
y: center.y + verticalOffset,
|
|
115
|
+
z: center.z + poleOffset * Math.cos(thetaWorld),
|
|
116
|
+
};
|
|
117
|
+
upVector = { x: 0, y: 1, z: 0 };
|
|
118
|
+
break;
|
|
119
|
+
}
|
|
120
|
+
case 'bottom': {
|
|
121
|
+
// Bottom view: mirror of top — phi = π − MIN_PHI.
|
|
122
|
+
const poleOffset = Math.sin(0.01) * distance;
|
|
123
|
+
const verticalOffset = Math.cos(0.01) * distance;
|
|
124
|
+
const thetaPerRotation = [Math.PI, Math.PI / 2, 0, -Math.PI / 2];
|
|
125
|
+
const thetaWorld = (thetaPerRotation[rotation] ?? 0) + rotationRadians;
|
|
126
|
+
endPos = {
|
|
127
|
+
x: center.x + poleOffset * Math.sin(thetaWorld),
|
|
128
|
+
y: center.y - verticalOffset,
|
|
129
|
+
z: center.z + poleOffset * Math.cos(thetaWorld),
|
|
130
|
+
};
|
|
131
|
+
upVector = { x: 0, y: 1, z: 0 };
|
|
132
|
+
break;
|
|
133
|
+
}
|
|
134
|
+
case 'front':
|
|
135
|
+
// Front view: from +Z looking at model
|
|
136
|
+
// Rotate camera position around Y axis by building rotation
|
|
137
|
+
// Standard rotation: x' = x*cos - z*sin, z' = x*sin + z*cos
|
|
138
|
+
// For +Z direction (0,0,1): x' = -sin, z' = cos
|
|
139
|
+
// But we need to look at building's front, so use negative rotation
|
|
140
|
+
endPos = {
|
|
141
|
+
x: center.x + sinR * distance,
|
|
142
|
+
y: center.y,
|
|
143
|
+
z: center.z + cosR * distance,
|
|
144
|
+
};
|
|
145
|
+
upVector = { x: 0, y: 1, z: 0 }; // Y-up
|
|
146
|
+
break;
|
|
147
|
+
case 'back':
|
|
148
|
+
// Back view: from -Z looking at model
|
|
149
|
+
// For -Z direction (0,0,-1) rotated: x' = sin, z' = -cos
|
|
150
|
+
endPos = {
|
|
151
|
+
x: center.x - sinR * distance,
|
|
152
|
+
y: center.y,
|
|
153
|
+
z: center.z - cosR * distance,
|
|
154
|
+
};
|
|
155
|
+
upVector = { x: 0, y: 1, z: 0 }; // Y-up
|
|
156
|
+
break;
|
|
157
|
+
case 'left':
|
|
158
|
+
// Left view: from -X looking at model
|
|
159
|
+
// For -X direction (-1,0,0) rotated: x' = -cos, z' = sin
|
|
160
|
+
endPos = {
|
|
161
|
+
x: center.x - cosR * distance,
|
|
162
|
+
y: center.y,
|
|
163
|
+
z: center.z + sinR * distance,
|
|
164
|
+
};
|
|
165
|
+
upVector = { x: 0, y: 1, z: 0 }; // Y-up
|
|
166
|
+
break;
|
|
167
|
+
case 'right':
|
|
168
|
+
// Right view: from +X looking at model
|
|
169
|
+
// For +X direction (1,0,0) rotated: x' = cos, z' = -sin
|
|
170
|
+
endPos = {
|
|
171
|
+
x: center.x + cosR * distance,
|
|
172
|
+
y: center.y,
|
|
173
|
+
z: center.z - sinR * distance,
|
|
174
|
+
};
|
|
175
|
+
upVector = { x: 0, y: 1, z: 0 }; // Y-up
|
|
176
|
+
break;
|
|
177
|
+
}
|
|
178
|
+
return { position: endPos, target: endTarget, up: upVector };
|
|
179
|
+
}
|
|
180
|
+
//# sourceMappingURL=camera-preset-view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"camera-preset-view.js","sourceRoot":"","sources":["../src/camera-preset-view.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AA4B/D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,WAAW,EAAsB,MAAM,qBAAqB,CAAC;AAEhG;;GAEG;AACH,MAAM,UAAU,sBAAsB,CAAC,KAA0B;IAC/D,uCAAuC;IACvC,MAAM,GAAG,GAAG;QACV,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAClD,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,M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Camera class using composition pattern.
|
|
4
4
|
*/
|
|
5
5
|
import type { Vec3 } from './types.js';
|
|
6
|
-
import type { CameraInternalState } from './camera-
|
|
6
|
+
import type { CameraInternalState } from './camera-state.js';
|
|
7
7
|
/**
|
|
8
8
|
* Handles projection math: screen-to-world and world-to-screen conversions,
|
|
9
9
|
* bounding box fitting, and near/far plane management.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"camera-projection.d.ts","sourceRoot":"","sources":["../src/camera-projection.ts"],"names":[],"mappings":"AAIA;;;GAGG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"camera-projection.d.ts","sourceRoot":"","sources":["../src/camera-projection.ts"],"names":[],"mappings":"AAIA;;;GAGG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAkB7D;;;GAGG;AACH,qBAAa,gBAAgB;IAEzB,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,cAAc;gBADd,KAAK,EAAE,mBAAmB,EAC1B,cAAc,EAAE,MAAM,IAAI;IAG7C;;;;;;OAMG;IACH,eAAe,CAAC,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;IAkC3G;;;;;;;OAOG;IACH,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG;QAAE,MAAM,EAAE,IAAI,CAAC;QAAC,SAAS,EAAE,IAAI,CAAA;KAAE;IAkG9H;;;;OAIG;IACH,WAAW,CAAC,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,GAAG,IAAI;IAiCvC;;;;OAIG;IACH,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;CAG7C"}
|
|
@@ -1,7 +1,22 @@
|
|
|
1
1
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
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
|
-
import { MathUtils } from './math.js';
|
|
4
|
+
import { MathUtils, viewBasis } from './math.js';
|
|
5
|
+
import { DEFAULT_ORTHO_SIZE, isUsableBounds } from './camera-guards.js';
|
|
6
|
+
/**
|
|
7
|
+
* One NDC axis: `screen / extent * scale + offset`, degrading to the centre
|
|
8
|
+
* of the axis when the extent is unusable.
|
|
9
|
+
*
|
|
10
|
+
* `extent` is a drawing-buffer dimension. It is zero before the canvas is
|
|
11
|
+
* first sized and while its container is collapsed, and the division would
|
|
12
|
+
* then hand back ±Infinity — or NaN, when the cursor coordinate is zero too,
|
|
13
|
+
* since `0 / 0` is NaN. Neither is a position on screen.
|
|
14
|
+
*/
|
|
15
|
+
function usableNdc(screen, extent, scale, offset) {
|
|
16
|
+
if (!(Number.isFinite(extent) && extent > 0) || !Number.isFinite(screen))
|
|
17
|
+
return offset + scale / 2;
|
|
18
|
+
return (screen / extent) * scale + offset;
|
|
19
|
+
}
|
|
5
20
|
/**
|
|
6
21
|
* Handles projection math: screen-to-world and world-to-screen conversions,
|
|
7
22
|
* bounding box fitting, and near/far plane management.
|
|
@@ -56,30 +71,43 @@ export class CameraProjection {
|
|
|
56
71
|
* @returns Ray origin and direction in world space
|
|
57
72
|
*/
|
|
58
73
|
unprojectToRay(screenX, screenY, canvasWidth, canvasHeight) {
|
|
59
|
-
// Convert screen coords to NDC (-1 to 1)
|
|
60
|
-
|
|
61
|
-
|
|
74
|
+
// Convert screen coords to NDC (-1 to 1).
|
|
75
|
+
//
|
|
76
|
+
// The divisors are the drawing-buffer dimensions, and a canvas can report
|
|
77
|
+
// zero before its first resize or while its container is collapsed — the
|
|
78
|
+
// division then yields ±Infinity and the ortho branch below writes that
|
|
79
|
+
// into the ray origin. A viewport with no extent has no meaningful cursor
|
|
80
|
+
// position, so the honest reading of "where is the cursor, in NDC" is
|
|
81
|
+
// dead centre; that is also the answer this returns for a cursor at the
|
|
82
|
+
// exact centre of a healthy canvas, so it introduces no new behaviour.
|
|
83
|
+
const ndcX = usableNdc(screenX, canvasWidth, 2, -1);
|
|
84
|
+
const ndcY = usableNdc(screenY, canvasHeight, -2, 1);
|
|
85
|
+
// One basis for both branches, and the same one the *view matrix* is built
|
|
86
|
+
// from (#2467). The orthographic branch used to recompute
|
|
87
|
+
// `normalize(cross(forward, up))` itself, which has no degeneracy handling
|
|
88
|
+
// at all: `MathUtils.normalize` floored on `len < 1e-10` back then, and
|
|
89
|
+
// that comparison is false for NaN, so it divided by NaN rather than
|
|
90
|
+
// falling back — a non-finite `camera.up` (a BCF `CameraUpVector` of `1e999`
|
|
91
|
+
// arrives as `Infinity` through a bare `parseFloat`) returned
|
|
92
|
+
// `origin = (NaN, NaN, NaN)` for BOTH NaN and Infinity, while the rendered
|
|
93
|
+
// frame stayed perfectly finite. Picking and measurement live outside this
|
|
94
|
+
// package and test hits with comparisons, every one of which is false
|
|
95
|
+
// against NaN, so the click read as "empty space".
|
|
96
|
+
const basis = viewBasis(this.state.camera.position, this.state.camera.target, this.state.camera.up);
|
|
62
97
|
if (this.state.projectionMode === 'orthographic') {
|
|
63
98
|
// Orthographic: rays are parallel. Origin varies with screen position.
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
const
|
|
68
|
-
|
|
69
|
-
y: this.state.camera.target.y - this.state.camera.position.y,
|
|
70
|
-
z: this.state.camera.target.z - this.state.camera.position.z,
|
|
71
|
-
});
|
|
72
|
-
// Right = forward x up
|
|
73
|
-
const right = MathUtils.normalize(MathUtils.cross(forward, this.state.camera.up));
|
|
74
|
-
// Actual up = right x forward
|
|
75
|
-
const actualUp = MathUtils.cross(right, forward);
|
|
99
|
+
// `orthoSize` has a read-site backstop in `Camera.updateMatrices` for
|
|
100
|
+
// the projection matrix; this is the other reader, so it needs its own.
|
|
101
|
+
const halfH = Number.isFinite(this.state.orthoSize) ? this.state.orthoSize : DEFAULT_ORTHO_SIZE;
|
|
102
|
+
const aspect = Number.isFinite(this.state.camera.aspect) ? this.state.camera.aspect : 1;
|
|
103
|
+
const halfW = halfH * aspect;
|
|
76
104
|
// Ray origin: camera position offset by NDC * view extents
|
|
77
105
|
const origin = {
|
|
78
|
-
x:
|
|
79
|
-
y:
|
|
80
|
-
z:
|
|
106
|
+
x: basis.eye.x + basis.right.x * ndcX * halfW + basis.up.x * ndcY * halfH,
|
|
107
|
+
y: basis.eye.y + basis.right.y * ndcX * halfW + basis.up.y * ndcY * halfH,
|
|
108
|
+
z: basis.eye.z + basis.right.z * ndcX * halfW + basis.up.z * ndcY * halfH,
|
|
81
109
|
};
|
|
82
|
-
return { origin, direction: forward };
|
|
110
|
+
return { origin, direction: basis.forward };
|
|
83
111
|
}
|
|
84
112
|
// Perspective: ray origin is always the camera position
|
|
85
113
|
// Direction is computed through the screen point
|
|
@@ -87,23 +115,43 @@ export class CameraProjection {
|
|
|
87
115
|
const invViewProj = MathUtils.invert(this.state.viewProjMatrix);
|
|
88
116
|
if (!invViewProj) {
|
|
89
117
|
// Fallback: return ray from camera position towards target
|
|
90
|
-
|
|
91
|
-
x: this.state.camera.target.x - this.state.camera.position.x,
|
|
92
|
-
y: this.state.camera.target.y - this.state.camera.position.y,
|
|
93
|
-
z: this.state.camera.target.z - this.state.camera.position.z,
|
|
94
|
-
});
|
|
95
|
-
return { origin: { ...this.state.camera.position }, direction: dir };
|
|
118
|
+
return { origin: { ...basis.eye }, direction: basis.forward };
|
|
96
119
|
}
|
|
97
120
|
// Unproject a point at some depth to get a point on the ray
|
|
98
121
|
// Using z=0.5 (midpoint in Reverse-Z: 1.0=near, 0.0=far) to get a finite point
|
|
99
122
|
const worldPoint = MathUtils.transformPoint(invViewProj, { x: ndcX, y: ndcY, z: 0.5 });
|
|
100
|
-
// Ray origin is camera position
|
|
101
|
-
|
|
102
|
-
|
|
123
|
+
// Ray origin is the scrubbed camera position — the same one the view
|
|
124
|
+
// matrix's translation row uses, so the ray belongs to the frame on
|
|
125
|
+
// screen rather than to a pose that was never rendered.
|
|
126
|
+
const origin = { ...basis.eye };
|
|
127
|
+
const raw = {
|
|
103
128
|
x: worldPoint.x - origin.x,
|
|
104
129
|
y: worldPoint.y - origin.y,
|
|
105
130
|
z: worldPoint.z - origin.z,
|
|
106
|
-
}
|
|
131
|
+
};
|
|
132
|
+
const direction = MathUtils.normalize(raw);
|
|
133
|
+
// `normalize` is total — it returns the zero vector for everything it
|
|
134
|
+
// cannot normalize — and a zero-length direction is a ray that hits
|
|
135
|
+
// nothing, the same silent miss the NaN origin produced. Two inputs land
|
|
136
|
+
// here, and the second is why the floor inside `normalize` had to be a
|
|
137
|
+
// finiteness test rather than the `len < 1e-10` lower bound it was:
|
|
138
|
+
//
|
|
139
|
+
// - the inverted matrix is ill-conditioned enough that the unprojected
|
|
140
|
+
// point lands on the eye, leaving nothing to normalize;
|
|
141
|
+
// - `raw` is non-finite. `MathUtils.invert` stores its result in a
|
|
142
|
+
// `Float32Array`, so an inverse component past 3.4e38 saturates to
|
|
143
|
+
// `Infinity` and `transformPoint` carries that into `worldPoint`. A
|
|
144
|
+
// lower bound admits `Infinity` (it is not *below* the floor), and
|
|
145
|
+
// `Infinity / Infinity` is NaN while the finite components divide to
|
|
146
|
+
// `0` — so the direction came back `{NaN, 0, -0}`, which is neither
|
|
147
|
+
// finite nor the zero vector this branch tests for. Measured on a
|
|
148
|
+
// camera at `(1e155, 0, 0)` with a wide viewport (#2479).
|
|
149
|
+
//
|
|
150
|
+
// Look along the view direction instead: that is the ray through the
|
|
151
|
+
// centre of the frame, which is where a cursor with no usable offset is.
|
|
152
|
+
if (direction.x === 0 && direction.y === 0 && direction.z === 0) {
|
|
153
|
+
return { origin, direction: basis.forward };
|
|
154
|
+
}
|
|
107
155
|
return { origin, direction };
|
|
108
156
|
}
|
|
109
157
|
/**
|
|
@@ -112,6 +160,11 @@ export class CameraProjection {
|
|
|
112
160
|
* Y-up coordinate system: Y is vertical
|
|
113
161
|
*/
|
|
114
162
|
fitToBounds(min, max) {
|
|
163
|
+
// Same input class, same policy as the animator's `frameBounds`/
|
|
164
|
+
// `zoomExtent` (#2461): an infinite or inverted AABB has no centre and no
|
|
165
|
+
// extent to fit to, and both go straight into `position` and `target`.
|
|
166
|
+
if (!isUsableBounds(min, max))
|
|
167
|
+
return;
|
|
115
168
|
const center = {
|
|
116
169
|
x: (min.x + max.x) / 2,
|
|
117
170
|
y: (min.y + max.y) / 2,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"camera-projection.js","sourceRoot":"","sources":["../src/camera-projection.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAS/D,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"camera-projection.js","sourceRoot":"","sources":["../src/camera-projection.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAS/D,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAExE;;;;;;;;GAQG;AACH,SAAS,SAAS,CAAC,MAAc,EAAE,MAAc,EAAE,KAAa,EAAE,MAAc;IAC9E,IAAI,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,MAAM,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC;QAAE,OAAO,MAAM,GAAG,KAAK,GAAG,CAAC,CAAC;IACpG,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,K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AAC,MAAM,GAAG,MAAM,CAAC;QAElC,qCAAqC;QACrC,4DAA4D;QAC5D,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,GAAG;YAC3B,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,QAAQ,GAAG,GAAG,EAAI,QAAQ;YACxC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,QAAQ,GAAG,GAAG,EAAI,QAAQ;YACxC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,QAAQ,GAAG,GAAG,EAAI,QAAQ;SACzC,CAAC;QAEF,0EAA0E;QAC1E,IAAI,CAAC,cAAc,EAAE,CAAC;IACxB,CAAC;IAED;;;;OAIG;IACH,mBAAmB,CAAC,SAAiB;QACnC,+DAA+D;IACjE,CAAC;CACF"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The state object every camera sub-system shares.
|
|
3
|
+
*
|
|
4
|
+
* This lives on its own rather than inside one of the consumers: `camera.ts`,
|
|
5
|
+
* `camera-controls.ts`, `camera-animation.ts`, `camera-projection.ts`,
|
|
6
|
+
* `camera-matrices.ts`, `camera-framing.ts`, `camera-preset-view.ts` and
|
|
7
|
+
* `camera-first-person.ts` all
|
|
8
|
+
* need the type, and declaring it inside the gesture module made four of them
|
|
9
|
+
* import their core type from a sibling that is otherwise unrelated to them.
|
|
10
|
+
* Owning it here turns that chain into a star.
|
|
11
|
+
*/
|
|
12
|
+
import type { Camera as CameraType, Mat4 } from './types.js';
|
|
13
|
+
/** Projection mode for the camera */
|
|
14
|
+
export type ProjectionMode = 'perspective' | 'orthographic';
|
|
15
|
+
/**
|
|
16
|
+
* Shared mutable state for camera sub-systems.
|
|
17
|
+
* All sub-systems reference the same state object so changes are visible across them.
|
|
18
|
+
*/
|
|
19
|
+
export interface CameraInternalState {
|
|
20
|
+
camera: CameraType;
|
|
21
|
+
viewMatrix: Mat4;
|
|
22
|
+
projMatrix: Mat4;
|
|
23
|
+
viewProjMatrix: Mat4;
|
|
24
|
+
/** Current projection mode */
|
|
25
|
+
projectionMode: ProjectionMode;
|
|
26
|
+
/** Orthographic half-height in world units (controls zoom level in ortho mode) */
|
|
27
|
+
orthoSize: number;
|
|
28
|
+
/** Scene bounding box for tight orthographic near/far computation */
|
|
29
|
+
sceneBounds: {
|
|
30
|
+
min: {
|
|
31
|
+
x: number;
|
|
32
|
+
y: number;
|
|
33
|
+
z: number;
|
|
34
|
+
};
|
|
35
|
+
max: {
|
|
36
|
+
x: number;
|
|
37
|
+
y: number;
|
|
38
|
+
z: number;
|
|
39
|
+
};
|
|
40
|
+
} | null;
|
|
41
|
+
/**
|
|
42
|
+
* Optional outlier-robust bounds for anchoring the orbit pivot (issue #1394).
|
|
43
|
+
* Distinct from `sceneBounds`: the renderer keeps `sceneBounds` synced to the
|
|
44
|
+
* FULL model AABB (needed for near/far clipping and section ranges), but a
|
|
45
|
+
* handful of far-flung meshes can push that AABB's centre into empty space,
|
|
46
|
+
* which the orbit-pivot fallback would then rotate around. When set, the pivot
|
|
47
|
+
* uses this tighter centre instead. `null` ⇒ fall back to `sceneBounds`.
|
|
48
|
+
*/
|
|
49
|
+
orbitAnchorBounds: {
|
|
50
|
+
min: {
|
|
51
|
+
x: number;
|
|
52
|
+
y: number;
|
|
53
|
+
z: number;
|
|
54
|
+
};
|
|
55
|
+
max: {
|
|
56
|
+
x: number;
|
|
57
|
+
y: number;
|
|
58
|
+
z: number;
|
|
59
|
+
};
|
|
60
|
+
} | null;
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=camera-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"camera-state.d.ts","sourceRoot":"","sources":["../src/camera-state.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,UAAU,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAE7D,qCAAqC;AACrC,MAAM,MAAM,cAAc,GAAG,aAAa,GAAG,cAAc,CAAC;AAE5D;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,UAAU,CAAC;IACnB,UAAU,EAAE,IAAI,CAAC;IACjB,UAAU,EAAE,IAAI,CAAC;IACjB,cAAc,EAAE,IAAI,CAAC;IACrB,8BAA8B;IAC9B,cAAc,EAAE,cAAc,CAAC;IAC/B,kFAAkF;IAClF,SAAS,EAAE,MAAM,CAAC;IAClB,qEAAqE;IACrE,WAAW,EAAE;QAAE,GAAG,EAAE;YAAE,CAAC,EAAE,MAAM,CAAC;YAAC,CAAC,EAAE,MAAM,CAAC;YAAC,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;QAAC,GAAG,EAAE;YAAE,CAAC,EAAE,MAAM,CAAC;YAAC,CAAC,EAAE,MAAM,CAAC;YAAC,CAAC,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,GAAG,IAAI,CAAC;IAC3G;;;;;;;OAOG;IACH,iBAAiB,EAAE;QAAE,GAAG,EAAE;YAAE,CAAC,EAAE,MAAM,CAAC;YAAC,CAAC,EAAE,MAAM,CAAC;YAAC,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;QAAC,GAAG,EAAE;YAAE,CAAC,EAAE,MAAM,CAAC;YAAC,CAAC,EAAE,MAAM,CAAC;YAAC,CAAC,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,GAAG,IAAI,CAAC;CAClH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"camera-state.js","sourceRoot":"","sources":["../src/camera-state.ts"],"names":[],"mappings":"AAAA;;+DAE+D"}
|
package/dist/camera.d.ts
CHANGED
|
@@ -6,14 +6,20 @@
|
|
|
6
6
|
* (screen-world conversion/bounds fitting).
|
|
7
7
|
*/
|
|
8
8
|
import type { Vec3, Mat4 } from './types.js';
|
|
9
|
-
import {
|
|
9
|
+
import type { ProjectionMode } from './camera-state.js';
|
|
10
10
|
import { type Bounds3, type FitPolicy } from './camera-fit-policy.js';
|
|
11
11
|
export declare class Camera {
|
|
12
12
|
private state;
|
|
13
13
|
private controls;
|
|
14
14
|
private animator;
|
|
15
15
|
private projection;
|
|
16
|
+
private firstPerson;
|
|
16
17
|
constructor();
|
|
18
|
+
/**
|
|
19
|
+
* Cold-path convenience for this class's own setters. The hot path uses the
|
|
20
|
+
* closure built in the constructor; see the note there.
|
|
21
|
+
*/
|
|
22
|
+
private updateMatrices;
|
|
17
23
|
/**
|
|
18
24
|
* Set camera aspect ratio
|
|
19
25
|
*/
|
|
@@ -149,7 +155,21 @@ export declare class Camera {
|
|
|
149
155
|
*/
|
|
150
156
|
getFOV(): number;
|
|
151
157
|
/**
|
|
152
|
-
* Get distance from camera position to target
|
|
158
|
+
* Get distance from camera position to target.
|
|
159
|
+
*
|
|
160
|
+
* Deliberately **unsanitized**: it reports the pose as it actually is, so a
|
|
161
|
+
* malformed one (a BCF viewpoint restored from a file reaches the public
|
|
162
|
+
* setters unvalidated) yields NaN rather than a substituted number. This is
|
|
163
|
+
* a measurement, not a control input: it is what `useBCF` reads back when
|
|
164
|
+
* restoring a viewpoint and what the BCF overlay scales markers by. There is
|
|
165
|
+
* no substitute that is right for every reader — a plausible-looking `1`
|
|
166
|
+
* would place every restored target one unit from the eye — and returning a
|
|
167
|
+
* number here would contradict `getPosition()`/`getTarget()`, which are raw,
|
|
168
|
+
* leaving callers no way to tell that the pose is broken. Gesture code inside
|
|
169
|
+
* this package guards with {@link isUsableDistance} instead; each gesture
|
|
170
|
+
* needs a different fallback. Callers OUTSIDE the package cannot use that
|
|
171
|
+
* predicate (it is package-internal) and are not all guarded — see #2466 for
|
|
172
|
+
* the viewpoint-restore path (#2441).
|
|
153
173
|
*/
|
|
154
174
|
getDistance(): number;
|
|
155
175
|
/**
|
|
@@ -275,14 +295,5 @@ export declare class Camera {
|
|
|
275
295
|
z: number;
|
|
276
296
|
};
|
|
277
297
|
} | null;
|
|
278
|
-
private updateMatrices;
|
|
279
|
-
/**
|
|
280
|
-
* Compute tight near/far for orthographic mode by projecting the scene
|
|
281
|
-
* bounding sphere onto the camera view direction.
|
|
282
|
-
*
|
|
283
|
-
* This gives optimal depth precision (minimizing z-fighting) while ensuring
|
|
284
|
-
* no geometry is clipped regardless of camera position or view angle.
|
|
285
|
-
*/
|
|
286
|
-
private computeOrthoNearFar;
|
|
287
298
|
}
|
|
288
299
|
//# sourceMappingURL=camera.d.ts.map
|
package/dist/camera.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"camera.d.ts","sourceRoot":"","sources":["../src/camera.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"camera.d.ts","sourceRoot":"","sources":["../src/camera.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAG7C,OAAO,KAAK,EAAuB,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAK7E,OAAO,EAAiB,KAAK,OAAO,EAAE,KAAK,SAAS,EAA6B,MAAM,wBAAwB,CAAC;AAQhH,qBAAa,MAAM;IACjB,OAAO,CAAC,KAAK,CAAsB;IACnC,OAAO,CAAC,QAAQ,CAAiB;IACjC,OAAO,CAAC,QAAQ,CAAiB;IACjC,OAAO,CAAC,UAAU,CAAmB;IACrC,OAAO,CAAC,WAAW,CAAuB;;IAoC1C;;;OAGG;IACH,OAAO,CAAC,cAAc;IAItB;;OAEG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAa/B;;OAEG;IACH,WAAW,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI;IAKlD;;OAEG;IACH,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,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