gl-draw 0.15.33 → 0.16.0-beta.1
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/WebGPULineSegments2.js +4 -4
- package/dist/WebGPULineSegments2.module.js +243 -243
- package/dist/core/BaseObject/index.d.ts +1 -0
- package/dist/core/Loader/TextureLoader.d.ts +1 -1
- package/dist/core/Pencil.d.ts +1 -2
- package/dist/index.js +2 -2
- package/dist/index.module.js +340 -436
- package/package.json +1 -1
- package/dist/utils/Timer.d.ts +0 -72
package/dist/index.module.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
var St = Object.defineProperty, At = Object.defineProperties;
|
|
2
2
|
var Mt = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var Me = Object.getOwnPropertySymbols;
|
|
4
|
-
var
|
|
5
|
-
var
|
|
4
|
+
var Rt = Object.prototype.hasOwnProperty, Dt = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var Re = (h, e, t) => e in h ? St(h, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : h[e] = t, U = (h, e) => {
|
|
6
6
|
for (var t in e || (e = {}))
|
|
7
|
-
|
|
7
|
+
Rt.call(e, t) && Re(h, t, e[t]);
|
|
8
8
|
if (Me)
|
|
9
9
|
for (var t of Me(e))
|
|
10
|
-
|
|
10
|
+
Dt.call(e, t) && Re(h, t, e[t]);
|
|
11
11
|
return h;
|
|
12
12
|
}, te = (h, e) => At(h, Mt(e));
|
|
13
13
|
var se = (h, e, t) => new Promise((s, i) => {
|
|
@@ -29,12 +29,12 @@ var se = (h, e, t) => new Promise((s, i) => {
|
|
|
29
29
|
import * as Ce from "@tweenjs/tween.js";
|
|
30
30
|
import Ut from "deepmerge";
|
|
31
31
|
import zt from "stats-gl";
|
|
32
|
-
import { Vector3 as
|
|
33
|
-
import { M as ut, B as Oe, a as
|
|
32
|
+
import { Vector3 as j, PerspectiveCamera as kt, Matrix4 as W, ShaderMaterial as Ft, UniformsUtils as Nt, RawShaderMaterial as It, MeshBasicMaterial as jt, PointsMaterial as at, SpriteMaterial as lt, Color as Ht, Layers as Bt, Vector2 as B, WebGLRenderTarget as Vt, HalfFloatType as Yt, MathUtils as Zt, Vector4 as Wt, Quaternion as ht, Spherical as Kt, Box3 as ct, Sphere as $t, Raycaster as dt, AxesHelper as De, CameraHelper as Gt, PointLightHelper as Xt, DirectionalLightHelper as qt, SpotLightHelper as Qt, HemisphereLightHelper as Jt, Box3Helper as Ue, Scene as pt, Group as ze, Camera as es, Loader as mt, FileLoader as Se, Texture as fe, VideoTexture as ts, LoadingManager as ss, DataTexture as is, WebGLRenderer as rs, REVISION as os, Object3D as ns, Timer as as } from "three";
|
|
33
|
+
import { M as ut, B as Oe, a as ls, R as Pe, I as he } from "./WebGPULineSegments2.module.js";
|
|
34
34
|
import { EffectComposer as ke } from "three/examples/jsm/postprocessing/EffectComposer";
|
|
35
|
-
import { RenderPass as
|
|
36
|
-
import { SSAOPass as
|
|
37
|
-
import { UnrealBloomPass as
|
|
35
|
+
import { RenderPass as hs } from "three/examples/jsm/postprocessing/RenderPass";
|
|
36
|
+
import { SSAOPass as cs } from "three/examples/jsm/postprocessing/SSAOPass";
|
|
37
|
+
import { UnrealBloomPass as ds } from "three/examples/jsm/postprocessing/UnrealBloomPass";
|
|
38
38
|
import "three/examples/jsm/lines/LineMaterial";
|
|
39
39
|
import "three/examples/jsm/lines/LineSegmentsGeometry";
|
|
40
40
|
import "three/examples/jsm/renderers/CSS2DRenderer";
|
|
@@ -45,18 +45,18 @@ import "three/examples/jsm/utils/BufferGeometryUtils";
|
|
|
45
45
|
import "three-bvh-csg";
|
|
46
46
|
import "three/examples/jsm/lights/RectAreaLightUniformsLib";
|
|
47
47
|
import "three/examples/jsm/lines/LineSegments2";
|
|
48
|
-
import { ShaderPass as
|
|
48
|
+
import { ShaderPass as ps } from "three/examples/jsm/postprocessing/ShaderPass";
|
|
49
49
|
import { OutputPass as ms } from "three/examples/jsm/postprocessing/OutputPass";
|
|
50
50
|
import { FullScreenQuad as Fe } from "three/examples/jsm/postprocessing/Pass";
|
|
51
|
-
import { RectAreaLightHelper as
|
|
52
|
-
import { ViewHelper as
|
|
53
|
-
import { generateUUID as Ne, makePromiseCreator as
|
|
54
|
-
import { DRACOLoader as
|
|
55
|
-
import { EXRLoader as
|
|
56
|
-
import { GLTFLoader as
|
|
57
|
-
import { LottieLoader as
|
|
58
|
-
import { a as
|
|
59
|
-
import { TransformControls as
|
|
51
|
+
import { RectAreaLightHelper as us } from "three/examples/jsm/helpers/RectAreaLightHelper";
|
|
52
|
+
import { ViewHelper as fs } from "three/examples/jsm/helpers/ViewHelper";
|
|
53
|
+
import { generateUUID as Ne, makePromiseCreator as _s } from "esus-lite";
|
|
54
|
+
import { DRACOLoader as gs } from "three/examples/jsm/loaders/DRACOLoader";
|
|
55
|
+
import { EXRLoader as ys } from "three/examples/jsm/loaders/EXRLoader";
|
|
56
|
+
import { GLTFLoader as Ie } from "three/examples/jsm/loaders/GLTFLoader";
|
|
57
|
+
import { LottieLoader as vs } from "three/examples/jsm/loaders/LottieLoader";
|
|
58
|
+
import { a as Cs, C as Os, i as Es } from "./isPlainObject.module.js";
|
|
59
|
+
import { TransformControls as Ts } from "three/examples/jsm/controls/TransformControls";
|
|
60
60
|
const M = {
|
|
61
61
|
LEFT: 1,
|
|
62
62
|
RIGHT: 2,
|
|
@@ -91,10 +91,10 @@ const M = {
|
|
|
91
91
|
function Y(h) {
|
|
92
92
|
return h.isPerspectiveCamera;
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function H(h) {
|
|
95
95
|
return h.isOrthographicCamera;
|
|
96
96
|
}
|
|
97
|
-
const $ = Math.PI * 2,
|
|
97
|
+
const $ = Math.PI * 2, je = Math.PI / 2, ft = 1e-5, ie = Math.PI / 180;
|
|
98
98
|
function k(h, e, t) {
|
|
99
99
|
return Math.max(e, Math.min(t, h));
|
|
100
100
|
}
|
|
@@ -104,7 +104,7 @@ function A(h, e = ft) {
|
|
|
104
104
|
function P(h, e, t = ft) {
|
|
105
105
|
return A(h - e, t);
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function He(h, e) {
|
|
108
108
|
return Math.round(h / e) * e;
|
|
109
109
|
}
|
|
110
110
|
function re(h) {
|
|
@@ -117,27 +117,27 @@ function ce(h, e, t, s, i = 1 / 0, r) {
|
|
|
117
117
|
s = Math.max(1e-4, s);
|
|
118
118
|
const o = 2 / s, n = o * r, a = 1 / (1 + n + 0.48 * n * n + 0.235 * n * n * n);
|
|
119
119
|
let c = h - e;
|
|
120
|
-
const f = e,
|
|
121
|
-
c = k(c, -
|
|
120
|
+
const f = e, p = i * s;
|
|
121
|
+
c = k(c, -p, p), e = h - c;
|
|
122
122
|
const v = (t.value + o * c) * r;
|
|
123
123
|
t.value = (t.value - o * v) * a;
|
|
124
|
-
let
|
|
125
|
-
return f - h > 0 ==
|
|
124
|
+
let m = e + (c + v) * a;
|
|
125
|
+
return f - h > 0 == m > f && (m = f, t.value = (m - f) / r), m;
|
|
126
126
|
}
|
|
127
127
|
function Be(h, e, t, s, i = 1 / 0, r, o) {
|
|
128
128
|
s = Math.max(1e-4, s);
|
|
129
129
|
const n = 2 / s, a = n * r, c = 1 / (1 + a + 0.48 * a * a + 0.235 * a * a * a);
|
|
130
|
-
let f = e.x,
|
|
131
|
-
const y = f, l =
|
|
132
|
-
if (
|
|
133
|
-
const ve = Math.sqrt(
|
|
134
|
-
|
|
135
|
-
}
|
|
136
|
-
f = h.x -
|
|
137
|
-
const E = (t.x + n *
|
|
138
|
-
t.x = (t.x - n * E) * c, t.y = (t.y - n * x) * c, t.z = (t.z - n *
|
|
139
|
-
const V = y - h.x, le = l - h.y,
|
|
140
|
-
return V * xt + le * Lt +
|
|
130
|
+
let f = e.x, p = e.y, v = e.z, m = h.x - f, u = h.y - p, g = h.z - v;
|
|
131
|
+
const y = f, l = p, _ = v, O = i * s, C = O * O, w = m * m + u * u + g * g;
|
|
132
|
+
if (w > C) {
|
|
133
|
+
const ve = Math.sqrt(w);
|
|
134
|
+
m = m / ve * O, u = u / ve * O, g = g / ve * O;
|
|
135
|
+
}
|
|
136
|
+
f = h.x - m, p = h.y - u, v = h.z - g;
|
|
137
|
+
const E = (t.x + n * m) * r, x = (t.y + n * u) * r, R = (t.z + n * g) * r;
|
|
138
|
+
t.x = (t.x - n * E) * c, t.y = (t.y - n * x) * c, t.z = (t.z - n * R) * c, o.x = f + (m + E) * c, o.y = p + (u + x) * c, o.z = v + (g + R) * c;
|
|
139
|
+
const V = y - h.x, le = l - h.y, bt = _ - h.z, xt = o.x - y, Lt = o.y - l, Pt = o.z - _;
|
|
140
|
+
return V * xt + le * Lt + bt * Pt > 0 && (o.x = y, o.y = l, o.z = _, t.x = (o.x - y) / r, t.y = (o.y - l) / r, t.z = (o.z - _) / r), o;
|
|
141
141
|
}
|
|
142
142
|
function Ee(h, e) {
|
|
143
143
|
e.set(0, 0), h.forEach((t) => {
|
|
@@ -145,9 +145,9 @@ function Ee(h, e) {
|
|
|
145
145
|
}), e.x /= h.length, e.y /= h.length;
|
|
146
146
|
}
|
|
147
147
|
function Te(h, e) {
|
|
148
|
-
return
|
|
148
|
+
return H(h) ? (console.warn(`${e} is not supported in OrthographicCamera`), !0) : !1;
|
|
149
149
|
}
|
|
150
|
-
class
|
|
150
|
+
class ws {
|
|
151
151
|
constructor() {
|
|
152
152
|
this._listeners = {};
|
|
153
153
|
}
|
|
@@ -212,10 +212,10 @@ class Ts {
|
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
214
|
const de = 1 / 8, bs = /Mac/.test(navigator.platform);
|
|
215
|
-
let T, Ve,
|
|
216
|
-
class J extends
|
|
215
|
+
let T, Ve, pe, we, D, b, L, G, ne, F, N, Z, Ye, Ze, z, ae, X, We, be, Ke, xe, Le, me;
|
|
216
|
+
class J extends ws {
|
|
217
217
|
static install(e) {
|
|
218
|
-
T = e.THREE, Ve = Object.freeze(new T.Vector3(0, 0, 0)),
|
|
218
|
+
T = e.THREE, Ve = Object.freeze(new T.Vector3(0, 0, 0)), pe = Object.freeze(new T.Vector3(0, 1, 0)), we = Object.freeze(new T.Vector3(0, 0, 1)), D = new T.Vector2(), b = new T.Vector3(), L = new T.Vector3(), G = new T.Vector3(), ne = new T.Vector3(), F = new T.Vector3(), N = new T.Vector3(), Z = new T.Vector3(), Ye = new T.Vector3(), Ze = new T.Vector3(), z = new T.Spherical(), ae = new T.Spherical(), X = new T.Box3(), We = new T.Box3(), be = new T.Sphere(), Ke = new T.Quaternion(), xe = new T.Quaternion(), Le = new T.Matrix4(), me = new T.Raycaster();
|
|
219
219
|
}
|
|
220
220
|
/**
|
|
221
221
|
* list all ACTIONs
|
|
@@ -244,46 +244,46 @@ class J extends Ts {
|
|
|
244
244
|
constructor(e, t) {
|
|
245
245
|
super(), this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.minDistance = Number.EPSILON, this.maxDistance = 1 / 0, this.infinityDolly = !1, this.minZoom = 0.01, this.maxZoom = 1 / 0, this.smoothTime = 0.25, this.draggingSmoothTime = 0.125, this.maxSpeed = 1 / 0, this.azimuthRotateSpeed = 1, this.polarRotateSpeed = 1, this.dollySpeed = 1, this.dollyDragInverted = !1, this.truckSpeed = 2, this.dollyToCursor = !1, this.dragToOffset = !1, this.boundaryFriction = 0, this.restThreshold = 0.01, this.colliderMeshes = [], this.cancel = () => {
|
|
246
246
|
}, this._enabled = !0, this._state = d.NONE, this._viewport = null, this._changedDolly = 0, this._changedZoom = 0, this._hasRested = !0, this._boundaryEnclosesCamera = !1, this._needsUpdate = !0, this._updatedLastTime = !1, this._elementRect = new DOMRect(), this._isDragging = !1, this._dragNeedsUpdate = !0, this._activePointers = [], this._lockedPointer = null, this._interactiveArea = new DOMRect(0, 0, 1, 1), this._isUserControllingRotate = !1, this._isUserControllingDolly = !1, this._isUserControllingTruck = !1, this._isUserControllingOffset = !1, this._isUserControllingZoom = !1, this._lastDollyDirection = K.NONE, this._thetaVelocity = { value: 0 }, this._phiVelocity = { value: 0 }, this._radiusVelocity = { value: 0 }, this._targetVelocity = new T.Vector3(), this._focalOffsetVelocity = new T.Vector3(), this._zoomVelocity = { value: 0 }, this._truckInternal = (l, _, O, C) => {
|
|
247
|
-
let
|
|
247
|
+
let w, E;
|
|
248
248
|
if (Y(this._camera)) {
|
|
249
|
-
const x =
|
|
250
|
-
|
|
251
|
-
} else if (
|
|
249
|
+
const x = b.copy(this._camera.position).sub(this._target), R = this._camera.getEffectiveFOV() * ie, V = x.length() * Math.tan(R * 0.5);
|
|
250
|
+
w = this.truckSpeed * l * V / this._elementRect.height, E = this.truckSpeed * _ * V / this._elementRect.height;
|
|
251
|
+
} else if (H(this._camera)) {
|
|
252
252
|
const x = this._camera;
|
|
253
|
-
|
|
253
|
+
w = this.truckSpeed * l * (x.right - x.left) / x.zoom / this._elementRect.width, E = this.truckSpeed * _ * (x.top - x.bottom) / x.zoom / this._elementRect.height;
|
|
254
254
|
} else
|
|
255
255
|
return;
|
|
256
256
|
C ? (O ? this.setFocalOffset(
|
|
257
|
-
this._focalOffsetEnd.x +
|
|
257
|
+
this._focalOffsetEnd.x + w,
|
|
258
258
|
this._focalOffsetEnd.y,
|
|
259
259
|
this._focalOffsetEnd.z,
|
|
260
260
|
!0
|
|
261
|
-
) : this.truck(
|
|
262
|
-
this._focalOffsetEnd.x +
|
|
261
|
+
) : this.truck(w, 0, !0), this.forward(-E, !0)) : O ? this.setFocalOffset(
|
|
262
|
+
this._focalOffsetEnd.x + w,
|
|
263
263
|
this._focalOffsetEnd.y + E,
|
|
264
264
|
this._focalOffsetEnd.z,
|
|
265
265
|
!0
|
|
266
|
-
) : this.truck(
|
|
266
|
+
) : this.truck(w, E, !0);
|
|
267
267
|
}, this._rotateInternal = (l, _) => {
|
|
268
268
|
const O = $ * this.azimuthRotateSpeed * l / this._elementRect.height, C = $ * this.polarRotateSpeed * _ / this._elementRect.height;
|
|
269
269
|
this.rotate(O, C, !0);
|
|
270
270
|
}, this._dollyInternal = (l, _, O) => {
|
|
271
|
-
const C = Math.pow(0.95, -l * this.dollySpeed),
|
|
271
|
+
const C = Math.pow(0.95, -l * this.dollySpeed), w = this._sphericalEnd.radius, E = this._sphericalEnd.radius * C, x = k(
|
|
272
272
|
E,
|
|
273
273
|
this.minDistance,
|
|
274
274
|
this.maxDistance
|
|
275
|
-
),
|
|
276
|
-
this.infinityDolly && this.dollyToCursor ? this._dollyToNoClamp(E, !0) : this.infinityDolly && !this.dollyToCursor ? (this.dollyInFixed(
|
|
275
|
+
), R = x - E;
|
|
276
|
+
this.infinityDolly && this.dollyToCursor ? this._dollyToNoClamp(E, !0) : this.infinityDolly && !this.dollyToCursor ? (this.dollyInFixed(R, !0), this._dollyToNoClamp(x, !0)) : this._dollyToNoClamp(x, !0), this.dollyToCursor && (this._changedDolly += (this.infinityDolly ? E : x) - w, this._dollyControlCoord.set(_, O)), this._lastDollyDirection = Math.sign(-l);
|
|
277
277
|
}, this._zoomInternal = (l, _, O) => {
|
|
278
|
-
const C = Math.pow(0.95, l * this.dollySpeed),
|
|
279
|
-
this.zoomTo(E, !0), this.dollyToCursor && (this._changedZoom += E -
|
|
278
|
+
const C = Math.pow(0.95, l * this.dollySpeed), w = this._zoom, E = this._zoom * C;
|
|
279
|
+
this.zoomTo(E, !0), this.dollyToCursor && (this._changedZoom += E - w, this._dollyControlCoord.set(_, O));
|
|
280
280
|
}, typeof T == "undefined" && console.error(
|
|
281
281
|
"camera-controls: `THREE` is undefined. You must first run `CameraControls.install( { THREE: THREE } )`. Check the docs for further information."
|
|
282
282
|
), this._camera = e, this._yAxisUpSpace = new T.Quaternion().setFromUnitVectors(
|
|
283
283
|
this._camera.up,
|
|
284
|
-
|
|
284
|
+
pe
|
|
285
285
|
), this._yAxisUpSpaceInverse = this._yAxisUpSpace.clone().invert(), this._state = d.NONE, this._target = new T.Vector3(), this._targetEnd = this._target.clone(), this._focalOffset = new T.Vector3(), this._focalOffsetEnd = this._focalOffset.clone(), this._spherical = new T.Spherical().setFromVector3(
|
|
286
|
-
|
|
286
|
+
b.copy(this._camera.position).applyQuaternion(this._yAxisUpSpace)
|
|
287
287
|
), this._sphericalEnd = this._spherical.clone(), this._lastDistance = this._spherical.radius, this._zoom = this._camera.zoom, this._zoomEnd = this._zoom, this._lastZoom = this._zoom, this._nearPlaneCorners = [
|
|
288
288
|
new T.Vector3(),
|
|
289
289
|
new T.Vector3(),
|
|
@@ -296,17 +296,17 @@ class J extends Ts {
|
|
|
296
296
|
left: d.ROTATE,
|
|
297
297
|
middle: d.DOLLY,
|
|
298
298
|
right: d.TRUCK,
|
|
299
|
-
wheel: Y(this._camera) ? d.DOLLY :
|
|
299
|
+
wheel: Y(this._camera) ? d.DOLLY : H(this._camera) ? d.ZOOM : d.NONE
|
|
300
300
|
}, this.touches = {
|
|
301
301
|
one: d.TOUCH_ROTATE,
|
|
302
|
-
two: Y(this._camera) ? d.TOUCH_DOLLY_TRUCK :
|
|
302
|
+
two: Y(this._camera) ? d.TOUCH_DOLLY_TRUCK : H(this._camera) ? d.TOUCH_ZOOM_TRUCK : d.NONE,
|
|
303
303
|
three: d.TOUCH_TRUCK
|
|
304
304
|
};
|
|
305
305
|
const s = new T.Vector2(), i = new T.Vector2(), r = new T.Vector2(), o = (l) => {
|
|
306
306
|
if (!this._enabled || !this._domElement) return;
|
|
307
307
|
if (this._interactiveArea.left !== 0 || this._interactiveArea.top !== 0 || this._interactiveArea.width !== 1 || this._interactiveArea.height !== 1) {
|
|
308
|
-
const C = this._domElement.getBoundingClientRect(),
|
|
309
|
-
if (
|
|
308
|
+
const C = this._domElement.getBoundingClientRect(), w = (l.clientX - C.left) / (C.right - C.left), E = (l.clientY - C.top) / (C.bottom - C.top);
|
|
309
|
+
if (w < this._interactiveArea.left || w > this._interactiveArea.right || E < this._interactiveArea.top || E > this._interactiveArea.bottom)
|
|
310
310
|
return;
|
|
311
311
|
}
|
|
312
312
|
const _ = l.pointerType !== "mouse" ? null : (l.buttons & M.LEFT) === M.LEFT ? M.LEFT : (l.buttons & M.MIDDLE) === M.MIDDLE ? M.MIDDLE : (l.buttons & M.RIGHT) === M.RIGHT ? M.RIGHT : null;
|
|
@@ -354,7 +354,7 @@ class J extends Ts {
|
|
|
354
354
|
}
|
|
355
355
|
else
|
|
356
356
|
(!this._isDragging && this._lockedPointer || this._isDragging && (l.buttons & M.LEFT) === M.LEFT) && (this._state = this._state | this.mouseButtons.left), this._isDragging && (l.buttons & M.MIDDLE) === M.MIDDLE && (this._state = this._state | this.mouseButtons.middle), this._isDragging && (l.buttons & M.RIGHT) === M.RIGHT && (this._state = this._state | this.mouseButtons.right);
|
|
357
|
-
|
|
357
|
+
m();
|
|
358
358
|
}
|
|
359
359
|
}, a = (l) => {
|
|
360
360
|
const _ = this._findPointerById(l.pointerId);
|
|
@@ -383,15 +383,15 @@ class J extends Ts {
|
|
|
383
383
|
const f = (l) => {
|
|
384
384
|
if (!this._domElement || !this._enabled || this.mouseButtons.wheel === d.NONE) return;
|
|
385
385
|
if (this._interactiveArea.left !== 0 || this._interactiveArea.top !== 0 || this._interactiveArea.width !== 1 || this._interactiveArea.height !== 1) {
|
|
386
|
-
const E = this._domElement.getBoundingClientRect(), x = (l.clientX - E.left) / (E.right - E.left),
|
|
387
|
-
if (x < this._interactiveArea.left || x > this._interactiveArea.right ||
|
|
386
|
+
const E = this._domElement.getBoundingClientRect(), x = (l.clientX - E.left) / (E.right - E.left), R = (l.clientY - E.top) / (E.bottom - E.top);
|
|
387
|
+
if (x < this._interactiveArea.left || x > this._interactiveArea.right || R < this._interactiveArea.top || R > this._interactiveArea.bottom)
|
|
388
388
|
return;
|
|
389
389
|
}
|
|
390
390
|
if (l.preventDefault(), this.dollyToCursor || this.mouseButtons.wheel === d.ROTATE || this.mouseButtons.wheel === d.TRUCK) {
|
|
391
391
|
const E = performance.now();
|
|
392
392
|
c - E < 1e3 && this._getClientRect(this._elementRect), c = E;
|
|
393
393
|
}
|
|
394
|
-
const _ = bs ? -1 : -3, O = l.deltaMode === 1 || l.ctrlKey ? l.deltaY / _ : l.deltaY / (_ * 10), C = this.dollyToCursor ? (l.clientX - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0,
|
|
394
|
+
const _ = bs ? -1 : -3, O = l.deltaMode === 1 || l.ctrlKey ? l.deltaY / _ : l.deltaY / (_ * 10), C = this.dollyToCursor ? (l.clientX - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, w = this.dollyToCursor ? (l.clientY - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0;
|
|
395
395
|
switch (this.mouseButtons.wheel) {
|
|
396
396
|
case d.ROTATE: {
|
|
397
397
|
this._rotateInternal(l.deltaX, l.deltaY), this._isUserControllingRotate = !0;
|
|
@@ -410,16 +410,16 @@ class J extends Ts {
|
|
|
410
410
|
break;
|
|
411
411
|
}
|
|
412
412
|
case d.DOLLY: {
|
|
413
|
-
this._dollyInternal(-O, C,
|
|
413
|
+
this._dollyInternal(-O, C, w), this._isUserControllingDolly = !0;
|
|
414
414
|
break;
|
|
415
415
|
}
|
|
416
416
|
case d.ZOOM: {
|
|
417
|
-
this._zoomInternal(-O, C,
|
|
417
|
+
this._zoomInternal(-O, C, w), this._isUserControllingZoom = !0;
|
|
418
418
|
break;
|
|
419
419
|
}
|
|
420
420
|
}
|
|
421
421
|
this.dispatchEvent({ type: "control" });
|
|
422
|
-
},
|
|
422
|
+
}, p = (l) => {
|
|
423
423
|
if (!(!this._domElement || !this._enabled)) {
|
|
424
424
|
if (this.mouseButtons.right === J.ACTION.NONE) {
|
|
425
425
|
const _ = l instanceof PointerEvent ? l.pointerId : 0, O = this._findPointerById(_);
|
|
@@ -437,9 +437,9 @@ class J extends Ts {
|
|
|
437
437
|
}
|
|
438
438
|
}, v = (l) => {
|
|
439
439
|
if (!this._enabled) return;
|
|
440
|
-
if (Ee(this._activePointers,
|
|
441
|
-
const O =
|
|
442
|
-
r.set(0,
|
|
440
|
+
if (Ee(this._activePointers, D), this._getClientRect(this._elementRect), s.copy(D), i.copy(D), this._activePointers.length >= 2) {
|
|
441
|
+
const O = D.x - this._activePointers[1].clientX, C = D.y - this._activePointers[1].clientY, w = Math.sqrt(O * O + C * C);
|
|
442
|
+
r.set(0, w);
|
|
443
443
|
const E = (this._activePointers[0].clientX + this._activePointers[1].clientX) * 0.5, x = (this._activePointers[0].clientY + this._activePointers[1].clientY) * 0.5;
|
|
444
444
|
i.set(E, x);
|
|
445
445
|
}
|
|
@@ -460,31 +460,31 @@ class J extends Ts {
|
|
|
460
460
|
else
|
|
461
461
|
!this._lockedPointer && (l.buttons & M.LEFT) === M.LEFT && (this._state = this._state | this.mouseButtons.left), (l.buttons & M.MIDDLE) === M.MIDDLE && (this._state = this._state | this.mouseButtons.middle), (l.buttons & M.RIGHT) === M.RIGHT && (this._state = this._state | this.mouseButtons.right);
|
|
462
462
|
((this._state & d.ROTATE) === d.ROTATE || (this._state & d.TOUCH_ROTATE) === d.TOUCH_ROTATE || (this._state & d.TOUCH_DOLLY_ROTATE) === d.TOUCH_DOLLY_ROTATE || (this._state & d.TOUCH_ZOOM_ROTATE) === d.TOUCH_ZOOM_ROTATE) && (this._sphericalEnd.theta = this._spherical.theta, this._sphericalEnd.phi = this._spherical.phi, this._thetaVelocity.value = 0, this._phiVelocity.value = 0), ((this._state & d.TRUCK) === d.TRUCK || (this._state & d.SCREEN_PAN) === d.SCREEN_PAN || (this._state & d.TOUCH_TRUCK) === d.TOUCH_TRUCK || (this._state & d.TOUCH_SCREEN_PAN) === d.TOUCH_SCREEN_PAN || (this._state & d.TOUCH_DOLLY_TRUCK) === d.TOUCH_DOLLY_TRUCK || (this._state & d.TOUCH_DOLLY_SCREEN_PAN) === d.TOUCH_DOLLY_SCREEN_PAN || (this._state & d.TOUCH_ZOOM_TRUCK) === d.TOUCH_ZOOM_TRUCK || (this._state & d.TOUCH_ZOOM_SCREEN_PAN) === d.TOUCH_DOLLY_SCREEN_PAN) && (this._targetEnd.copy(this._target), this._targetVelocity.set(0, 0, 0)), ((this._state & d.DOLLY) === d.DOLLY || (this._state & d.TOUCH_DOLLY) === d.TOUCH_DOLLY || (this._state & d.TOUCH_DOLLY_TRUCK) === d.TOUCH_DOLLY_TRUCK || (this._state & d.TOUCH_DOLLY_SCREEN_PAN) === d.TOUCH_DOLLY_SCREEN_PAN || (this._state & d.TOUCH_DOLLY_OFFSET) === d.TOUCH_DOLLY_OFFSET || (this._state & d.TOUCH_DOLLY_ROTATE) === d.TOUCH_DOLLY_ROTATE) && (this._sphericalEnd.radius = this._spherical.radius, this._radiusVelocity.value = 0), ((this._state & d.ZOOM) === d.ZOOM || (this._state & d.TOUCH_ZOOM) === d.TOUCH_ZOOM || (this._state & d.TOUCH_ZOOM_TRUCK) === d.TOUCH_ZOOM_TRUCK || (this._state & d.TOUCH_ZOOM_SCREEN_PAN) === d.TOUCH_ZOOM_SCREEN_PAN || (this._state & d.TOUCH_ZOOM_OFFSET) === d.TOUCH_ZOOM_OFFSET || (this._state & d.TOUCH_ZOOM_ROTATE) === d.TOUCH_ZOOM_ROTATE) && (this._zoomEnd = this._zoom, this._zoomVelocity.value = 0), ((this._state & d.OFFSET) === d.OFFSET || (this._state & d.TOUCH_OFFSET) === d.TOUCH_OFFSET || (this._state & d.TOUCH_DOLLY_OFFSET) === d.TOUCH_DOLLY_OFFSET || (this._state & d.TOUCH_ZOOM_OFFSET) === d.TOUCH_ZOOM_OFFSET) && (this._focalOffsetEnd.copy(this._focalOffset), this._focalOffsetVelocity.set(0, 0, 0)), this.dispatchEvent({ type: "controlstart" });
|
|
463
|
-
},
|
|
463
|
+
}, m = () => {
|
|
464
464
|
if (!this._enabled || !this._dragNeedsUpdate) return;
|
|
465
|
-
this._dragNeedsUpdate = !1, Ee(this._activePointers,
|
|
466
|
-
const _ = this._domElement && this._domElement.ownerDocument.pointerLockElement === this._domElement ? this._lockedPointer || this._activePointers[0] : null, O = _ ? -_.deltaX : i.x -
|
|
467
|
-
if (i.copy(
|
|
468
|
-
const
|
|
465
|
+
this._dragNeedsUpdate = !1, Ee(this._activePointers, D);
|
|
466
|
+
const _ = this._domElement && this._domElement.ownerDocument.pointerLockElement === this._domElement ? this._lockedPointer || this._activePointers[0] : null, O = _ ? -_.deltaX : i.x - D.x, C = _ ? -_.deltaY : i.y - D.y;
|
|
467
|
+
if (i.copy(D), ((this._state & d.ROTATE) === d.ROTATE || (this._state & d.TOUCH_ROTATE) === d.TOUCH_ROTATE || (this._state & d.TOUCH_DOLLY_ROTATE) === d.TOUCH_DOLLY_ROTATE || (this._state & d.TOUCH_ZOOM_ROTATE) === d.TOUCH_ZOOM_ROTATE) && (this._rotateInternal(O, C), this._isUserControllingRotate = !0), (this._state & d.DOLLY) === d.DOLLY || (this._state & d.ZOOM) === d.ZOOM) {
|
|
468
|
+
const w = this.dollyToCursor ? (s.x - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, E = this.dollyToCursor ? (s.y - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0, x = this.dollyDragInverted ? -1 : 1;
|
|
469
469
|
(this._state & d.DOLLY) === d.DOLLY ? (this._dollyInternal(
|
|
470
470
|
x * C * de,
|
|
471
|
-
|
|
471
|
+
w,
|
|
472
472
|
E
|
|
473
473
|
), this._isUserControllingDolly = !0) : (this._zoomInternal(
|
|
474
474
|
x * C * de,
|
|
475
|
-
|
|
475
|
+
w,
|
|
476
476
|
E
|
|
477
477
|
), this._isUserControllingZoom = !0);
|
|
478
478
|
}
|
|
479
479
|
if ((this._state & d.TOUCH_DOLLY) === d.TOUCH_DOLLY || (this._state & d.TOUCH_ZOOM) === d.TOUCH_ZOOM || (this._state & d.TOUCH_DOLLY_TRUCK) === d.TOUCH_DOLLY_TRUCK || (this._state & d.TOUCH_ZOOM_TRUCK) === d.TOUCH_ZOOM_TRUCK || (this._state & d.TOUCH_DOLLY_SCREEN_PAN) === d.TOUCH_DOLLY_SCREEN_PAN || (this._state & d.TOUCH_ZOOM_SCREEN_PAN) === d.TOUCH_ZOOM_SCREEN_PAN || (this._state & d.TOUCH_DOLLY_OFFSET) === d.TOUCH_DOLLY_OFFSET || (this._state & d.TOUCH_ZOOM_OFFSET) === d.TOUCH_ZOOM_OFFSET || (this._state & d.TOUCH_DOLLY_ROTATE) === d.TOUCH_DOLLY_ROTATE || (this._state & d.TOUCH_ZOOM_ROTATE) === d.TOUCH_ZOOM_ROTATE) {
|
|
480
|
-
const
|
|
480
|
+
const w = D.x - this._activePointers[1].clientX, E = D.y - this._activePointers[1].clientY, x = Math.sqrt(w * w + E * E), R = r.y - x;
|
|
481
481
|
r.set(0, x);
|
|
482
482
|
const V = this.dollyToCursor ? (i.x - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, le = this.dollyToCursor ? (i.y - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0;
|
|
483
|
-
(this._state & d.TOUCH_DOLLY) === d.TOUCH_DOLLY || (this._state & d.TOUCH_DOLLY_ROTATE) === d.TOUCH_DOLLY_ROTATE || (this._state & d.TOUCH_DOLLY_TRUCK) === d.TOUCH_DOLLY_TRUCK || (this._state & d.TOUCH_DOLLY_SCREEN_PAN) === d.TOUCH_DOLLY_SCREEN_PAN || (this._state & d.TOUCH_DOLLY_OFFSET) === d.TOUCH_DOLLY_OFFSET ? (this._dollyInternal(
|
|
483
|
+
(this._state & d.TOUCH_DOLLY) === d.TOUCH_DOLLY || (this._state & d.TOUCH_DOLLY_ROTATE) === d.TOUCH_DOLLY_ROTATE || (this._state & d.TOUCH_DOLLY_TRUCK) === d.TOUCH_DOLLY_TRUCK || (this._state & d.TOUCH_DOLLY_SCREEN_PAN) === d.TOUCH_DOLLY_SCREEN_PAN || (this._state & d.TOUCH_DOLLY_OFFSET) === d.TOUCH_DOLLY_OFFSET ? (this._dollyInternal(R * de, V, le), this._isUserControllingDolly = !0) : (this._zoomInternal(R * de, V, le), this._isUserControllingZoom = !0);
|
|
484
484
|
}
|
|
485
485
|
((this._state & d.TRUCK) === d.TRUCK || (this._state & d.TOUCH_TRUCK) === d.TOUCH_TRUCK || (this._state & d.TOUCH_DOLLY_TRUCK) === d.TOUCH_DOLLY_TRUCK || (this._state & d.TOUCH_ZOOM_TRUCK) === d.TOUCH_ZOOM_TRUCK) && (this._truckInternal(O, C, !1, !1), this._isUserControllingTruck = !0), ((this._state & d.SCREEN_PAN) === d.SCREEN_PAN || (this._state & d.TOUCH_SCREEN_PAN) === d.TOUCH_SCREEN_PAN || (this._state & d.TOUCH_DOLLY_SCREEN_PAN) === d.TOUCH_DOLLY_SCREEN_PAN || (this._state & d.TOUCH_ZOOM_SCREEN_PAN) === d.TOUCH_ZOOM_SCREEN_PAN) && (this._truckInternal(O, C, !1, !0), this._isUserControllingTruck = !0), ((this._state & d.OFFSET) === d.OFFSET || (this._state & d.TOUCH_OFFSET) === d.TOUCH_OFFSET || (this._state & d.TOUCH_DOLLY_OFFSET) === d.TOUCH_DOLLY_OFFSET || (this._state & d.TOUCH_ZOOM_OFFSET) === d.TOUCH_ZOOM_OFFSET) && (this._truckInternal(O, C, !0, !1), this._isUserControllingOffset = !0), this.dispatchEvent({ type: "control" });
|
|
486
486
|
}, u = () => {
|
|
487
|
-
Ee(this._activePointers,
|
|
487
|
+
Ee(this._activePointers, D), i.copy(D), this._dragNeedsUpdate = !1, (this._activePointers.length === 0 || this._activePointers.length === 1 && this._activePointers[0] === this._lockedPointer) && (this._isDragging = !1), this._activePointers.length === 0 && this._domElement && (this._domElement.ownerDocument.removeEventListener(
|
|
488
488
|
"pointermove",
|
|
489
489
|
n,
|
|
490
490
|
{ passive: !1 }
|
|
@@ -537,11 +537,11 @@ class J extends Ts {
|
|
|
537
537
|
this._addAllEventListeners = (l) => {
|
|
538
538
|
this._domElement = l, this._domElement.style.touchAction = "none", this._domElement.style.userSelect = "none", this._domElement.style.webkitUserSelect = "none", this._domElement.addEventListener("pointerdown", o), this._domElement.addEventListener("pointercancel", a), this._domElement.addEventListener("wheel", f, {
|
|
539
539
|
passive: !1
|
|
540
|
-
}), this._domElement.addEventListener("contextmenu",
|
|
540
|
+
}), this._domElement.addEventListener("contextmenu", p);
|
|
541
541
|
}, this._removeAllEventListeners = () => {
|
|
542
542
|
this._domElement && (this._domElement.style.touchAction = "", this._domElement.style.userSelect = "", this._domElement.style.webkitUserSelect = "", this._domElement.removeEventListener("pointerdown", o), this._domElement.removeEventListener("pointercancel", a), this._domElement.removeEventListener("wheel", f, {
|
|
543
543
|
passive: !1
|
|
544
|
-
}), this._domElement.removeEventListener("contextmenu",
|
|
544
|
+
}), this._domElement.removeEventListener("contextmenu", p), this._domElement.ownerDocument.removeEventListener(
|
|
545
545
|
"pointermove",
|
|
546
546
|
n,
|
|
547
547
|
{ passive: !1 }
|
|
@@ -900,7 +900,7 @@ class J extends Ts {
|
|
|
900
900
|
*/
|
|
901
901
|
truck(e, t, s = !1) {
|
|
902
902
|
this._camera.updateMatrix(), F.setFromMatrixColumn(this._camera.matrix, 0), N.setFromMatrixColumn(this._camera.matrix, 1), F.multiplyScalar(e), N.multiplyScalar(-t);
|
|
903
|
-
const i =
|
|
903
|
+
const i = b.copy(F).add(N), r = L.copy(this._targetEnd).add(i);
|
|
904
904
|
return this.moveTo(r.x, r.y, r.z, s);
|
|
905
905
|
}
|
|
906
906
|
/**
|
|
@@ -910,8 +910,8 @@ class J extends Ts {
|
|
|
910
910
|
* @category Methods
|
|
911
911
|
*/
|
|
912
912
|
forward(e, t = !1) {
|
|
913
|
-
|
|
914
|
-
const s = L.copy(this._targetEnd).add(
|
|
913
|
+
b.setFromMatrixColumn(this._camera.matrix, 0), b.crossVectors(this._camera.up, b), b.multiplyScalar(e);
|
|
914
|
+
const s = L.copy(this._targetEnd).add(b);
|
|
915
915
|
return this.moveTo(s.x, s.y, s.z, t);
|
|
916
916
|
}
|
|
917
917
|
/**
|
|
@@ -921,10 +921,10 @@ class J extends Ts {
|
|
|
921
921
|
* @category Methods
|
|
922
922
|
*/
|
|
923
923
|
elevate(e, t = !1) {
|
|
924
|
-
return
|
|
925
|
-
this._targetEnd.x +
|
|
926
|
-
this._targetEnd.y +
|
|
927
|
-
this._targetEnd.z +
|
|
924
|
+
return b.copy(this._camera.up).multiplyScalar(e), this.moveTo(
|
|
925
|
+
this._targetEnd.x + b.x,
|
|
926
|
+
this._targetEnd.y + b.y,
|
|
927
|
+
this._targetEnd.z + b.z,
|
|
928
928
|
t
|
|
929
929
|
);
|
|
930
930
|
}
|
|
@@ -938,7 +938,7 @@ class J extends Ts {
|
|
|
938
938
|
*/
|
|
939
939
|
moveTo(e, t, s, i = !1) {
|
|
940
940
|
this._isUserControllingTruck = !1;
|
|
941
|
-
const r =
|
|
941
|
+
const r = b.set(e, t, s).sub(this._targetEnd);
|
|
942
942
|
this._encloseToBoundary(this._targetEnd, r, this.boundaryFriction), this._needsUpdate = !0, i || this._target.copy(this._targetEnd);
|
|
943
943
|
const o = !i || P(this._target.x, this._targetEnd.x, this.restThreshold) && P(this._target.y, this._targetEnd.y, this.restThreshold) && P(this._target.z, this._targetEnd.z, this.restThreshold);
|
|
944
944
|
return this._createOnRestPromise(o);
|
|
@@ -953,7 +953,7 @@ class J extends Ts {
|
|
|
953
953
|
* @category Methods
|
|
954
954
|
*/
|
|
955
955
|
lookInDirectionOf(e, t, s, i = !1) {
|
|
956
|
-
const n =
|
|
956
|
+
const n = b.set(e, t, s).sub(this._targetEnd).normalize().multiplyScalar(-this._sphericalEnd.radius).add(this._targetEnd);
|
|
957
957
|
return this.setPosition(
|
|
958
958
|
n.x,
|
|
959
959
|
n.y,
|
|
@@ -985,13 +985,13 @@ class J extends Ts {
|
|
|
985
985
|
c.isEmpty() && (console.warn(
|
|
986
986
|
"camera-controls: fitTo() cannot be used with an empty box. Aborting"
|
|
987
987
|
), Promise.resolve());
|
|
988
|
-
const f =
|
|
989
|
-
a.push(this.rotateTo(f,
|
|
990
|
-
const v =
|
|
991
|
-
u &&
|
|
988
|
+
const f = He(this._sphericalEnd.theta, je), p = He(this._sphericalEnd.phi, je);
|
|
989
|
+
a.push(this.rotateTo(f, p, t));
|
|
990
|
+
const v = b.setFromSpherical(this._sphericalEnd).normalize(), m = Ke.setFromUnitVectors(v, we), u = P(Math.abs(v.y), 1);
|
|
991
|
+
u && m.multiply(xe.setFromAxisAngle(pe, f)), m.multiply(this._yAxisUpSpaceInverse);
|
|
992
992
|
const g = We.makeEmpty();
|
|
993
|
-
L.copy(c.min).applyQuaternion(
|
|
994
|
-
const y = g.getSize(
|
|
993
|
+
L.copy(c.min).applyQuaternion(m), g.expandByPoint(L), L.copy(c.min).setX(c.max.x).applyQuaternion(m), g.expandByPoint(L), L.copy(c.min).setY(c.max.y).applyQuaternion(m), g.expandByPoint(L), L.copy(c.max).setZ(c.min.z).applyQuaternion(m), g.expandByPoint(L), L.copy(c.min).setZ(c.max.z).applyQuaternion(m), g.expandByPoint(L), L.copy(c.max).setY(c.min.y).applyQuaternion(m), g.expandByPoint(L), L.copy(c.max).setX(c.min.x).applyQuaternion(m), g.expandByPoint(L), L.copy(c.max).applyQuaternion(m), g.expandByPoint(L), g.min.x -= i, g.min.y -= o, g.max.x += r, g.max.y += n, m.setFromUnitVectors(we, v), u && m.premultiply(xe.invert()), m.premultiply(this._yAxisUpSpace);
|
|
994
|
+
const y = g.getSize(b), l = g.getCenter(L).applyQuaternion(m);
|
|
995
995
|
if (Y(this._camera)) {
|
|
996
996
|
const _ = this.getDistanceToFitBox(
|
|
997
997
|
y.x,
|
|
@@ -1002,11 +1002,11 @@ class J extends Ts {
|
|
|
1002
1002
|
a.push(
|
|
1003
1003
|
this.moveTo(l.x, l.y, l.z, t)
|
|
1004
1004
|
), a.push(this.dollyTo(_, t)), a.push(this.setFocalOffset(0, 0, 0, t));
|
|
1005
|
-
} else if (
|
|
1006
|
-
const _ = this._camera, O = _.right - _.left, C = _.top - _.bottom,
|
|
1005
|
+
} else if (H(this._camera)) {
|
|
1006
|
+
const _ = this._camera, O = _.right - _.left, C = _.top - _.bottom, w = s ? Math.max(O / y.x, C / y.y) : Math.min(O / y.x, C / y.y);
|
|
1007
1007
|
a.push(
|
|
1008
1008
|
this.moveTo(l.x, l.y, l.z, t)
|
|
1009
|
-
), a.push(this.zoomTo(
|
|
1009
|
+
), a.push(this.zoomTo(w, t)), a.push(this.setFocalOffset(0, 0, 0, t));
|
|
1010
1010
|
}
|
|
1011
1011
|
return Promise.all(a);
|
|
1012
1012
|
}
|
|
@@ -1017,7 +1017,7 @@ class J extends Ts {
|
|
|
1017
1017
|
* @category Methods
|
|
1018
1018
|
*/
|
|
1019
1019
|
fitToSphere(e, t) {
|
|
1020
|
-
const s = [], r = "isObject3D" in e ? J.createBoundingSphere(e,
|
|
1020
|
+
const s = [], r = "isObject3D" in e ? J.createBoundingSphere(e, be) : be.copy(e);
|
|
1021
1021
|
if (s.push(
|
|
1022
1022
|
this.moveTo(
|
|
1023
1023
|
r.center.x,
|
|
@@ -1028,7 +1028,7 @@ class J extends Ts {
|
|
|
1028
1028
|
), Y(this._camera)) {
|
|
1029
1029
|
const o = this.getDistanceToFitSphere(r.radius);
|
|
1030
1030
|
s.push(this.dollyTo(o, t));
|
|
1031
|
-
} else if (
|
|
1031
|
+
} else if (H(this._camera)) {
|
|
1032
1032
|
const o = this._camera.right - this._camera.left, n = this._camera.top - this._camera.bottom, a = 2 * r.radius, c = Math.min(o / a, n / a);
|
|
1033
1033
|
s.push(this.zoomTo(c, t));
|
|
1034
1034
|
}
|
|
@@ -1047,7 +1047,7 @@ class J extends Ts {
|
|
|
1047
1047
|
*/
|
|
1048
1048
|
setLookAt(e, t, s, i, r, o, n = !1) {
|
|
1049
1049
|
this._isUserControllingRotate = !1, this._isUserControllingDolly = !1, this._isUserControllingTruck = !1, this._lastDollyDirection = K.NONE, this._changedDolly = 0;
|
|
1050
|
-
const a = L.set(i, r, o), c =
|
|
1050
|
+
const a = L.set(i, r, o), c = b.set(e, t, s);
|
|
1051
1051
|
this._targetEnd.copy(a), this._sphericalEnd.setFromVector3(
|
|
1052
1052
|
c.sub(a).applyQuaternion(this._yAxisUpSpace)
|
|
1053
1053
|
), this.normalizeRotations(), this._needsUpdate = !0, n || (this._target.copy(this._targetEnd), this._spherical.copy(this._sphericalEnd));
|
|
@@ -1084,21 +1084,21 @@ class J extends Ts {
|
|
|
1084
1084
|
* @param enableTransition
|
|
1085
1085
|
* @category Methods
|
|
1086
1086
|
*/
|
|
1087
|
-
lerpLookAt(e, t, s, i, r, o, n, a, c, f,
|
|
1087
|
+
lerpLookAt(e, t, s, i, r, o, n, a, c, f, p, v, m, u = !1) {
|
|
1088
1088
|
this._isUserControllingRotate = !1, this._isUserControllingDolly = !1, this._isUserControllingTruck = !1, this._lastDollyDirection = K.NONE, this._changedDolly = 0;
|
|
1089
|
-
const g =
|
|
1089
|
+
const g = b.set(i, r, o), y = L.set(e, t, s);
|
|
1090
1090
|
z.setFromVector3(
|
|
1091
1091
|
y.sub(g).applyQuaternion(this._yAxisUpSpace)
|
|
1092
1092
|
);
|
|
1093
|
-
const l = G.set(f,
|
|
1093
|
+
const l = G.set(f, p, v), _ = L.set(n, a, c);
|
|
1094
1094
|
ae.setFromVector3(
|
|
1095
1095
|
_.sub(l).applyQuaternion(this._yAxisUpSpace)
|
|
1096
|
-
), this._targetEnd.copy(g.lerp(l,
|
|
1097
|
-
const O = ae.theta - z.theta, C = ae.phi - z.phi,
|
|
1096
|
+
), this._targetEnd.copy(g.lerp(l, m));
|
|
1097
|
+
const O = ae.theta - z.theta, C = ae.phi - z.phi, w = ae.radius - z.radius;
|
|
1098
1098
|
this._sphericalEnd.set(
|
|
1099
|
-
z.radius +
|
|
1100
|
-
z.phi + C *
|
|
1101
|
-
z.theta + O *
|
|
1099
|
+
z.radius + w * m,
|
|
1100
|
+
z.phi + C * m,
|
|
1101
|
+
z.theta + O * m
|
|
1102
1102
|
), this.normalizeRotations(), this._needsUpdate = !0, u || (this._target.copy(this._targetEnd), this._spherical.copy(this._sphericalEnd));
|
|
1103
1103
|
const E = !u || P(this._target.x, this._targetEnd.x, this.restThreshold) && P(this._target.y, this._targetEnd.y, this.restThreshold) && P(this._target.z, this._targetEnd.z, this.restThreshold) && P(
|
|
1104
1104
|
this._spherical.theta,
|
|
@@ -1145,7 +1145,7 @@ class J extends Ts {
|
|
|
1145
1145
|
* @category Methods
|
|
1146
1146
|
*/
|
|
1147
1147
|
setTarget(e, t, s, i = !1) {
|
|
1148
|
-
const r = this.getPosition(
|
|
1148
|
+
const r = this.getPosition(b), o = this.setLookAt(
|
|
1149
1149
|
r.x,
|
|
1150
1150
|
r.y,
|
|
1151
1151
|
r.z,
|
|
@@ -1195,8 +1195,8 @@ class J extends Ts {
|
|
|
1195
1195
|
*/
|
|
1196
1196
|
setOrbitPoint(e, t, s) {
|
|
1197
1197
|
this._camera.updateMatrixWorld(), F.setFromMatrixColumn(this._camera.matrixWorldInverse, 0), N.setFromMatrixColumn(this._camera.matrixWorldInverse, 1), Z.setFromMatrixColumn(this._camera.matrixWorldInverse, 2);
|
|
1198
|
-
const i =
|
|
1199
|
-
F.multiplyScalar(o.x), N.multiplyScalar(o.y), Z.multiplyScalar(o.z),
|
|
1198
|
+
const i = b.set(e, t, s), r = i.distanceTo(this._camera.position), o = i.sub(this._camera.position);
|
|
1199
|
+
F.multiplyScalar(o.x), N.multiplyScalar(o.y), Z.multiplyScalar(o.z), b.copy(F).add(N).add(Z), b.z = b.z + r, this.dollyTo(r, !1), this.setFocalOffset(-b.x, b.y, -b.z, !1), this.moveTo(e, t, s, !1);
|
|
1200
1200
|
}
|
|
1201
1201
|
/**
|
|
1202
1202
|
* Set the boundary box that encloses the target of the camera. box3 is in THREE.Box3
|
|
@@ -1311,7 +1311,7 @@ class J extends Ts {
|
|
|
1311
1311
|
reset(e = !1) {
|
|
1312
1312
|
if (!P(this._camera.up.x, this._cameraUp0.x) || !P(this._camera.up.y, this._cameraUp0.y) || !P(this._camera.up.z, this._cameraUp0.z)) {
|
|
1313
1313
|
this._camera.up.copy(this._cameraUp0);
|
|
1314
|
-
const s = this.getPosition(
|
|
1314
|
+
const s = this.getPosition(b);
|
|
1315
1315
|
this.updateCameraUp(), this.setPosition(s.x, s.y, s.z);
|
|
1316
1316
|
}
|
|
1317
1317
|
const t = [
|
|
@@ -1347,7 +1347,7 @@ class J extends Ts {
|
|
|
1347
1347
|
* @category Methods
|
|
1348
1348
|
*/
|
|
1349
1349
|
updateCameraUp() {
|
|
1350
|
-
this._yAxisUpSpace.setFromUnitVectors(this._camera.up,
|
|
1350
|
+
this._yAxisUpSpace.setFromUnitVectors(this._camera.up, pe), this._yAxisUpSpaceInverse.copy(this._yAxisUpSpace).invert();
|
|
1351
1351
|
}
|
|
1352
1352
|
/**
|
|
1353
1353
|
* Apply current camera-up direction to the camera.
|
|
@@ -1355,9 +1355,9 @@ class J extends Ts {
|
|
|
1355
1355
|
* @category Methods
|
|
1356
1356
|
*/
|
|
1357
1357
|
applyCameraUp() {
|
|
1358
|
-
const e =
|
|
1358
|
+
const e = b.subVectors(this._target, this._camera.position).normalize(), t = L.crossVectors(e, this._camera.up);
|
|
1359
1359
|
this._camera.up.crossVectors(t, e).normalize(), this._camera.updateMatrixWorld();
|
|
1360
|
-
const s = this.getPosition(
|
|
1360
|
+
const s = this.getPosition(b);
|
|
1361
1361
|
this.updateCameraUp(), this.setPosition(s.x, s.y, s.z);
|
|
1362
1362
|
}
|
|
1363
1363
|
/**
|
|
@@ -1375,12 +1375,12 @@ class J extends Ts {
|
|
|
1375
1375
|
if (A(t))
|
|
1376
1376
|
this._thetaVelocity.value = 0, this._spherical.theta = this._sphericalEnd.theta;
|
|
1377
1377
|
else {
|
|
1378
|
-
const
|
|
1378
|
+
const p = this._isUserControllingRotate ? this.draggingSmoothTime : this.smoothTime;
|
|
1379
1379
|
this._spherical.theta = ce(
|
|
1380
1380
|
this._spherical.theta,
|
|
1381
1381
|
this._sphericalEnd.theta,
|
|
1382
1382
|
this._thetaVelocity,
|
|
1383
|
-
|
|
1383
|
+
p,
|
|
1384
1384
|
1 / 0,
|
|
1385
1385
|
e
|
|
1386
1386
|
), this._needsUpdate = !0;
|
|
@@ -1388,12 +1388,12 @@ class J extends Ts {
|
|
|
1388
1388
|
if (A(s))
|
|
1389
1389
|
this._phiVelocity.value = 0, this._spherical.phi = this._sphericalEnd.phi;
|
|
1390
1390
|
else {
|
|
1391
|
-
const
|
|
1391
|
+
const p = this._isUserControllingRotate ? this.draggingSmoothTime : this.smoothTime;
|
|
1392
1392
|
this._spherical.phi = ce(
|
|
1393
1393
|
this._spherical.phi,
|
|
1394
1394
|
this._sphericalEnd.phi,
|
|
1395
1395
|
this._phiVelocity,
|
|
1396
|
-
|
|
1396
|
+
p,
|
|
1397
1397
|
1 / 0,
|
|
1398
1398
|
e
|
|
1399
1399
|
), this._needsUpdate = !0;
|
|
@@ -1401,12 +1401,12 @@ class J extends Ts {
|
|
|
1401
1401
|
if (A(i))
|
|
1402
1402
|
this._radiusVelocity.value = 0, this._spherical.radius = this._sphericalEnd.radius;
|
|
1403
1403
|
else {
|
|
1404
|
-
const
|
|
1404
|
+
const p = this._isUserControllingDolly ? this.draggingSmoothTime : this.smoothTime;
|
|
1405
1405
|
this._spherical.radius = ce(
|
|
1406
1406
|
this._spherical.radius,
|
|
1407
1407
|
this._sphericalEnd.radius,
|
|
1408
1408
|
this._radiusVelocity,
|
|
1409
|
-
|
|
1409
|
+
p,
|
|
1410
1410
|
this.maxSpeed,
|
|
1411
1411
|
e
|
|
1412
1412
|
), this._needsUpdate = !0;
|
|
@@ -1414,12 +1414,12 @@ class J extends Ts {
|
|
|
1414
1414
|
if (A(r.x) && A(r.y) && A(r.z))
|
|
1415
1415
|
this._targetVelocity.set(0, 0, 0), this._target.copy(this._targetEnd);
|
|
1416
1416
|
else {
|
|
1417
|
-
const
|
|
1417
|
+
const p = this._isUserControllingTruck ? this.draggingSmoothTime : this.smoothTime;
|
|
1418
1418
|
Be(
|
|
1419
1419
|
this._target,
|
|
1420
1420
|
this._targetEnd,
|
|
1421
1421
|
this._targetVelocity,
|
|
1422
|
-
|
|
1422
|
+
p,
|
|
1423
1423
|
this.maxSpeed,
|
|
1424
1424
|
e,
|
|
1425
1425
|
this._target
|
|
@@ -1428,12 +1428,12 @@ class J extends Ts {
|
|
|
1428
1428
|
if (A(o.x) && A(o.y) && A(o.z))
|
|
1429
1429
|
this._focalOffsetVelocity.set(0, 0, 0), this._focalOffset.copy(this._focalOffsetEnd);
|
|
1430
1430
|
else {
|
|
1431
|
-
const
|
|
1431
|
+
const p = this._isUserControllingOffset ? this.draggingSmoothTime : this.smoothTime;
|
|
1432
1432
|
Be(
|
|
1433
1433
|
this._focalOffset,
|
|
1434
1434
|
this._focalOffsetEnd,
|
|
1435
1435
|
this._focalOffsetVelocity,
|
|
1436
|
-
|
|
1436
|
+
p,
|
|
1437
1437
|
this.maxSpeed,
|
|
1438
1438
|
e,
|
|
1439
1439
|
this._focalOffset
|
|
@@ -1442,53 +1442,53 @@ class J extends Ts {
|
|
|
1442
1442
|
if (A(n))
|
|
1443
1443
|
this._zoomVelocity.value = 0, this._zoom = this._zoomEnd;
|
|
1444
1444
|
else {
|
|
1445
|
-
const
|
|
1445
|
+
const p = this._isUserControllingZoom ? this.draggingSmoothTime : this.smoothTime;
|
|
1446
1446
|
this._zoom = ce(
|
|
1447
1447
|
this._zoom,
|
|
1448
1448
|
this._zoomEnd,
|
|
1449
1449
|
this._zoomVelocity,
|
|
1450
|
-
|
|
1450
|
+
p,
|
|
1451
1451
|
1 / 0,
|
|
1452
1452
|
e
|
|
1453
1453
|
);
|
|
1454
1454
|
}
|
|
1455
1455
|
if (this.dollyToCursor) {
|
|
1456
1456
|
if (Y(this._camera) && this._changedDolly !== 0) {
|
|
1457
|
-
const
|
|
1457
|
+
const p = this._spherical.radius - this._lastDistance, v = this._camera, m = this._getCameraDirection(ne), u = b.copy(m).cross(v.up).normalize();
|
|
1458
1458
|
u.lengthSq() === 0 && (u.x = 1);
|
|
1459
|
-
const g = L.crossVectors(u,
|
|
1459
|
+
const g = L.crossVectors(u, m), y = this._sphericalEnd.radius * Math.tan(v.getEffectiveFOV() * ie * 0.5), _ = (this._sphericalEnd.radius - p - this._sphericalEnd.radius) / this._sphericalEnd.radius, O = G.copy(this._targetEnd).add(
|
|
1460
1460
|
u.multiplyScalar(
|
|
1461
1461
|
this._dollyControlCoord.x * y * v.aspect
|
|
1462
1462
|
)
|
|
1463
1463
|
).add(
|
|
1464
1464
|
g.multiplyScalar(this._dollyControlCoord.y * y)
|
|
1465
|
-
), C =
|
|
1466
|
-
if (this.infinityDolly && (
|
|
1467
|
-
this._sphericalEnd.radius -=
|
|
1468
|
-
const
|
|
1469
|
-
C.add(
|
|
1465
|
+
), C = b.copy(this._targetEnd).lerp(O, _), w = this._lastDollyDirection === K.IN && this._spherical.radius <= this.minDistance, E = this._lastDollyDirection === K.OUT && this.maxDistance <= this._spherical.radius;
|
|
1466
|
+
if (this.infinityDolly && (w || E)) {
|
|
1467
|
+
this._sphericalEnd.radius -= p, this._spherical.radius -= p;
|
|
1468
|
+
const R = L.copy(m).multiplyScalar(-p);
|
|
1469
|
+
C.add(R);
|
|
1470
1470
|
}
|
|
1471
1471
|
this._boundary.clampPoint(C, C);
|
|
1472
1472
|
const x = L.subVectors(C, this._targetEnd);
|
|
1473
|
-
this._targetEnd.copy(C), this._target.add(x), this._changedDolly -=
|
|
1474
|
-
} else if (
|
|
1475
|
-
const
|
|
1473
|
+
this._targetEnd.copy(C), this._target.add(x), this._changedDolly -= p, A(this._changedDolly) && (this._changedDolly = 0);
|
|
1474
|
+
} else if (H(this._camera) && this._changedZoom !== 0) {
|
|
1475
|
+
const p = this._zoom - this._lastZoom, v = this._camera, m = b.set(
|
|
1476
1476
|
this._dollyControlCoord.x,
|
|
1477
1477
|
this._dollyControlCoord.y,
|
|
1478
1478
|
(v.near + v.far) / (v.near - v.far)
|
|
1479
|
-
).unproject(v), u = L.set(0, 0, -1).applyQuaternion(v.quaternion), g = G.copy(
|
|
1480
|
-
|
|
1479
|
+
).unproject(v), u = L.set(0, 0, -1).applyQuaternion(v.quaternion), g = G.copy(m).add(u.multiplyScalar(-m.dot(v.up))), l = -(this._zoom - p - this._zoom) / this._zoom, _ = this._getCameraDirection(ne), O = this._targetEnd.dot(_), C = b.copy(this._targetEnd).lerp(g, l), w = C.dot(_), E = _.multiplyScalar(
|
|
1480
|
+
w - O
|
|
1481
1481
|
);
|
|
1482
1482
|
C.sub(E), this._boundary.clampPoint(C, C);
|
|
1483
1483
|
const x = L.subVectors(C, this._targetEnd);
|
|
1484
|
-
this._targetEnd.copy(C), this._target.add(x), this._changedZoom -=
|
|
1484
|
+
this._targetEnd.copy(C), this._target.add(x), this._changedZoom -= p, A(this._changedZoom) && (this._changedZoom = 0);
|
|
1485
1485
|
}
|
|
1486
1486
|
}
|
|
1487
1487
|
this._camera.zoom !== this._zoom && (this._camera.zoom = this._zoom, this._camera.updateProjectionMatrix(), this._updateNearPlaneCorners(), this._needsUpdate = !0), this._dragNeedsUpdate = !0;
|
|
1488
1488
|
const a = this._collisionTest();
|
|
1489
|
-
this._spherical.radius = Math.min(this._spherical.radius, a), this._spherical.makeSafe(), this._camera.position.setFromSpherical(this._spherical).applyQuaternion(this._yAxisUpSpaceInverse).add(this._target), this._camera.lookAt(this._target), (!A(this._focalOffset.x) || !A(this._focalOffset.y) || !A(this._focalOffset.z)) && (F.setFromMatrixColumn(this._camera.matrix, 0), N.setFromMatrixColumn(this._camera.matrix, 1), Z.setFromMatrixColumn(this._camera.matrix, 2), F.multiplyScalar(this._focalOffset.x), N.multiplyScalar(-this._focalOffset.y), Z.multiplyScalar(this._focalOffset.z),
|
|
1489
|
+
this._spherical.radius = Math.min(this._spherical.radius, a), this._spherical.makeSafe(), this._camera.position.setFromSpherical(this._spherical).applyQuaternion(this._yAxisUpSpaceInverse).add(this._target), this._camera.lookAt(this._target), (!A(this._focalOffset.x) || !A(this._focalOffset.y) || !A(this._focalOffset.z)) && (F.setFromMatrixColumn(this._camera.matrix, 0), N.setFromMatrixColumn(this._camera.matrix, 1), Z.setFromMatrixColumn(this._camera.matrix, 2), F.multiplyScalar(this._focalOffset.x), N.multiplyScalar(-this._focalOffset.y), Z.multiplyScalar(this._focalOffset.z), b.copy(F).add(N).add(Z), this._camera.position.add(b), this._camera.updateMatrixWorld()), this._boundaryEnclosesCamera && this._encloseToBoundary(
|
|
1490
1490
|
this._camera.position.copy(this._target),
|
|
1491
|
-
|
|
1491
|
+
b.setFromSpherical(this._spherical).applyQuaternion(this._yAxisUpSpaceInverse),
|
|
1492
1492
|
1
|
|
1493
1493
|
);
|
|
1494
1494
|
const f = this._needsUpdate;
|
|
@@ -1515,7 +1515,7 @@ class J extends Ts {
|
|
|
1515
1515
|
truckSpeed: this.truckSpeed,
|
|
1516
1516
|
dollyToCursor: this.dollyToCursor,
|
|
1517
1517
|
target: this._targetEnd.toArray(),
|
|
1518
|
-
position:
|
|
1518
|
+
position: b.setFromSpherical(this._sphericalEnd).add(this._targetEnd).toArray(),
|
|
1519
1519
|
zoom: this._zoomEnd,
|
|
1520
1520
|
focalOffset: this._focalOffsetEnd.toArray(),
|
|
1521
1521
|
target0: this._target0.toArray(),
|
|
@@ -1533,7 +1533,7 @@ class J extends Ts {
|
|
|
1533
1533
|
fromJSON(e, t = !1) {
|
|
1534
1534
|
const s = JSON.parse(e);
|
|
1535
1535
|
this.enabled = s.enabled, this.minDistance = s.minDistance, this.maxDistance = oe(s.maxDistance), this.minZoom = s.minZoom, this.maxZoom = oe(s.maxZoom), this.minPolarAngle = s.minPolarAngle, this.maxPolarAngle = oe(s.maxPolarAngle), this.minAzimuthAngle = oe(s.minAzimuthAngle), this.maxAzimuthAngle = oe(s.maxAzimuthAngle), this.smoothTime = s.smoothTime, this.draggingSmoothTime = s.draggingSmoothTime, this.dollySpeed = s.dollySpeed, this.truckSpeed = s.truckSpeed, this.dollyToCursor = s.dollyToCursor, this._target0.fromArray(s.target0), this._position0.fromArray(s.position0), this._zoom0 = s.zoom0, this._focalOffset0.fromArray(s.focalOffset0), this.moveTo(s.target[0], s.target[1], s.target[2], t), z.setFromVector3(
|
|
1536
|
-
|
|
1536
|
+
b.fromArray(s.position).sub(this._targetEnd).applyQuaternion(this._yAxisUpSpace)
|
|
1537
1537
|
), this.rotateTo(z.theta, z.phi, t), this.dollyTo(z.radius, t), this.zoomTo(s.zoom, t), this.setFocalOffset(
|
|
1538
1538
|
s.focalOffset[0],
|
|
1539
1539
|
s.focalOffset[1],
|
|
@@ -1606,7 +1606,7 @@ class J extends Ts {
|
|
|
1606
1606
|
if (Y(this._camera)) {
|
|
1607
1607
|
const e = this._camera, t = e.near, s = e.getEffectiveFOV() * ie, i = Math.tan(s * 0.5) * t, r = i * e.aspect;
|
|
1608
1608
|
this._nearPlaneCorners[0].set(-r, -i, 0), this._nearPlaneCorners[1].set(r, -i, 0), this._nearPlaneCorners[2].set(r, i, 0), this._nearPlaneCorners[3].set(-r, i, 0);
|
|
1609
|
-
} else if (
|
|
1609
|
+
} else if (H(this._camera)) {
|
|
1610
1610
|
const e = this._camera, t = 1 / e.zoom, s = e.left * t, i = e.right * t, r = e.top * t, o = e.bottom * t;
|
|
1611
1611
|
this._nearPlaneCorners[0].set(s, r, 0), this._nearPlaneCorners[1].set(i, r, 0), this._nearPlaneCorners[2].set(i, o, 0), this._nearPlaneCorners[3].set(s, o, 0);
|
|
1612
1612
|
}
|
|
@@ -1622,8 +1622,8 @@ class J extends Ts {
|
|
|
1622
1622
|
const r = L.copy(this._nearPlaneCorners[i]);
|
|
1623
1623
|
r.applyMatrix4(Le);
|
|
1624
1624
|
const o = G.addVectors(this._target, r);
|
|
1625
|
-
|
|
1626
|
-
const n =
|
|
1625
|
+
me.set(o, s), me.far = this._spherical.radius + 1;
|
|
1626
|
+
const n = me.intersectObjects(this.colliderMeshes);
|
|
1627
1627
|
n.length !== 0 && n[0].distance < e && (e = n[0].distance);
|
|
1628
1628
|
}
|
|
1629
1629
|
return e;
|
|
@@ -1702,8 +1702,8 @@ class J extends Ts {
|
|
|
1702
1702
|
const a = n.geometry.clone();
|
|
1703
1703
|
a.applyMatrix4(n.matrixWorld);
|
|
1704
1704
|
const f = a.attributes.position;
|
|
1705
|
-
for (let
|
|
1706
|
-
|
|
1705
|
+
for (let p = 0, v = f.count; p < v; p++)
|
|
1706
|
+
b.fromBufferAttribute(f, p), r = Math.max(r, i.distanceToSquared(b));
|
|
1707
1707
|
}), s.radius = Math.sqrt(r), s;
|
|
1708
1708
|
}
|
|
1709
1709
|
}
|
|
@@ -1715,7 +1715,7 @@ Q && typeof Q.ownKeys == "function" ? ue = Q.ownKeys : Object.getOwnPropertySymb
|
|
|
1715
1715
|
} : ue = function(e) {
|
|
1716
1716
|
return Object.getOwnPropertyNames(e);
|
|
1717
1717
|
};
|
|
1718
|
-
function
|
|
1718
|
+
function xs(h) {
|
|
1719
1719
|
console && console.warn && console.warn(h);
|
|
1720
1720
|
}
|
|
1721
1721
|
var _t = Number.isNaN || function(e) {
|
|
@@ -1725,7 +1725,7 @@ function S() {
|
|
|
1725
1725
|
S.init.call(this);
|
|
1726
1726
|
}
|
|
1727
1727
|
Ae.exports = S;
|
|
1728
|
-
Ae.exports.once =
|
|
1728
|
+
Ae.exports.once = As;
|
|
1729
1729
|
S.EventEmitter = S;
|
|
1730
1730
|
S.prototype._events = void 0;
|
|
1731
1731
|
S.prototype._eventsCount = 0;
|
|
@@ -1795,7 +1795,7 @@ function yt(h, e, t, s) {
|
|
|
1795
1795
|
else if (typeof o == "function" ? o = r[e] = s ? [t, o] : [o, t] : s ? o.unshift(t) : o.push(t), i = gt(h), i > 0 && o.length > i && !o.warned) {
|
|
1796
1796
|
o.warned = !0;
|
|
1797
1797
|
var n = new Error("Possible EventEmitter memory leak detected. " + o.length + " " + String(e) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
1798
|
-
n.name = "MaxListenersExceededWarning", n.emitter = h, n.type = e, n.count = o.length,
|
|
1798
|
+
n.name = "MaxListenersExceededWarning", n.emitter = h, n.type = e, n.count = o.length, xs(n);
|
|
1799
1799
|
}
|
|
1800
1800
|
return h;
|
|
1801
1801
|
}
|
|
@@ -1806,12 +1806,12 @@ S.prototype.on = S.prototype.addListener;
|
|
|
1806
1806
|
S.prototype.prependListener = function(e, t) {
|
|
1807
1807
|
return yt(this, e, t, !0);
|
|
1808
1808
|
};
|
|
1809
|
-
function
|
|
1809
|
+
function Ls() {
|
|
1810
1810
|
if (!this.fired)
|
|
1811
1811
|
return this.target.removeListener(this.type, this.wrapFn), this.fired = !0, arguments.length === 0 ? this.listener.call(this.target) : this.listener.apply(this.target, arguments);
|
|
1812
1812
|
}
|
|
1813
1813
|
function vt(h, e, t) {
|
|
1814
|
-
var s = { fired: !1, wrapFn: void 0, target: h, type: e, listener: t }, i =
|
|
1814
|
+
var s = { fired: !1, wrapFn: void 0, target: h, type: e, listener: t }, i = Ls.bind(s);
|
|
1815
1815
|
return i.listener = t, s.wrapFn = i, i;
|
|
1816
1816
|
}
|
|
1817
1817
|
S.prototype.once = function(e, t) {
|
|
@@ -1836,7 +1836,7 @@ S.prototype.removeListener = function(e, t) {
|
|
|
1836
1836
|
}
|
|
1837
1837
|
if (r < 0)
|
|
1838
1838
|
return this;
|
|
1839
|
-
r === 0 ? s.shift() :
|
|
1839
|
+
r === 0 ? s.shift() : Ps(s, r), s.length === 1 && (i[e] = s[0]), i.removeListener !== void 0 && this.emit("removeListener", e, n || t);
|
|
1840
1840
|
}
|
|
1841
1841
|
return this;
|
|
1842
1842
|
};
|
|
@@ -1865,7 +1865,7 @@ function Ct(h, e, t) {
|
|
|
1865
1865
|
if (s === void 0)
|
|
1866
1866
|
return [];
|
|
1867
1867
|
var i = s[e];
|
|
1868
|
-
return i === void 0 ? [] : typeof i == "function" ? t ? [i.listener || i] : [i] : t ?
|
|
1868
|
+
return i === void 0 ? [] : typeof i == "function" ? t ? [i.listener || i] : [i] : t ? Ss(i) : Et(i, i.length);
|
|
1869
1869
|
}
|
|
1870
1870
|
S.prototype.listeners = function(e) {
|
|
1871
1871
|
return Ct(this, e, !0);
|
|
@@ -1896,17 +1896,17 @@ function Et(h, e) {
|
|
|
1896
1896
|
t[s] = h[s];
|
|
1897
1897
|
return t;
|
|
1898
1898
|
}
|
|
1899
|
-
function
|
|
1899
|
+
function Ps(h, e) {
|
|
1900
1900
|
for (; e + 1 < h.length; e++)
|
|
1901
1901
|
h[e] = h[e + 1];
|
|
1902
1902
|
h.pop();
|
|
1903
1903
|
}
|
|
1904
|
-
function
|
|
1904
|
+
function Ss(h) {
|
|
1905
1905
|
for (var e = new Array(h.length), t = 0; t < e.length; ++t)
|
|
1906
1906
|
e[t] = h[t].listener || h[t];
|
|
1907
1907
|
return e;
|
|
1908
1908
|
}
|
|
1909
|
-
function
|
|
1909
|
+
function As(h, e) {
|
|
1910
1910
|
return new Promise(function(t, s) {
|
|
1911
1911
|
function i(o) {
|
|
1912
1912
|
h.removeListener(e, r), s(o);
|
|
@@ -1914,10 +1914,10 @@ function Ss(h, e) {
|
|
|
1914
1914
|
function r() {
|
|
1915
1915
|
typeof h.removeListener == "function" && h.removeListener("error", i), t([].slice.call(arguments));
|
|
1916
1916
|
}
|
|
1917
|
-
Tt(h, e, r, { once: !0 }), e !== "error" &&
|
|
1917
|
+
Tt(h, e, r, { once: !0 }), e !== "error" && Ms(h, i, { once: !0 });
|
|
1918
1918
|
});
|
|
1919
1919
|
}
|
|
1920
|
-
function
|
|
1920
|
+
function Ms(h, e, t) {
|
|
1921
1921
|
typeof h.on == "function" && Tt(h, "error", e, t);
|
|
1922
1922
|
}
|
|
1923
1923
|
function Tt(h, e, t, s) {
|
|
@@ -1931,7 +1931,7 @@ function Tt(h, e, t, s) {
|
|
|
1931
1931
|
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof h);
|
|
1932
1932
|
}
|
|
1933
1933
|
var ye = Ae.exports;
|
|
1934
|
-
let
|
|
1934
|
+
let Rs = class {
|
|
1935
1935
|
constructor() {
|
|
1936
1936
|
this.mask = 1;
|
|
1937
1937
|
}
|
|
@@ -1962,7 +1962,7 @@ class ee {
|
|
|
1962
1962
|
this.event = new ye.EventEmitter(), this.controllerMap = /* @__PURE__ */ new Map(), this.activeIndex = -1, this.activeControllerSet = /* @__PURE__ */ new Set();
|
|
1963
1963
|
}
|
|
1964
1964
|
addController(e, t) {
|
|
1965
|
-
const s = new
|
|
1965
|
+
const s = new Rs();
|
|
1966
1966
|
return s.disableAll(), t !== void 0 && s.set(t), this.controllerMap.set(e, s), t === this.activeIndex && this.activeControllerSet.add(e), e;
|
|
1967
1967
|
}
|
|
1968
1968
|
removePage(e, t) {
|
|
@@ -1991,11 +1991,11 @@ class ee {
|
|
|
1991
1991
|
}), this.removePage(0), this.controllerMap.clear(), this.event.removeAllListeners(), this.activeControllerSet.clear();
|
|
1992
1992
|
}
|
|
1993
1993
|
}
|
|
1994
|
-
const
|
|
1994
|
+
const wt = {
|
|
1995
1995
|
fov: 45,
|
|
1996
1996
|
near: 1,
|
|
1997
1997
|
far: 1e3,
|
|
1998
|
-
up: new
|
|
1998
|
+
up: new j(0, 1, 0)
|
|
1999
1999
|
};
|
|
2000
2000
|
class Ds extends ee {
|
|
2001
2001
|
constructor(e) {
|
|
@@ -2004,7 +2004,7 @@ class Ds extends ee {
|
|
|
2004
2004
|
get camera() {
|
|
2005
2005
|
return this.controller;
|
|
2006
2006
|
}
|
|
2007
|
-
addPerspectiveCamera(e =
|
|
2007
|
+
addPerspectiveCamera(e = wt, t) {
|
|
2008
2008
|
const { fov: s, far: i, near: r, up: o, aspect: n } = e, a = n != null ? n : this.width / this.height, c = new kt(s, a, r, i);
|
|
2009
2009
|
return c.up = o, this.addController(c, t);
|
|
2010
2010
|
}
|
|
@@ -2077,8 +2077,8 @@ class Ds extends ee {
|
|
|
2077
2077
|
}
|
|
2078
2078
|
}
|
|
2079
2079
|
}
|
|
2080
|
-
const
|
|
2081
|
-
const e = new
|
|
2080
|
+
const Us = (h) => {
|
|
2081
|
+
const e = new ps(
|
|
2082
2082
|
new Ft({
|
|
2083
2083
|
uniforms: {
|
|
2084
2084
|
baseTexture: { value: null },
|
|
@@ -2113,7 +2113,7 @@ const Rs = (h) => {
|
|
|
2113
2113
|
"baseTexture"
|
|
2114
2114
|
);
|
|
2115
2115
|
return e.needsSwap = !0, e;
|
|
2116
|
-
},
|
|
2116
|
+
}, zs = {
|
|
2117
2117
|
name: "OutputShader",
|
|
2118
2118
|
uniforms: {
|
|
2119
2119
|
tDiffuse: { value: null },
|
|
@@ -2207,11 +2207,11 @@ const Rs = (h) => {
|
|
|
2207
2207
|
}`
|
|
2208
2208
|
)
|
|
2209
2209
|
};
|
|
2210
|
-
class
|
|
2210
|
+
class ks extends ms {
|
|
2211
2211
|
constructor() {
|
|
2212
2212
|
super();
|
|
2213
|
-
const e =
|
|
2214
|
-
this.uniforms = Nt.clone(e.uniforms), this.material = new
|
|
2213
|
+
const e = zs;
|
|
2214
|
+
this.uniforms = Nt.clone(e.uniforms), this.material = new It({
|
|
2215
2215
|
name: e.name,
|
|
2216
2216
|
uniforms: this.uniforms,
|
|
2217
2217
|
vertexShader: e.vertexShader,
|
|
@@ -2219,36 +2219,36 @@ class zs extends ms {
|
|
|
2219
2219
|
}), this.fsQuad ? this.fsQuad = new Fe(this.material) : this._fsQuad && (this._fsQuad = new Fe(this.material));
|
|
2220
2220
|
}
|
|
2221
2221
|
}
|
|
2222
|
-
const
|
|
2222
|
+
const Fs = new jt({ color: "black" }), Ns = new at({
|
|
2223
2223
|
color: "black",
|
|
2224
2224
|
sizeAttenuation: !1
|
|
2225
|
-
}),
|
|
2225
|
+
}), Is = new at({
|
|
2226
2226
|
color: "black",
|
|
2227
2227
|
sizeAttenuation: !0
|
|
2228
|
-
}),
|
|
2228
|
+
}), js = new lt({
|
|
2229
2229
|
color: "black",
|
|
2230
2230
|
sizeAttenuation: !0
|
|
2231
|
-
}),
|
|
2231
|
+
}), Hs = new lt({
|
|
2232
2232
|
color: "black",
|
|
2233
2233
|
sizeAttenuation: !1
|
|
2234
|
-
}),
|
|
2234
|
+
}), Bs = new ut({
|
|
2235
2235
|
color: "black",
|
|
2236
2236
|
sizeAttenuation: !1,
|
|
2237
2237
|
lineWidth: 0
|
|
2238
|
-
}), Xe = new
|
|
2238
|
+
}), Xe = new Ht(0), Vs = {
|
|
2239
2239
|
kernelRadius: 8,
|
|
2240
2240
|
minDistance: 5e-3,
|
|
2241
2241
|
maxDistance: 0.1
|
|
2242
|
-
},
|
|
2242
|
+
}, Ys = {
|
|
2243
2243
|
threshold: 0,
|
|
2244
2244
|
strength: 0.4,
|
|
2245
2245
|
radius: 0.1,
|
|
2246
2246
|
bloomAlphaType: 0
|
|
2247
|
-
},
|
|
2247
|
+
}, Zs = {
|
|
2248
2248
|
multisampling: 4,
|
|
2249
2249
|
premultiplieAlpha: !1
|
|
2250
2250
|
};
|
|
2251
|
-
class
|
|
2251
|
+
class Ws {
|
|
2252
2252
|
constructor(e) {
|
|
2253
2253
|
this.bloomComposerActive = !1, this.active = !0, this.bloomSelection = /* @__PURE__ */ new Set(), this.bloomLayer = new Bt(), this.bloomMaterials = {}, this.bloomVisible = {}, this.bloomComposerRenderIng = !1, this.pipViewportState = null, this.options = e;
|
|
2254
2254
|
const {
|
|
@@ -2265,13 +2265,13 @@ class Zs {
|
|
|
2265
2265
|
samples: Math.min(n, a),
|
|
2266
2266
|
type: Yt
|
|
2267
2267
|
}
|
|
2268
|
-
),
|
|
2269
|
-
|
|
2270
|
-
const
|
|
2268
|
+
), p = new ke(o, f), v = this.getSize();
|
|
2269
|
+
p.setSize(v.width, v.height);
|
|
2270
|
+
const m = new hs(
|
|
2271
2271
|
s.scene,
|
|
2272
2272
|
i.camera
|
|
2273
2273
|
);
|
|
2274
|
-
|
|
2274
|
+
p.addPass(m), this.scene = s.scene, this.camera = i.camera, this.finalComposer = p, this.renderPass = m, i.event.on("pageChange", (u) => {
|
|
2275
2275
|
this.changeCamera(u);
|
|
2276
2276
|
}), s.event.on("pageChange", (u) => {
|
|
2277
2277
|
this.changeScene(u);
|
|
@@ -2284,18 +2284,18 @@ class Zs {
|
|
|
2284
2284
|
this.renderPass.scene = e, this.ssaoPass && (this.ssaoPass.scene = e), this.scene = e;
|
|
2285
2285
|
}
|
|
2286
2286
|
addOutputPass() {
|
|
2287
|
-
const { premultiplieAlpha: e } = this.options.composerParams, t = new
|
|
2287
|
+
const { premultiplieAlpha: e } = this.options.composerParams, t = new ks();
|
|
2288
2288
|
this.outputPass = t, this.setPremultiplieAlpha(e), this.finalComposer.addPass(t);
|
|
2289
2289
|
}
|
|
2290
2290
|
setPremultiplieAlpha(e) {
|
|
2291
2291
|
this.outputPass && (this.outputPass.uniforms.premultiplieAlpha.value = e ? 1 : 0);
|
|
2292
2292
|
}
|
|
2293
2293
|
addSSAOPass(e) {
|
|
2294
|
-
const { scene: t, camera: s, renderer: i } = this, r = i.getSize(new B()), o = r.width, n = r.height, a = new
|
|
2294
|
+
const { scene: t, camera: s, renderer: i } = this, r = i.getSize(new B()), o = r.width, n = r.height, a = new cs(t, s, o, n);
|
|
2295
2295
|
a.kernelRadius = e.kernelRadius, a.minDistance = e.minDistance, a.maxDistance = e.maxDistance, this.ssaoPass = a, this.finalComposer.addPass(a);
|
|
2296
2296
|
}
|
|
2297
2297
|
addBloomPass(e) {
|
|
2298
|
-
const { renderer: t } = this, { threshold: s, strength: i, radius: r, bloomAlphaType: o } = e, n = new
|
|
2298
|
+
const { renderer: t } = this, { threshold: s, strength: i, radius: r, bloomAlphaType: o } = e, n = new ds(
|
|
2299
2299
|
new B(window.innerWidth, window.innerHeight),
|
|
2300
2300
|
i,
|
|
2301
2301
|
r,
|
|
@@ -2304,7 +2304,7 @@ class Zs {
|
|
|
2304
2304
|
this.bloomPass = n;
|
|
2305
2305
|
const a = new ke(t);
|
|
2306
2306
|
a.renderToScreen = !1, a.addPass(this.renderPass), a.addPass(n), this.bloomComposer = a;
|
|
2307
|
-
const c =
|
|
2307
|
+
const c = Us(a);
|
|
2308
2308
|
c.uniforms.bloomAlphaType.value = o, this.bloomComposer = a, this.finalComposer.addPass(c), this.mixPass = c, this.bloomLayer.set(Oe);
|
|
2309
2309
|
}
|
|
2310
2310
|
setBloomSelection(e, t) {
|
|
@@ -2346,7 +2346,7 @@ class Zs {
|
|
|
2346
2346
|
e.push(o);
|
|
2347
2347
|
return;
|
|
2348
2348
|
}
|
|
2349
|
-
this.bloomMaterials[o.uuid] = o.material, n.isSprite ? n.material.sizeAttenuation ? n.material =
|
|
2349
|
+
this.bloomMaterials[o.uuid] = o.material, n.isSprite ? n.material.sizeAttenuation ? n.material = js : n.material = Hs : o.material instanceof ut ? o.material = Bs : a.isPoints ? a.material.sizeAttenuation ? a.material = Is : a.material = Ns : o.material = Fs;
|
|
2350
2350
|
}
|
|
2351
2351
|
});
|
|
2352
2352
|
}), e.forEach((i) => {
|
|
@@ -2396,12 +2396,12 @@ class Zs {
|
|
|
2396
2396
|
this.bloomMaterials = {}, this.bloomVisible = {}, this.bloomSelection.clear(), this.finalComposer.dispose(), (e = this.bloomComposer) == null || e.dispose();
|
|
2397
2397
|
}
|
|
2398
2398
|
}
|
|
2399
|
-
class
|
|
2399
|
+
class Ks extends ee {
|
|
2400
2400
|
constructor(e) {
|
|
2401
2401
|
super(), this.autoRotateSpeed = 0, this.options = e;
|
|
2402
2402
|
const t = {
|
|
2403
2403
|
Vector2: B,
|
|
2404
|
-
Vector3:
|
|
2404
|
+
Vector3: j,
|
|
2405
2405
|
Vector4: Wt,
|
|
2406
2406
|
Quaternion: ht,
|
|
2407
2407
|
Matrix4: W,
|
|
@@ -2443,8 +2443,8 @@ class Ws extends ee {
|
|
|
2443
2443
|
super.update(e, t), this.autoRotateSpeed && this.cameraControls && (this.cameraControls.azimuthAngle += this.autoRotateSpeed * e * Zt.DEG2RAD);
|
|
2444
2444
|
}
|
|
2445
2445
|
}
|
|
2446
|
-
const qe = new
|
|
2447
|
-
class
|
|
2446
|
+
const qe = new j(), $s = new ht(), Qe = new j(), I = new W(), Gs = new W();
|
|
2447
|
+
class Xs {
|
|
2448
2448
|
/**
|
|
2449
2449
|
* Constructs a new CSS3D renderer.
|
|
2450
2450
|
*
|
|
@@ -2471,21 +2471,21 @@ class Gs {
|
|
|
2471
2471
|
l.view && l.view.enabled ? (c.style.transform = `translate( ${-l.view.offsetX * (s / l.view.width)}px, ${-l.view.offsetY * (i / l.view.height)}px )`, c.style.transform += `scale( ${l.view.fullWidth / l.view.width}, ${l.view.fullHeight / l.view.height} )`) : c.style.transform = "", y.matrixWorldAutoUpdate === !0 && y.updateMatrixWorld(), l.parent === null && l.matrixWorldAutoUpdate === !0 && l.updateMatrixWorld();
|
|
2472
2472
|
let O, C;
|
|
2473
2473
|
l.isOrthographicCamera && (O = -(l.right + l.left) / 2, C = (l.top + l.bottom) / 2);
|
|
2474
|
-
const
|
|
2475
|
-
n.camera.style !==
|
|
2474
|
+
const w = l.view && l.view.enabled ? l.view.height / l.view.fullHeight : 1, E = l.isOrthographicCamera ? `scale( ${w} )scale(` + _ + ")translate(" + p(O) + "px," + p(C) + "px)" + v(l.matrixWorldInverse) : `scale( ${w} )translateZ(` + _ + "px)" + v(l.matrixWorldInverse), R = (l.isPerspectiveCamera ? "perspective(" + _ + "px) " : "") + E + "translate(" + r + "px," + o + "px)";
|
|
2475
|
+
n.camera.style !== R && (f.style.transform = R, n.camera.style = R), g(y, y, l);
|
|
2476
2476
|
}, this.setSize = function(y, l) {
|
|
2477
2477
|
s = y, i = l, r = s / 2, o = i / 2, a.style.width = y + "px", a.style.height = l + "px", c.style.width = y + "px", c.style.height = l + "px", f.style.width = y + "px", f.style.height = l + "px";
|
|
2478
2478
|
};
|
|
2479
|
-
function
|
|
2479
|
+
function p(y) {
|
|
2480
2480
|
return Math.abs(y) < 1e-10 ? 0 : y;
|
|
2481
2481
|
}
|
|
2482
2482
|
function v(y) {
|
|
2483
2483
|
const l = y.elements;
|
|
2484
|
-
return "matrix3d(" +
|
|
2484
|
+
return "matrix3d(" + p(l[0]) + "," + p(-l[1]) + "," + p(l[2]) + "," + p(l[3]) + "," + p(l[4]) + "," + p(-l[5]) + "," + p(l[6]) + "," + p(l[7]) + "," + p(l[8]) + "," + p(-l[9]) + "," + p(l[10]) + "," + p(l[11]) + "," + p(l[12]) + "," + p(-l[13]) + "," + p(l[14]) + "," + p(l[15]) + ")";
|
|
2485
2485
|
}
|
|
2486
|
-
function
|
|
2486
|
+
function m(y) {
|
|
2487
2487
|
const l = y.elements;
|
|
2488
|
-
return "translate(-50%,-50%)" + ("matrix3d(" +
|
|
2488
|
+
return "translate(-50%,-50%)" + ("matrix3d(" + p(l[0]) + "," + p(l[1]) + "," + p(l[2]) + "," + p(l[3]) + "," + p(-l[4]) + "," + p(-l[5]) + "," + p(-l[6]) + "," + p(-l[7]) + "," + p(l[8]) + "," + p(l[9]) + "," + p(l[10]) + "," + p(l[11]) + "," + p(l[12]) + "," + p(l[13]) + "," + p(l[14]) + "," + p(l[15]) + ")");
|
|
2489
2489
|
}
|
|
2490
2490
|
function u(y) {
|
|
2491
2491
|
y.isCSS3DObject && (y.element.style.display = "none");
|
|
@@ -2498,27 +2498,27 @@ class Gs {
|
|
|
2498
2498
|
return;
|
|
2499
2499
|
}
|
|
2500
2500
|
if (y.isCSS3DObject) {
|
|
2501
|
-
const C = y.layers.test(_.layers) === !0,
|
|
2502
|
-
if (
|
|
2501
|
+
const C = y.layers.test(_.layers) === !0, w = y.element;
|
|
2502
|
+
if (w.style.display = C === !0 ? "" : "none", C === !0) {
|
|
2503
2503
|
y.onBeforeRender(t, l, _);
|
|
2504
2504
|
let E;
|
|
2505
|
-
y.isCSS3DSprite ? (
|
|
2505
|
+
y.isCSS3DSprite ? (I.copy(_.matrixWorldInverse), I.transpose(), y.rotation2D !== 0 && I.multiply(Gs.makeRotationZ(y.rotation2D)), y.matrixWorld.decompose(qe, $s, Qe), I.setPosition(qe), I.scale(Qe), I.elements[3] = 0, I.elements[7] = 0, I.elements[11] = 0, I.elements[15] = 1, E = m(I)) : E = m(y.matrixWorld);
|
|
2506
2506
|
const x = n.objects.get(y);
|
|
2507
2507
|
if (x === void 0 || x.style !== E) {
|
|
2508
|
-
|
|
2509
|
-
const
|
|
2510
|
-
n.objects.set(y,
|
|
2508
|
+
w.style.transform = E;
|
|
2509
|
+
const R = { style: E };
|
|
2510
|
+
n.objects.set(y, R);
|
|
2511
2511
|
}
|
|
2512
|
-
|
|
2512
|
+
w.parentNode !== f && f.appendChild(w), y.onAfterRender(t, l, _);
|
|
2513
2513
|
}
|
|
2514
2514
|
}
|
|
2515
|
-
for (let C = 0,
|
|
2515
|
+
for (let C = 0, w = y.children.length; C < w; C++)
|
|
2516
2516
|
g(y.children[C], l, _);
|
|
2517
2517
|
}
|
|
2518
2518
|
}
|
|
2519
2519
|
}
|
|
2520
|
-
const q = new
|
|
2521
|
-
class
|
|
2520
|
+
const q = new j(), Je = new W(), et = new W(), tt = new j(), st = new j();
|
|
2521
|
+
class qs {
|
|
2522
2522
|
/**
|
|
2523
2523
|
* Constructs a new CSS2D renderer.
|
|
2524
2524
|
*
|
|
@@ -2536,7 +2536,7 @@ class Xs {
|
|
|
2536
2536
|
height: i
|
|
2537
2537
|
};
|
|
2538
2538
|
}, this.render = function(u, g) {
|
|
2539
|
-
u.matrixWorldAutoUpdate === !0 && u.updateMatrixWorld(), g.parent === null && g.matrixWorldAutoUpdate === !0 && g.updateMatrixWorld(), Je.copy(g.matrixWorldInverse), et.multiplyMatrices(g.projectionMatrix, Je), f(u, u, g),
|
|
2539
|
+
u.matrixWorldAutoUpdate === !0 && u.updateMatrixWorld(), g.parent === null && g.matrixWorldAutoUpdate === !0 && g.updateMatrixWorld(), Je.copy(g.matrixWorldInverse), et.multiplyMatrices(g.projectionMatrix, Je), f(u, u, g), m(u);
|
|
2540
2540
|
}, this.setSize = function(u, g) {
|
|
2541
2541
|
s = u, i = g, r = s / 2, o = i / 2, a.style.width = u + "px", a.style.height = g + "px";
|
|
2542
2542
|
};
|
|
@@ -2555,14 +2555,14 @@ class Xs {
|
|
|
2555
2555
|
const l = q.z >= -1 && q.z <= 1 && u.layers.test(y.layers) === !0, _ = u.element;
|
|
2556
2556
|
_.style.display = l === !0 ? "" : "none", l === !0 && (u.onBeforeRender(t, g, y), _.style.transform = "translate(" + -100 * u.center.x + "%," + -100 * u.center.y + "%)translate(" + (q.x * r + r) + "px," + (-q.y * o + o) + "px)", _.parentNode !== a && a.appendChild(_), u.onAfterRender(t, g, y));
|
|
2557
2557
|
const O = {
|
|
2558
|
-
distanceToCameraSquared:
|
|
2558
|
+
distanceToCameraSquared: p(y, u)
|
|
2559
2559
|
};
|
|
2560
2560
|
n.objects.set(u, O);
|
|
2561
2561
|
}
|
|
2562
2562
|
for (let l = 0, _ = u.children.length; l < _; l++)
|
|
2563
2563
|
f(u.children[l], g, y);
|
|
2564
2564
|
}
|
|
2565
|
-
function
|
|
2565
|
+
function p(u, g) {
|
|
2566
2566
|
return tt.setFromMatrixPosition(u.matrixWorld), st.setFromMatrixPosition(g.matrixWorld), tt.distanceToSquared(st);
|
|
2567
2567
|
}
|
|
2568
2568
|
function v(u) {
|
|
@@ -2571,7 +2571,7 @@ class Xs {
|
|
|
2571
2571
|
y.isCSS2DObject && g.push(y);
|
|
2572
2572
|
}), g;
|
|
2573
2573
|
}
|
|
2574
|
-
function
|
|
2574
|
+
function m(u) {
|
|
2575
2575
|
const g = v(u).sort(function(l, _) {
|
|
2576
2576
|
if (l.renderOrder !== _.renderOrder)
|
|
2577
2577
|
return _.renderOrder - l.renderOrder;
|
|
@@ -2586,12 +2586,12 @@ class Xs {
|
|
|
2586
2586
|
const it = {
|
|
2587
2587
|
zIndex: "auto"
|
|
2588
2588
|
};
|
|
2589
|
-
class
|
|
2589
|
+
class Qs {
|
|
2590
2590
|
constructor(e) {
|
|
2591
2591
|
this.container = e;
|
|
2592
2592
|
}
|
|
2593
2593
|
addRenderer(e, t) {
|
|
2594
|
-
const s = t.container || this.container, i = s.offsetWidth, r = s.offsetHeight, o = e === "css2d" ? new
|
|
2594
|
+
const s = t.container || this.container, i = s.offsetWidth, r = s.offsetHeight, o = e === "css2d" ? new qs() : new Xs();
|
|
2595
2595
|
o.domElement.style.position = "absolute", o.domElement.style.top = "0", o.domElement.style.pointerEvents = "none", o.domElement.style.zIndex = t.zIndex, o.setSize(i, r), s.appendChild(o.domElement), e === "css2d" ? this.css2Drenderer = o : e === "css3d" && (this.css3Drenderer = o);
|
|
2596
2596
|
}
|
|
2597
2597
|
setSize(e, t) {
|
|
@@ -2607,7 +2607,7 @@ class qs {
|
|
|
2607
2607
|
(e = this.css2Drenderer) == null || e.domElement.remove(), (t = this.css3Drenderer) == null || t.domElement.remove(), this.css2Drenderer = void 0, this.css3Drenderer = void 0;
|
|
2608
2608
|
}
|
|
2609
2609
|
}
|
|
2610
|
-
class
|
|
2610
|
+
class Js {
|
|
2611
2611
|
constructor(e) {
|
|
2612
2612
|
this.helpers = {}, this.options = e;
|
|
2613
2613
|
}
|
|
@@ -2616,7 +2616,7 @@ class Qs {
|
|
|
2616
2616
|
let i = this.helpers[t];
|
|
2617
2617
|
if (i === void 0) {
|
|
2618
2618
|
if (e.isScene)
|
|
2619
|
-
i = new
|
|
2619
|
+
i = new De(100);
|
|
2620
2620
|
else if (e.isCamera)
|
|
2621
2621
|
i = new Gt(e);
|
|
2622
2622
|
else if (e.isPointLight)
|
|
@@ -2628,7 +2628,7 @@ class Qs {
|
|
|
2628
2628
|
else if (e.isHemisphereLight)
|
|
2629
2629
|
i = new Jt(e, 10);
|
|
2630
2630
|
else if (e.isRectAreaLight)
|
|
2631
|
-
i = new
|
|
2631
|
+
i = new us(e);
|
|
2632
2632
|
else {
|
|
2633
2633
|
const r = new ct();
|
|
2634
2634
|
if (r.setFromObject(e, !0), r.isEmpty() === !1) {
|
|
@@ -2642,7 +2642,7 @@ class Qs {
|
|
|
2642
2642
|
}
|
|
2643
2643
|
}
|
|
2644
2644
|
addViewHelper() {
|
|
2645
|
-
const { cameraController: e, container: t } = this.options, s = new
|
|
2645
|
+
const { cameraController: e, container: t } = this.options, s = new fs(e.camera, t);
|
|
2646
2646
|
t.addEventListener("pointerdown", (i) => {
|
|
2647
2647
|
i.preventDefault(), s.handleClick(i);
|
|
2648
2648
|
}), this.viewHelper = s;
|
|
@@ -2664,7 +2664,7 @@ class Qs {
|
|
|
2664
2664
|
}
|
|
2665
2665
|
removeAllExcludeScene() {
|
|
2666
2666
|
Object.keys(this.helpers).forEach((e) => {
|
|
2667
|
-
this.helpers[e] instanceof
|
|
2667
|
+
this.helpers[e] instanceof De || this.remove({
|
|
2668
2668
|
uuid: e
|
|
2669
2669
|
});
|
|
2670
2670
|
});
|
|
@@ -2700,7 +2700,7 @@ function rt(h) {
|
|
|
2700
2700
|
}));
|
|
2701
2701
|
};
|
|
2702
2702
|
}
|
|
2703
|
-
class
|
|
2703
|
+
class ei {
|
|
2704
2704
|
constructor(e) {
|
|
2705
2705
|
var t;
|
|
2706
2706
|
this.enabled = !0, this.pickFunctionsMap = /* @__PURE__ */ new Map(), this.pickNodeFunctionsMap = /* @__PURE__ */ new Map(), this.pickFunctionsMapIndex = -1, this.pickNodeFunctionsMapIndex = -1, this.activeObjects = /* @__PURE__ */ new Set(), this.activeObject = null, this.prevActiveObjects = /* @__PURE__ */ new Set(), this.objCallbackMap = /* @__PURE__ */ new Map(), this.pickListener = {
|
|
@@ -2715,30 +2715,30 @@ class Js {
|
|
|
2715
2715
|
return;
|
|
2716
2716
|
r.preventDefault();
|
|
2717
2717
|
const o = e === "move" ? t : s, n = [];
|
|
2718
|
-
if (this.pickFunctionsMap.forEach((
|
|
2719
|
-
o.has(
|
|
2720
|
-
objArr:
|
|
2718
|
+
if (this.pickFunctionsMap.forEach((m) => {
|
|
2719
|
+
o.has(m.type) && n.push(te(U({}, m), {
|
|
2720
|
+
objArr: m.objArr instanceof Function ? m.objArr() : m.objArr
|
|
2721
2721
|
}));
|
|
2722
2722
|
}), n.length === 0) return;
|
|
2723
2723
|
this.activeObjects.clear(), this.objCallbackMap.clear(), this.activeObject = null;
|
|
2724
2724
|
const a = this.objCallbackMap;
|
|
2725
|
-
for (const
|
|
2726
|
-
for (const u of
|
|
2725
|
+
for (const m of n)
|
|
2726
|
+
for (const u of m.objArr) {
|
|
2727
2727
|
if (!u.object3d || !u.visibleWithAncestors) continue;
|
|
2728
2728
|
a.has(u) || a.set(u, /* @__PURE__ */ new Map());
|
|
2729
2729
|
const g = a.get(u);
|
|
2730
|
-
g.has(
|
|
2730
|
+
g.has(m.type) || g.set(m.type, []), g.get(m.type).push(m.cb);
|
|
2731
2731
|
}
|
|
2732
2732
|
if (a.size === 0) return;
|
|
2733
|
-
const c = [...a.keys()].map((
|
|
2733
|
+
const c = [...a.keys()].map((m) => m.object3d), f = (v = this.pencil.pick(r, c, !0)) == null ? void 0 : v.intersects;
|
|
2734
2734
|
if (!f || f.length === 0)
|
|
2735
2735
|
e === "down" ? this.handleDownOutside(r) : e === "move" && this.handleLeaveEvents(r);
|
|
2736
2736
|
else {
|
|
2737
|
-
const
|
|
2738
|
-
this.processIntersection(
|
|
2737
|
+
const m = f[0];
|
|
2738
|
+
this.processIntersection(m, r, e);
|
|
2739
2739
|
}
|
|
2740
|
-
const
|
|
2741
|
-
this.prevActiveObjects = this.activeObjects, this.activeObjects =
|
|
2740
|
+
const p = this.prevActiveObjects;
|
|
2741
|
+
this.prevActiveObjects = this.activeObjects, this.activeObjects = p, this.activeObjects.clear();
|
|
2742
2742
|
};
|
|
2743
2743
|
this.domElement.addEventListener(
|
|
2744
2744
|
`pointer${e}`,
|
|
@@ -2768,8 +2768,8 @@ class Js {
|
|
|
2768
2768
|
if (t === "move") {
|
|
2769
2769
|
const c = a.get("enter");
|
|
2770
2770
|
if (c && !this.prevActiveObjects.has(n))
|
|
2771
|
-
for (const
|
|
2772
|
-
|
|
2771
|
+
for (const p of c)
|
|
2772
|
+
p({
|
|
2773
2773
|
baseObject: n,
|
|
2774
2774
|
realBaseObject: this.activeObject,
|
|
2775
2775
|
mouseEvent: e,
|
|
@@ -2778,8 +2778,8 @@ class Js {
|
|
|
2778
2778
|
});
|
|
2779
2779
|
const f = a.get("move");
|
|
2780
2780
|
if (f)
|
|
2781
|
-
for (const
|
|
2782
|
-
|
|
2781
|
+
for (const p of f)
|
|
2782
|
+
p({
|
|
2783
2783
|
baseObject: n,
|
|
2784
2784
|
realBaseObject: this.activeObject,
|
|
2785
2785
|
mouseEvent: e,
|
|
@@ -2789,8 +2789,8 @@ class Js {
|
|
|
2789
2789
|
} else {
|
|
2790
2790
|
const c = a.get("down");
|
|
2791
2791
|
if (c)
|
|
2792
|
-
for (const
|
|
2793
|
-
|
|
2792
|
+
for (const p of c)
|
|
2793
|
+
p({
|
|
2794
2794
|
baseObject: n,
|
|
2795
2795
|
realBaseObject: this.activeObject,
|
|
2796
2796
|
mouseEvent: e,
|
|
@@ -2799,10 +2799,10 @@ class Js {
|
|
|
2799
2799
|
});
|
|
2800
2800
|
const f = a.get("click");
|
|
2801
2801
|
if (f) {
|
|
2802
|
-
const
|
|
2802
|
+
const p = (v) => {
|
|
2803
2803
|
v.preventDefault();
|
|
2804
|
-
const
|
|
2805
|
-
if (!r && Math.abs(v.clientX - e.clientX) <=
|
|
2804
|
+
const m = 5;
|
|
2805
|
+
if (!r && Math.abs(v.clientX - e.clientX) <= m && Math.abs(v.clientY - e.clientY) <= m)
|
|
2806
2806
|
for (const u of f)
|
|
2807
2807
|
u({
|
|
2808
2808
|
baseObject: n,
|
|
@@ -2811,9 +2811,9 @@ class Js {
|
|
|
2811
2811
|
sp: o,
|
|
2812
2812
|
intersectionIndex: s
|
|
2813
2813
|
});
|
|
2814
|
-
this.domElement.removeEventListener("pointerup",
|
|
2814
|
+
this.domElement.removeEventListener("pointerup", p);
|
|
2815
2815
|
};
|
|
2816
|
-
this.domElement.addEventListener("pointerup",
|
|
2816
|
+
this.domElement.addEventListener("pointerup", p);
|
|
2817
2817
|
}
|
|
2818
2818
|
}
|
|
2819
2819
|
}
|
|
@@ -2861,10 +2861,10 @@ class Js {
|
|
|
2861
2861
|
for (const n of r) {
|
|
2862
2862
|
const a = n;
|
|
2863
2863
|
a.element.style.pointerEvents = "auto";
|
|
2864
|
-
const c = (
|
|
2865
|
-
this.enabled && (
|
|
2864
|
+
const c = (p) => {
|
|
2865
|
+
this.enabled && (p.preventDefault(), s({
|
|
2866
2866
|
baseObject: a,
|
|
2867
|
-
mouseEvent:
|
|
2867
|
+
mouseEvent: p
|
|
2868
2868
|
}));
|
|
2869
2869
|
}, f = `pointer${t}`;
|
|
2870
2870
|
a.element.addEventListener(f, rt(c), !1), o.push({ arr: a, type: f, listener: c });
|
|
@@ -2887,9 +2887,9 @@ class Js {
|
|
|
2887
2887
|
this.pickFunctionsMap.clear(), this.pickNodeFunctionsMap.clear(), this.activeObjects.clear(), this.prevActiveObjects.clear(), this.objCallbackMap.clear();
|
|
2888
2888
|
}
|
|
2889
2889
|
}
|
|
2890
|
-
class
|
|
2890
|
+
class ti extends ei {
|
|
2891
2891
|
constructor(e, t) {
|
|
2892
|
-
super(e), this.objMap = /* @__PURE__ */ new Map(), this.objects = /* @__PURE__ */ new Map(), this.objectsPm = /* @__PURE__ */ new Map(), this.objectWrapChindIdMap = /* @__PURE__ */ new Map(), this.objectNamesToFactories = /* @__PURE__ */ new Map(), this.mList = t.mList, this.scene = this.createBaseObject(t.scene || new
|
|
2892
|
+
super(e), this.objMap = /* @__PURE__ */ new Map(), this.objects = /* @__PURE__ */ new Map(), this.objectsPm = /* @__PURE__ */ new Map(), this.objectWrapChindIdMap = /* @__PURE__ */ new Map(), this.objectNamesToFactories = /* @__PURE__ */ new Map(), this.mList = t.mList, this.scene = this.createBaseObject(t.scene || new pt(), {
|
|
2893
2893
|
key: "@Scene",
|
|
2894
2894
|
name: "场景",
|
|
2895
2895
|
mList: !1
|
|
@@ -2911,7 +2911,7 @@ class ei extends Js {
|
|
|
2911
2911
|
createBaseObject(e, t = {}) {
|
|
2912
2912
|
const s = U({
|
|
2913
2913
|
mList: !0
|
|
2914
|
-
}, t), i = new
|
|
2914
|
+
}, t), i = new ls();
|
|
2915
2915
|
if (i.object3d = e, i.pencil = this.pencil, i.lead = this, i.mList = this.mList, s.key)
|
|
2916
2916
|
i.key = s.key;
|
|
2917
2917
|
else if (s.target) {
|
|
@@ -2958,19 +2958,19 @@ class ei extends Js {
|
|
|
2958
2958
|
const i = this.objectNamesToFactories.get(e);
|
|
2959
2959
|
if (i) {
|
|
2960
2960
|
t || (t = {}), t.target === void 0 && (t.target = s);
|
|
2961
|
-
const c = t.target, f = (r = t.onTop) != null ? r : 0,
|
|
2961
|
+
const c = t.target, f = (r = t.onTop) != null ? r : 0, p = (o = t.prefab) != null ? o : !1, v = (n = t.create) != null ? n : !0, m = new i().create(t);
|
|
2962
2962
|
let u;
|
|
2963
|
-
return c === null ? u = null : typeof c == "string" ? u = this.objects.get(c) : (a = c == null ? void 0 : c.objectType) != null && a.startsWith("BaseObject") || c ? u = c :
|
|
2964
|
-
} : v !== !0 && (
|
|
2965
|
-
v(
|
|
2966
|
-
}),
|
|
2967
|
-
|
|
2963
|
+
return c === null ? u = null : typeof c == "string" ? u = this.objects.get(c) : (a = c == null ? void 0 : c.objectType) != null && a.startsWith("BaseObject") || c ? u = c : p ? u = this.prefabGroup : u = this.group, v === !1 ? m.create = () => {
|
|
2964
|
+
} : v !== !0 && (m.create = () => {
|
|
2965
|
+
v(m);
|
|
2966
|
+
}), m.pencil = this.pencil, m.lead = this, m.mList = this.mList, m.prefab = p, m.objectType = `BaseObject#${e}`, m.objectOptions = t, this.setBaseObjectKey(
|
|
2967
|
+
m,
|
|
2968
2968
|
t.key ? `$t:#${t.key}` : "$t:",
|
|
2969
2969
|
u == null ? void 0 : u.key
|
|
2970
2970
|
), this.objectsPm.set(
|
|
2971
|
-
|
|
2972
|
-
this.addBaseObject(
|
|
2973
|
-
), yield this.objectsPm.get(
|
|
2971
|
+
m,
|
|
2972
|
+
this.addBaseObject(m, u, f)
|
|
2973
|
+
), yield this.objectsPm.get(m), this.objectsPm.delete(m), m;
|
|
2974
2974
|
}
|
|
2975
2975
|
throw new Error(`Unrecognized:${e}`);
|
|
2976
2976
|
});
|
|
@@ -3050,7 +3050,7 @@ class ei extends Js {
|
|
|
3050
3050
|
}), this.objects.clear(), this.objectsPm.clear(), this.objMap.clear(), this.objectWrapChindIdMap.clear(), this.objectNamesToFactories.clear();
|
|
3051
3051
|
}
|
|
3052
3052
|
}
|
|
3053
|
-
class
|
|
3053
|
+
class si extends ee {
|
|
3054
3054
|
get lead() {
|
|
3055
3055
|
return this.controller;
|
|
3056
3056
|
}
|
|
@@ -3058,7 +3058,7 @@ class ti extends ee {
|
|
|
3058
3058
|
super(), this.options = e;
|
|
3059
3059
|
}
|
|
3060
3060
|
addLead(e, t, s) {
|
|
3061
|
-
const { pencil: i } = this.options, r = new
|
|
3061
|
+
const { pencil: i } = this.options, r = new ti(i, {
|
|
3062
3062
|
scene: e,
|
|
3063
3063
|
mList: t
|
|
3064
3064
|
});
|
|
@@ -3080,7 +3080,7 @@ class ti extends ee {
|
|
|
3080
3080
|
});
|
|
3081
3081
|
}
|
|
3082
3082
|
}
|
|
3083
|
-
class
|
|
3083
|
+
class ii extends mt {
|
|
3084
3084
|
constructor(e) {
|
|
3085
3085
|
super(e);
|
|
3086
3086
|
}
|
|
@@ -3090,10 +3090,10 @@ class si extends pt {
|
|
|
3090
3090
|
e,
|
|
3091
3091
|
(o) => {
|
|
3092
3092
|
const n = o, a = new DecompressionStream("gzip"), c = n.stream().pipeThrough(a);
|
|
3093
|
-
new Response(c).json().then((
|
|
3094
|
-
t == null || t(
|
|
3095
|
-
}).catch((
|
|
3096
|
-
i == null || i(
|
|
3093
|
+
new Response(c).json().then((p) => {
|
|
3094
|
+
t == null || t(p);
|
|
3095
|
+
}).catch((p) => {
|
|
3096
|
+
i == null || i(p);
|
|
3097
3097
|
});
|
|
3098
3098
|
},
|
|
3099
3099
|
s,
|
|
@@ -3101,7 +3101,7 @@ class si extends pt {
|
|
|
3101
3101
|
);
|
|
3102
3102
|
}
|
|
3103
3103
|
}
|
|
3104
|
-
class ot extends
|
|
3104
|
+
class ot extends mt {
|
|
3105
3105
|
constructor(e) {
|
|
3106
3106
|
super(e), this.options = { type: "image" };
|
|
3107
3107
|
}
|
|
@@ -3116,16 +3116,16 @@ class ot extends pt {
|
|
|
3116
3116
|
e,
|
|
3117
3117
|
(a) => {
|
|
3118
3118
|
let c = a;
|
|
3119
|
-
const f = e.split(".").pop(),
|
|
3120
|
-
c = c.slice(0, a.size,
|
|
3119
|
+
const f = e.split(".").pop(), p = this.options.type === "image" ? `image/${f || "png"}` : `video/${f || "mp4"}`;
|
|
3120
|
+
c = c.slice(0, a.size, p);
|
|
3121
3121
|
const v = () => {
|
|
3122
|
-
o.removeEventListener("load",
|
|
3123
|
-
},
|
|
3122
|
+
o.removeEventListener("load", m, !1), o.removeEventListener("error", u, !1);
|
|
3123
|
+
}, m = () => {
|
|
3124
3124
|
v(), r.needsUpdate = !0, t && t(r);
|
|
3125
3125
|
}, u = (y) => {
|
|
3126
3126
|
v(), i && i(y), this.manager.itemError(e), this.manager.itemEnd(e);
|
|
3127
3127
|
};
|
|
3128
|
-
o.addEventListener("load",
|
|
3128
|
+
o.addEventListener("load", m, !1), o.addEventListener("error", u, !1);
|
|
3129
3129
|
const g = window.URL.createObjectURL(c);
|
|
3130
3130
|
o.src = g;
|
|
3131
3131
|
},
|
|
@@ -3134,7 +3134,7 @@ class ot extends pt {
|
|
|
3134
3134
|
), r;
|
|
3135
3135
|
}
|
|
3136
3136
|
}
|
|
3137
|
-
const
|
|
3137
|
+
const ri = {
|
|
3138
3138
|
images: ["png", "jpg", "jpeg", "ico", "webp", "avif"],
|
|
3139
3139
|
media: ["mp4", "webm", "ogg"],
|
|
3140
3140
|
gltf: ["gltf", "glb"],
|
|
@@ -3143,7 +3143,7 @@ const ii = {
|
|
|
3143
3143
|
exr: ["exr"],
|
|
3144
3144
|
lottie: ["lottie.json"]
|
|
3145
3145
|
};
|
|
3146
|
-
class
|
|
3146
|
+
class oi {
|
|
3147
3147
|
constructor(e) {
|
|
3148
3148
|
this.loadObj = [], this.delLoadArr = [], this.assets = /* @__PURE__ */ new Map(), this.event = new ye.EventEmitter(), this.options = U({
|
|
3149
3149
|
simpleTexture4deleted: !1,
|
|
@@ -3186,7 +3186,7 @@ class ri {
|
|
|
3186
3186
|
if (e.endsWith("json.gzip"))
|
|
3187
3187
|
return "gzipJson";
|
|
3188
3188
|
} else return;
|
|
3189
|
-
for (const [i, r] of Object.entries(
|
|
3189
|
+
for (const [i, r] of Object.entries(ri))
|
|
3190
3190
|
if (r.includes(t))
|
|
3191
3191
|
return i;
|
|
3192
3192
|
}
|
|
@@ -3196,17 +3196,17 @@ class ri {
|
|
|
3196
3196
|
if (e === "media")
|
|
3197
3197
|
return this.videoTextureLoader || (this.videoTextureLoader = new ot(this.loadingManager), this.videoTextureLoader.setOptions({ type: "video" }), this.options.prefix && this.videoTextureLoader.setPath(this.options.prefix)), this.videoTextureLoader;
|
|
3198
3198
|
if (e === "gltf" && (t != null && t.dracoPath))
|
|
3199
|
-
return this.dracoGltfLoader || (this.dracoGltfLoader = new
|
|
3199
|
+
return this.dracoGltfLoader || (this.dracoGltfLoader = new Ie(this.loadingManager), this.dracoLoader = new gs(), this.dracoLoader.setDecoderPath(t == null ? void 0 : t.dracoPath), this.dracoGltfLoader.setDRACOLoader(this.dracoLoader), this.options.prefix && this.dracoGltfLoader.setPath(this.options.prefix)), this.dracoGltfLoader;
|
|
3200
3200
|
if (e === "gltf")
|
|
3201
|
-
return this.gltfLoader || (this.gltfLoader = new
|
|
3201
|
+
return this.gltfLoader || (this.gltfLoader = new Ie(this.loadingManager), this.options.prefix && this.gltfLoader.setPath(this.options.prefix)), this.gltfLoader;
|
|
3202
3202
|
if (e === "lottie")
|
|
3203
|
-
return this.lottieLoader || (this.lottieLoader = new
|
|
3203
|
+
return this.lottieLoader || (this.lottieLoader = new vs(this.loadingManager), this.options.prefix && this.lottieLoader.setPath(this.options.prefix)), this.lottieLoader;
|
|
3204
3204
|
if (e === "gzipJson")
|
|
3205
|
-
return this.gzipJsonLoader || (this.gzipJsonLoader = new
|
|
3205
|
+
return this.gzipJsonLoader || (this.gzipJsonLoader = new ii(this.loadingManager), this.options.prefix && this.gzipJsonLoader.setPath(this.options.prefix)), this.gzipJsonLoader;
|
|
3206
3206
|
if (e === "json")
|
|
3207
3207
|
return this.jsonLoader || (this.jsonLoader = new Se(this.loadingManager), this.jsonLoader.setResponseType("json"), this.options.prefix && this.jsonLoader.setPath(this.options.prefix)), this.jsonLoader;
|
|
3208
3208
|
if (e === "exr")
|
|
3209
|
-
return this.exrLoader || (this.exrLoader = new
|
|
3209
|
+
return this.exrLoader || (this.exrLoader = new ys(this.loadingManager), this.options.prefix && this.exrLoader.setPath(this.options.prefix)), this.exrLoader;
|
|
3210
3210
|
}
|
|
3211
3211
|
add(e, t) {
|
|
3212
3212
|
typeof e == "string" && (e = [e]), e.forEach((s) => {
|
|
@@ -3242,7 +3242,7 @@ class ri {
|
|
|
3242
3242
|
const s = (n = t == null ? void 0 : t.type) != null ? n : this.getAssetType(e);
|
|
3243
3243
|
if (!s)
|
|
3244
3244
|
return;
|
|
3245
|
-
const i = (t == null ? void 0 : t.cache) !== !1, r =
|
|
3245
|
+
const i = (t == null ? void 0 : t.cache) !== !1, r = _s();
|
|
3246
3246
|
if (i) {
|
|
3247
3247
|
if (this.assets.has(e))
|
|
3248
3248
|
return this.assets.get(e);
|
|
@@ -3295,10 +3295,10 @@ class ri {
|
|
|
3295
3295
|
this.assets.clear(), (e = this.dracoLoader) == null || e.dispose(), this.event.removeAllListeners(), this.delLoadArr.length = 0, this.loadObj.length = 0;
|
|
3296
3296
|
}
|
|
3297
3297
|
}
|
|
3298
|
-
const
|
|
3298
|
+
const ni = {
|
|
3299
3299
|
prefix: ""
|
|
3300
3300
|
};
|
|
3301
|
-
class
|
|
3301
|
+
class ai extends ee {
|
|
3302
3302
|
get loader() {
|
|
3303
3303
|
return this.controller;
|
|
3304
3304
|
}
|
|
@@ -3306,7 +3306,7 @@ class ni extends ee {
|
|
|
3306
3306
|
super(), this.options = e;
|
|
3307
3307
|
}
|
|
3308
3308
|
addLoader(e, t) {
|
|
3309
|
-
const { loaderParams: s } = this.options, i = new
|
|
3309
|
+
const { loaderParams: s } = this.options, i = new oi(te(U({}, s), {
|
|
3310
3310
|
scene: e
|
|
3311
3311
|
}));
|
|
3312
3312
|
return this.addController(i, t);
|
|
@@ -3317,7 +3317,7 @@ class ni extends ee {
|
|
|
3317
3317
|
});
|
|
3318
3318
|
}
|
|
3319
3319
|
}
|
|
3320
|
-
class
|
|
3320
|
+
class li {
|
|
3321
3321
|
constructor(e) {
|
|
3322
3322
|
this.materials = /* @__PURE__ */ new Map(), this.fixBaseObjects = /* @__PURE__ */ new Map(), this.materialBaseObjectMap = /* @__PURE__ */ new Map(), this.pencil = e;
|
|
3323
3323
|
}
|
|
@@ -3424,10 +3424,10 @@ class ai {
|
|
|
3424
3424
|
const n = new Proxy(o, {
|
|
3425
3425
|
set: (a, c, f) => {
|
|
3426
3426
|
if (typeof c == "string" && !Number.isNaN(Number(c))) {
|
|
3427
|
-
const
|
|
3428
|
-
if (
|
|
3429
|
-
const v = a[
|
|
3430
|
-
return this.rmBaseObjectMap(e, v), a[
|
|
3427
|
+
const p = Number(c);
|
|
3428
|
+
if (p >= 0 && p < a.length) {
|
|
3429
|
+
const v = a[p];
|
|
3430
|
+
return this.rmBaseObjectMap(e, v), a[p] = f, f && (this.applyColorSpaceToMaterials(f), this.addBaseObjectMap(e)), !0;
|
|
3431
3431
|
}
|
|
3432
3432
|
}
|
|
3433
3433
|
return a[c] = f, !0;
|
|
@@ -3496,7 +3496,7 @@ class ai {
|
|
|
3496
3496
|
});
|
|
3497
3497
|
}
|
|
3498
3498
|
applyColorSpaceToMaterials(e) {
|
|
3499
|
-
|
|
3499
|
+
Cs({ material: e });
|
|
3500
3500
|
}
|
|
3501
3501
|
material2array(e) {
|
|
3502
3502
|
return Array.isArray(e) ? e : [e];
|
|
@@ -3544,7 +3544,7 @@ class ai {
|
|
|
3544
3544
|
e.track([...this.materials.values()]), e.dispose(), this.materials.clear(), this.fixBaseObjects.clear(), this.materialBaseObjectMap.clear();
|
|
3545
3545
|
}
|
|
3546
3546
|
}
|
|
3547
|
-
class
|
|
3547
|
+
class hi extends ee {
|
|
3548
3548
|
get mList() {
|
|
3549
3549
|
return this.controller;
|
|
3550
3550
|
}
|
|
@@ -3552,7 +3552,7 @@ class li extends ee {
|
|
|
3552
3552
|
super(), this.options = e;
|
|
3553
3553
|
}
|
|
3554
3554
|
addMList(e, t) {
|
|
3555
|
-
const { pencil: s } = this.options, i = new
|
|
3555
|
+
const { pencil: s } = this.options, i = new li(s);
|
|
3556
3556
|
return this.addController(i, t);
|
|
3557
3557
|
}
|
|
3558
3558
|
removePage(e) {
|
|
@@ -3561,19 +3561,19 @@ class li extends ee {
|
|
|
3561
3561
|
});
|
|
3562
3562
|
}
|
|
3563
3563
|
}
|
|
3564
|
-
const
|
|
3564
|
+
const ci = {
|
|
3565
3565
|
antialias: !1,
|
|
3566
3566
|
devicePixelRatio: window.devicePixelRatio,
|
|
3567
3567
|
powerPreference: "high-performance",
|
|
3568
3568
|
toneMappingExposure: 1,
|
|
3569
3569
|
alpha: !1,
|
|
3570
|
-
outputColorSpace:
|
|
3570
|
+
outputColorSpace: Os.sRGB,
|
|
3571
3571
|
logarithmicDepthBuffer: !1,
|
|
3572
3572
|
preserveDrawingBuffer: !1,
|
|
3573
3573
|
stencil: !1,
|
|
3574
3574
|
depth: !1
|
|
3575
3575
|
};
|
|
3576
|
-
class
|
|
3576
|
+
class di {
|
|
3577
3577
|
constructor(e) {
|
|
3578
3578
|
this.options = e;
|
|
3579
3579
|
const { width: t, height: s, rendererParams: i } = e, {
|
|
@@ -3583,17 +3583,17 @@ class ci {
|
|
|
3583
3583
|
powerPreference: a,
|
|
3584
3584
|
toneMappingExposure: c,
|
|
3585
3585
|
outputColorSpace: f,
|
|
3586
|
-
logarithmicDepthBuffer:
|
|
3586
|
+
logarithmicDepthBuffer: p,
|
|
3587
3587
|
preserveDrawingBuffer: v,
|
|
3588
|
-
stencil:
|
|
3588
|
+
stencil: m,
|
|
3589
3589
|
depth: u
|
|
3590
3590
|
} = i, g = new rs({
|
|
3591
3591
|
alpha: r,
|
|
3592
3592
|
antialias: n,
|
|
3593
3593
|
powerPreference: a,
|
|
3594
|
-
logarithmicDepthBuffer:
|
|
3594
|
+
logarithmicDepthBuffer: p,
|
|
3595
3595
|
preserveDrawingBuffer: v,
|
|
3596
|
-
stencil:
|
|
3596
|
+
stencil: m,
|
|
3597
3597
|
depth: u
|
|
3598
3598
|
});
|
|
3599
3599
|
g.setSize(t, s), g.setPixelRatio(o), g.toneMappingExposure = c, g.outputColorSpace = f, this.renderer = g;
|
|
@@ -3617,7 +3617,7 @@ class ci {
|
|
|
3617
3617
|
this.setSize(0, 0), (e = this.renderer) == null || e.clear(), (t = this.renderer) == null || t.dispose(), (s = this.renderer) == null || s.forceContextLoss();
|
|
3618
3618
|
}
|
|
3619
3619
|
}
|
|
3620
|
-
const
|
|
3620
|
+
const pi = {
|
|
3621
3621
|
background: null
|
|
3622
3622
|
};
|
|
3623
3623
|
class mi extends ee {
|
|
@@ -3628,7 +3628,7 @@ class mi extends ee {
|
|
|
3628
3628
|
super(), this.options = e;
|
|
3629
3629
|
}
|
|
3630
3630
|
addScene(e, t) {
|
|
3631
|
-
const s = new
|
|
3631
|
+
const s = new pt();
|
|
3632
3632
|
return e != null && e.background && (s.background = e.background), this.addController(s, t);
|
|
3633
3633
|
}
|
|
3634
3634
|
removePage(e) {
|
|
@@ -3643,10 +3643,10 @@ class mi extends ee {
|
|
|
3643
3643
|
});
|
|
3644
3644
|
}
|
|
3645
3645
|
}
|
|
3646
|
-
class
|
|
3646
|
+
class ui {
|
|
3647
3647
|
constructor(e) {
|
|
3648
3648
|
this.event = new ye.EventEmitter();
|
|
3649
|
-
const { renderer: t, scene: s, camera: i } = e, r = new
|
|
3649
|
+
const { renderer: t, scene: s, camera: i } = e, r = new Ts(
|
|
3650
3650
|
i,
|
|
3651
3651
|
t.domElement
|
|
3652
3652
|
);
|
|
@@ -3712,11 +3712,11 @@ class pi {
|
|
|
3712
3712
|
this.event.removeAllListeners(), (e = this.controls) == null || e.dispose();
|
|
3713
3713
|
}
|
|
3714
3714
|
}
|
|
3715
|
-
const
|
|
3715
|
+
const fi = {
|
|
3716
3716
|
antialias: !0,
|
|
3717
3717
|
devicePixelRatio: window.devicePixelRatio
|
|
3718
3718
|
};
|
|
3719
|
-
class
|
|
3719
|
+
class _i {
|
|
3720
3720
|
constructor(e) {
|
|
3721
3721
|
this.options = e;
|
|
3722
3722
|
const { width: t, height: s, rendererParams: i, renderer: r } = e, { devicePixelRatio: o, antialias: n } = i, a = new r({
|
|
@@ -3735,107 +3735,11 @@ class fi {
|
|
|
3735
3735
|
this.setSize(1, 1), (e = this.renderer) == null || e.clear(), (t = this.renderer) == null || t.dispose();
|
|
3736
3736
|
}
|
|
3737
3737
|
}
|
|
3738
|
-
class _i {
|
|
3739
|
-
/**
|
|
3740
|
-
* Constructs a new timer.
|
|
3741
|
-
*/
|
|
3742
|
-
constructor() {
|
|
3743
|
-
this._previousTime = 0, this._currentTime = 0, this._startTime = performance.now(), this._delta = 0, this._elapsed = 0, this._timescale = 1, this._document = null, this._pageVisibilityHandler = null;
|
|
3744
|
-
}
|
|
3745
|
-
/**
|
|
3746
|
-
* Connect the timer to the given document.Calling this method is not mandatory to
|
|
3747
|
-
* use the timer but enables the usage of the Page Visibility API to avoid large time
|
|
3748
|
-
* delta values.
|
|
3749
|
-
*
|
|
3750
|
-
* @param {Document} document - The document.
|
|
3751
|
-
*/
|
|
3752
|
-
connect(e) {
|
|
3753
|
-
this._document = e, e.hidden !== void 0 && (this._pageVisibilityHandler = gi.bind(this), e.addEventListener(
|
|
3754
|
-
"visibilitychange",
|
|
3755
|
-
this._pageVisibilityHandler,
|
|
3756
|
-
!1
|
|
3757
|
-
));
|
|
3758
|
-
}
|
|
3759
|
-
/**
|
|
3760
|
-
* Disconnects the timer from the DOM and also disables the usage of the Page Visibility API.
|
|
3761
|
-
*/
|
|
3762
|
-
disconnect() {
|
|
3763
|
-
this._pageVisibilityHandler !== null && (this._document.removeEventListener(
|
|
3764
|
-
"visibilitychange",
|
|
3765
|
-
this._pageVisibilityHandler
|
|
3766
|
-
), this._pageVisibilityHandler = null), this._document = null;
|
|
3767
|
-
}
|
|
3768
|
-
/**
|
|
3769
|
-
* Returns the time delta in seconds.
|
|
3770
|
-
*
|
|
3771
|
-
* @return {number} The time delta in second.
|
|
3772
|
-
*/
|
|
3773
|
-
getDelta() {
|
|
3774
|
-
return this._delta / 1e3;
|
|
3775
|
-
}
|
|
3776
|
-
/**
|
|
3777
|
-
* Returns the elapsed time in seconds.
|
|
3778
|
-
*
|
|
3779
|
-
* @return {number} The elapsed time in second.
|
|
3780
|
-
*/
|
|
3781
|
-
getElapsed() {
|
|
3782
|
-
return this._elapsed / 1e3;
|
|
3783
|
-
}
|
|
3784
|
-
/**
|
|
3785
|
-
* Returns the timescale.
|
|
3786
|
-
*
|
|
3787
|
-
* @return {number} The timescale.
|
|
3788
|
-
*/
|
|
3789
|
-
getTimescale() {
|
|
3790
|
-
return this._timescale;
|
|
3791
|
-
}
|
|
3792
|
-
/**
|
|
3793
|
-
* Sets the given timescale which scale the time delta computation
|
|
3794
|
-
* in `update()`.
|
|
3795
|
-
*
|
|
3796
|
-
* @param {number} timescale - The timescale to set.
|
|
3797
|
-
* @return {Timer} A reference to this timer.
|
|
3798
|
-
*/
|
|
3799
|
-
setTimescale(e) {
|
|
3800
|
-
return this._timescale = e, this;
|
|
3801
|
-
}
|
|
3802
|
-
/**
|
|
3803
|
-
* Resets the time computation for the current simulation step.
|
|
3804
|
-
*
|
|
3805
|
-
* @return {Timer} A reference to this timer.
|
|
3806
|
-
*/
|
|
3807
|
-
reset() {
|
|
3808
|
-
return this._currentTime = performance.now() - this._startTime, this;
|
|
3809
|
-
}
|
|
3810
|
-
/**
|
|
3811
|
-
* Can be used to free all internal resources. Usually called when
|
|
3812
|
-
* the timer instance isn't required anymore.
|
|
3813
|
-
*/
|
|
3814
|
-
dispose() {
|
|
3815
|
-
this.disconnect();
|
|
3816
|
-
}
|
|
3817
|
-
/**
|
|
3818
|
-
* Updates the internal state of the timer. This method should be called
|
|
3819
|
-
* once per simulation step and before you perform queries against the timer
|
|
3820
|
-
* (e.g. via `getDelta()`).
|
|
3821
|
-
*
|
|
3822
|
-
* @param {number} timestamp - The current time in milliseconds. Can be obtained
|
|
3823
|
-
* from the `requestAnimationFrame` callback argument. If not provided, the current
|
|
3824
|
-
* time will be determined with `performance.now`.
|
|
3825
|
-
* @return {Timer} A reference to this timer.
|
|
3826
|
-
*/
|
|
3827
|
-
update(e) {
|
|
3828
|
-
return this._pageVisibilityHandler !== null && this._document.hidden === !0 ? this._delta = 0 : (this._previousTime = this._currentTime, this._currentTime = (e !== void 0 ? e : performance.now()) - this._startTime, this._delta = (this._currentTime - this._previousTime) * this._timescale, this._elapsed += this._delta), this;
|
|
3829
|
-
}
|
|
3830
|
-
}
|
|
3831
|
-
function gi() {
|
|
3832
|
-
this._document.hidden === !1 && this.reset();
|
|
3833
|
-
}
|
|
3834
3738
|
const _e = class _e {
|
|
3835
3739
|
constructor(e) {
|
|
3836
3740
|
var r, o;
|
|
3837
|
-
this.raycaster = new dt(), this.maxBackufferArea = 5760 * 5760, this.installPlugins = /* @__PURE__ */ new Map(), this._cameraPositon = new
|
|
3838
|
-
isMergeableObject:
|
|
3741
|
+
this.raycaster = new dt(), this.maxBackufferArea = 5760 * 5760, this.installPlugins = /* @__PURE__ */ new Map(), this._cameraPositon = new j(), this._cameraTarget = new j(), this.event = new ye.EventEmitter(), this.timer = new as(), this.userData = {}, this.pageActiveIndex = 0, this.pageCountIndex = 0, this.userSetDprCache = 1, this.viewPadding = [0, 0, 0, 0], this._isDispose = !1, this.event.setMaxListeners(1 / 0), (o = (r = this.timer).connect) == null || o.call(r, document), this.options = Ut(_e.options, e, {
|
|
3742
|
+
isMergeableObject: Es
|
|
3839
3743
|
}), this.userSetDprCache = this.options.renderer.devicePixelRatio;
|
|
3840
3744
|
const {
|
|
3841
3745
|
container: t,
|
|
@@ -3920,13 +3824,13 @@ const _e = class _e {
|
|
|
3920
3824
|
renderer: r,
|
|
3921
3825
|
controls: o,
|
|
3922
3826
|
loader: n
|
|
3923
|
-
} = this.options, { width: a, height: c } = this.getSize(), f = t ? new
|
|
3827
|
+
} = this.options, { width: a, height: c } = this.getSize(), f = t ? new _i({
|
|
3924
3828
|
width: a,
|
|
3925
3829
|
height: c,
|
|
3926
3830
|
//@ts-ignore
|
|
3927
3831
|
renderer: this.options.WebGPURenderer,
|
|
3928
|
-
rendererParams:
|
|
3929
|
-
}) : new
|
|
3832
|
+
rendererParams: fi
|
|
3833
|
+
}) : new di({
|
|
3930
3834
|
width: a,
|
|
3931
3835
|
height: c,
|
|
3932
3836
|
rendererParams: te(U({}, r), {
|
|
@@ -3934,32 +3838,32 @@ const _e = class _e {
|
|
|
3934
3838
|
})
|
|
3935
3839
|
});
|
|
3936
3840
|
this.rendererController = f;
|
|
3937
|
-
const
|
|
3841
|
+
const p = new Ds({
|
|
3938
3842
|
width: a,
|
|
3939
3843
|
height: c
|
|
3940
|
-
}), v = new mi({}),
|
|
3844
|
+
}), v = new mi({}), m = new Ks({
|
|
3941
3845
|
controlsParams: {
|
|
3942
3846
|
domElement: (_ = o == null ? void 0 : o.domElement) != null ? _ : f.renderer.domElement
|
|
3943
3847
|
}
|
|
3944
|
-
}), u = new
|
|
3848
|
+
}), u = new ai({
|
|
3945
3849
|
loaderParams: U({
|
|
3946
3850
|
anisotropy: this.maxAnisotropy
|
|
3947
3851
|
}, n)
|
|
3948
|
-
}), g = new
|
|
3852
|
+
}), g = new hi({
|
|
3949
3853
|
pencil: this
|
|
3950
|
-
}), y = new
|
|
3854
|
+
}), y = new si({
|
|
3951
3855
|
pencil: this
|
|
3952
3856
|
});
|
|
3953
|
-
this.sceneController = v, this.cameraController =
|
|
3857
|
+
this.sceneController = v, this.cameraController = p, this.controlsController = m, this.loaderController = u, this.mListController = g, this.leadController = y;
|
|
3954
3858
|
const l = this.addPage({
|
|
3955
3859
|
sceneOptions: this.options.scene,
|
|
3956
3860
|
cameraOptions: this.options.camera
|
|
3957
3861
|
});
|
|
3958
3862
|
if (this.showPage(l), s) {
|
|
3959
|
-
const O = new
|
|
3863
|
+
const O = new Js({
|
|
3960
3864
|
container: e,
|
|
3961
3865
|
sceneController: v,
|
|
3962
|
-
cameraController:
|
|
3866
|
+
cameraController: p
|
|
3963
3867
|
});
|
|
3964
3868
|
O.add(v.scene), this.helperController = O, i && O.addViewHelper();
|
|
3965
3869
|
}
|
|
@@ -3972,7 +3876,7 @@ const _e = class _e {
|
|
|
3972
3876
|
ssao: s,
|
|
3973
3877
|
ssaoParams: i,
|
|
3974
3878
|
composer: r
|
|
3975
|
-
} = this.options, o = new
|
|
3879
|
+
} = this.options, o = new Ws({
|
|
3976
3880
|
rendererController: this.rendererController,
|
|
3977
3881
|
sceneController: this.sceneController,
|
|
3978
3882
|
cameraController: this.cameraController,
|
|
@@ -3989,12 +3893,12 @@ const _e = class _e {
|
|
|
3989
3893
|
css3DRendererParams: r
|
|
3990
3894
|
} = this.options;
|
|
3991
3895
|
if (t || s) {
|
|
3992
|
-
const o = new
|
|
3896
|
+
const o = new Qs(e);
|
|
3993
3897
|
t && o.addRenderer("css2d", i), s && o.addRenderer("css3d", r), this.cssRendererController = o;
|
|
3994
3898
|
}
|
|
3995
3899
|
}
|
|
3996
3900
|
initTransformControls() {
|
|
3997
|
-
const e = new
|
|
3901
|
+
const e = new ui({
|
|
3998
3902
|
camera: this.camera,
|
|
3999
3903
|
renderer: this.renderer,
|
|
4000
3904
|
scene: this.scene
|
|
@@ -4034,8 +3938,8 @@ const _e = class _e {
|
|
|
4034
3938
|
leadController: a
|
|
4035
3939
|
} = this, c = this.renderer.getSize(new B());
|
|
4036
3940
|
c.x === e && c.y === t || (r.setSize(e, t), i.setSize(e, t), o == null || o.setSize(e, t), n == null || n.setSize(e, t), a.setSize(e, t), this.installPlugins.forEach((f) => {
|
|
4037
|
-
var
|
|
4038
|
-
(
|
|
3941
|
+
var p;
|
|
3942
|
+
(p = f.setSize) == null || p.call(f, e, t);
|
|
4039
3943
|
}), this.viewPadding.some((f) => f !== 0) && this.setViewPadding(...this.viewPadding), this.render(), s && this.event.emit("resize", { width: e, height: t }));
|
|
4040
3944
|
}
|
|
4041
3945
|
setDevicePixelRatio(e) {
|
|
@@ -4132,11 +4036,11 @@ const _e = class _e {
|
|
|
4132
4036
|
}
|
|
4133
4037
|
}
|
|
4134
4038
|
dispose() {
|
|
4135
|
-
var e, t, s, i, r, o, n, a, c, f,
|
|
4039
|
+
var e, t, s, i, r, o, n, a, c, f, p, v, m, u;
|
|
4136
4040
|
this.handeleResize(1, 1, !1), this.stop(), this.timer.dispose(), Ce.removeAll(), this.event.removeAllListeners(), (e = this.resizeObserver) == null || e.unobserve(this.options.container), this.installPlugins.forEach((g) => {
|
|
4137
4041
|
var y;
|
|
4138
4042
|
(y = g.dispose) == null || y.call(g);
|
|
4139
|
-
}), (t = this.controlsController) == null || t.dispose(), (s = this.transformController) == null || s.dispose(), (i = this.cssRendererController) == null || i.dispose(), (r = this.sceneController) == null || r.dispose(), (o = this.cameraController) == null || o.dispose(), (n = this.helperController) == null || n.dispose(), (a = this.composerController) == null || a.dispose(), (c = this.rendererController) == null || c.dispose(), (f = this.loaderController) == null || f.dispose(), (
|
|
4043
|
+
}), (t = this.controlsController) == null || t.dispose(), (s = this.transformController) == null || s.dispose(), (i = this.cssRendererController) == null || i.dispose(), (r = this.sceneController) == null || r.dispose(), (o = this.cameraController) == null || o.dispose(), (n = this.helperController) == null || n.dispose(), (a = this.composerController) == null || a.dispose(), (c = this.rendererController) == null || c.dispose(), (f = this.loaderController) == null || f.dispose(), (p = this.leadController) == null || p.dispose(), (v = this.mListController) == null || v.dispose(), this.cssRendererController = void 0, this.installPlugins.clear(), (m = this.stats) == null || m.dom.remove(), (u = this.renderer) == null || u.domElement.remove(), this._isDispose = !0;
|
|
4140
4044
|
}
|
|
4141
4045
|
};
|
|
4142
4046
|
_e.options = {
|
|
@@ -4145,26 +4049,26 @@ _e.options = {
|
|
|
4145
4049
|
viewHelper: he,
|
|
4146
4050
|
controls: !0,
|
|
4147
4051
|
transformControls: he,
|
|
4148
|
-
renderer:
|
|
4149
|
-
composer:
|
|
4150
|
-
scene:
|
|
4151
|
-
camera:
|
|
4052
|
+
renderer: ci,
|
|
4053
|
+
composer: Zs,
|
|
4054
|
+
scene: pi,
|
|
4055
|
+
camera: wt,
|
|
4152
4056
|
bloom: !1,
|
|
4153
|
-
bloomParams:
|
|
4057
|
+
bloomParams: Ys,
|
|
4154
4058
|
ssao: !1,
|
|
4155
|
-
loader:
|
|
4156
|
-
ssaoParams:
|
|
4059
|
+
loader: ni,
|
|
4060
|
+
ssaoParams: Vs,
|
|
4157
4061
|
css2DRenderer: !1,
|
|
4158
4062
|
css2DRendererParams: U({}, it),
|
|
4159
4063
|
css3DRenderer: !1,
|
|
4160
4064
|
css3DRendererParams: U({}, it)
|
|
4161
4065
|
};
|
|
4162
4066
|
let nt = _e;
|
|
4163
|
-
const
|
|
4067
|
+
const Xi = J.ACTION;
|
|
4164
4068
|
export {
|
|
4165
|
-
|
|
4069
|
+
ls as BaseObject,
|
|
4166
4070
|
nt as Pencil,
|
|
4167
4071
|
Pe as ResourceTracker,
|
|
4168
|
-
|
|
4072
|
+
Xi as cameraControlsAction,
|
|
4169
4073
|
nt as default
|
|
4170
4074
|
};
|