@shopware-ag/dive 3.0.7 → 3.0.9
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/build/chunks/{AssetCache-c81WyoAv.cjs → AssetCache-B8-Wr1-A.cjs} +1 -1
- package/build/chunks/{AssetCache-Bj2UA1RH.mjs → AssetCache-CpOZDw2l.mjs} +1 -1
- package/build/chunks/AssetLoader-C_5aI7P_.cjs +3 -0
- package/build/chunks/{AssetLoader-DhlfLA6h.mjs → AssetLoader-_PLMJWFq.mjs} +167 -151
- package/build/chunks/{FileTypes-q3iL9lOt.mjs → FileTypes-BzbxtVmA.mjs} +196 -166
- package/build/chunks/{FileTypes-DScwT8Ir.cjs → FileTypes-Cnt-P_Lo.cjs} +2 -2
- package/build/chunks/{PerspectiveCamera-35cBnxwG.mjs → PerspectiveCamera-B5TvUzTa.mjs} +2 -2
- package/build/chunks/isFileTypeSupported-CH4N-8-i.cjs +1 -0
- package/build/chunks/{isFileTypeSupported-0a26WUf6.mjs → isFileTypeSupported-Cj4v-F9a.mjs} +3 -3
- package/build/dive.cjs +1 -1
- package/build/dive.mjs +132 -117
- package/build/helpers/index.d.ts +3 -0
- package/build/helpers/isFileExtensionSupported/isFileExtensionSupported.d.ts +7 -0
- package/build/helpers/isFileSupported/isFileSupported.d.ts +6 -0
- package/build/helpers/isFileTypeSupported/isFileTypeSupported.d.ts +2 -0
- package/build/helpers/isMimeTypeSupported/isMimeTypeSupported.d.ts +7 -0
- package/build/helpers/isURIFileExtensionSupported/isURIFileExtensionSupported.d.ts +7 -0
- package/build/plugins/ar/index.cjs +1 -1
- package/build/plugins/ar/index.mjs +1 -1
- package/build/plugins/assetcache/index.cjs +1 -1
- package/build/plugins/assetcache/index.mjs +1 -1
- package/build/plugins/assetloader/index.cjs +1 -1
- package/build/plugins/assetloader/index.mjs +2 -2
- package/build/plugins/mediacreator/index.mjs +1 -1
- package/build/plugins/orbitcontroller/index.cjs +1 -1
- package/build/plugins/orbitcontroller/index.mjs +1 -1
- package/build/plugins/orientationdisplay/index.cjs +1 -1
- package/build/plugins/orientationdisplay/index.mjs +2 -2
- package/build/plugins/quickview/index.cjs +1 -1
- package/build/plugins/quickview/index.mjs +1 -1
- package/build/plugins/state/index.cjs +1 -1
- package/build/plugins/state/index.mjs +1 -1
- package/build/plugins/toolbox/index.cjs +1 -1
- package/build/plugins/toolbox/index.mjs +2 -2
- package/build/types/file/FileTypes.d.ts +9 -0
- package/package.json +1 -1
- package/build/chunks/AssetLoader-D6U0QvUg.cjs +0 -3
- package/build/chunks/isFileTypeSupported-CqKLRgSA.cjs +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var e = (
|
|
4
|
-
import { PMREMGenerator as X, Scene as x, SphereGeometry as
|
|
5
|
-
import { HDRLoader as
|
|
6
|
-
import { P, U as
|
|
7
|
-
import { G as
|
|
1
|
+
var eA = Object.defineProperty;
|
|
2
|
+
var tA = (o, t, A) => t in o ? eA(o, t, { enumerable: !0, configurable: !0, writable: !0, value: A }) : o[t] = A;
|
|
3
|
+
var e = (o, t, A) => tA(o, typeof t != "symbol" ? t + "" : t, A);
|
|
4
|
+
import { PMREMGenerator as X, Scene as x, SphereGeometry as K, MeshBasicMaterial as Y, BackSide as gA, Mesh as u, NoToneMapping as sA, LinearSRGBColorSpace as oA, CubeRenderTarget as nA, HalfFloatType as fA, CubeCamera as hA, EquirectangularReflectionMapping as aA, WebGPURenderer as rA, PCFSoftShadowMap as BA, PCFShadowMap as cA, BasicShadowMap as PA, SRGBColorSpace as zA, LinearToneMapping as IA, MathUtils as b, Object3D as w, AmbientLight as CA, PointLight as uA, FrontSide as J, HemisphereLight as wA, DirectionalLight as GA, Vector3 as a, Box3 as I, Box3Helper as mA, Sphere as DA, MeshStandardMaterial as y, Raycaster as pA, CylinderGeometry as lA, BufferGeometry as T, BufferAttribute as j, BoxGeometry as d, ConeGeometry as KA, LineDashedMaterial as vA, Line as dA, PlaneGeometry as S, Color as C, MeshBasicNodeMaterial as HA, DoubleSide as qA, TOUCH as c, MOUSE as B, EventDispatcher as YA, Spherical as Z, Vector2 as r, Quaternion as E } from "three/webgpu";
|
|
5
|
+
import { HDRLoader as bA } from "three/examples/jsm/loaders/HDRLoader.js";
|
|
6
|
+
import { P, U as yA, H as OA, a as MA, D as LA } from "./PerspectiveCamera-B5TvUzTa.mjs";
|
|
7
|
+
import { G as FA } from "./GridNode-0R5ZnzR6.mjs";
|
|
8
8
|
import { uniform as G } from "three/tsl";
|
|
9
|
-
class
|
|
9
|
+
class XA {
|
|
10
10
|
constructor() {
|
|
11
11
|
e(this, "isDIVEClock", !0);
|
|
12
12
|
e(this, "_lastTime", 0);
|
|
@@ -92,7 +92,7 @@ class O {
|
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
|
-
const
|
|
95
|
+
const jA = {
|
|
96
96
|
enabled: !0,
|
|
97
97
|
imageUrl: _,
|
|
98
98
|
useAsBackground: !1,
|
|
@@ -104,7 +104,7 @@ const XA = {
|
|
|
104
104
|
replaceLights: !1
|
|
105
105
|
// deprecated
|
|
106
106
|
};
|
|
107
|
-
class
|
|
107
|
+
class ZA {
|
|
108
108
|
constructor(t, A, i = {}) {
|
|
109
109
|
e(this, "originalBackground");
|
|
110
110
|
e(this, "_webgpurenderer");
|
|
@@ -120,7 +120,7 @@ class jA {
|
|
|
120
120
|
e(this, "_initRequested", !1);
|
|
121
121
|
e(this, "_disposed", !1);
|
|
122
122
|
this._webgpurenderer = t, this.scene = A, this.originalBackground = this.scene.background, this.pmrem = new X(t), this.options = {
|
|
123
|
-
...
|
|
123
|
+
...jA,
|
|
124
124
|
...i
|
|
125
125
|
}, this._loadPromise = this._loadSourceImage(this.options.imageUrl);
|
|
126
126
|
}
|
|
@@ -157,17 +157,17 @@ class jA {
|
|
|
157
157
|
this.clearEnvironment();
|
|
158
158
|
return;
|
|
159
159
|
}
|
|
160
|
-
const t = new x(), A = new
|
|
160
|
+
const t = new x(), A = new K(10, 60, 40), i = new Y({
|
|
161
161
|
map: this.sourceImage,
|
|
162
|
-
side:
|
|
162
|
+
side: gA
|
|
163
163
|
}), g = new u(A, i);
|
|
164
164
|
g.scale.set(1, 1, -1), g.rotation.y = this.options.rotateY ?? 0, t.add(g);
|
|
165
|
-
const s = this._webgpurenderer.toneMapping,
|
|
166
|
-
this._webgpurenderer.toneMapping =
|
|
167
|
-
const f = new
|
|
168
|
-
type:
|
|
165
|
+
const s = this._webgpurenderer.toneMapping, n = this._webgpurenderer.outputColorSpace;
|
|
166
|
+
this._webgpurenderer.toneMapping = sA, this._webgpurenderer.outputColorSpace = oA;
|
|
167
|
+
const f = new nA(1024, {
|
|
168
|
+
type: fA
|
|
169
169
|
});
|
|
170
|
-
new
|
|
170
|
+
new hA(0.1, 1e3, f).update(this._webgpurenderer, t), this._webgpurenderer.toneMapping = s, this._webgpurenderer.outputColorSpace = n;
|
|
171
171
|
const z = this.pmrem.fromCubemap(f.texture);
|
|
172
172
|
this.currentEnvRT && (this.currentEnvRT.texture.dispose(), this.currentEnvRT.dispose(), this.currentEnvRT = null), this.currentBackgroundCube && (this.currentBackgroundCube.texture.dispose(), this.currentBackgroundCube.dispose(), this.currentBackgroundCube = null), this.currentEnvRT = z, this.scene.environment = z.texture, this.options.useAsBackground ? (this.scene.background = f.texture, this.currentBackgroundCube = f) : (this.scene.background = this.originalBackground, f.texture.dispose(), f.dispose());
|
|
173
173
|
}
|
|
@@ -211,8 +211,8 @@ class jA {
|
|
|
211
211
|
* @returns The loaded equirectangular HDR texture.
|
|
212
212
|
*/
|
|
213
213
|
async loadHDRImage(t) {
|
|
214
|
-
const A = await new
|
|
215
|
-
return A.mapping =
|
|
214
|
+
const A = await new bA().loadAsync(t);
|
|
215
|
+
return A.mapping = aA, A;
|
|
216
216
|
}
|
|
217
217
|
async _loadSourceImage(t) {
|
|
218
218
|
var g;
|
|
@@ -236,7 +236,7 @@ const V = {
|
|
|
236
236
|
shadows: !0,
|
|
237
237
|
shadowQuality: "high"
|
|
238
238
|
};
|
|
239
|
-
class
|
|
239
|
+
class EA {
|
|
240
240
|
constructor(t, A, i) {
|
|
241
241
|
e(this, "isDIVERenderer", !0);
|
|
242
242
|
e(this, "_webgpurenderer");
|
|
@@ -246,7 +246,7 @@ class ZA {
|
|
|
246
246
|
this._scene = t, this._camera = A, this._settings = {
|
|
247
247
|
...V,
|
|
248
248
|
...i ?? {}
|
|
249
|
-
}, this._webgpurenderer = this._createWebGPURenderer(), this._environment = new
|
|
249
|
+
}, this._webgpurenderer = this._createWebGPURenderer(), this._environment = new ZA(
|
|
250
250
|
this._webgpurenderer,
|
|
251
251
|
this._scene
|
|
252
252
|
);
|
|
@@ -296,12 +296,12 @@ class ZA {
|
|
|
296
296
|
...this._settings,
|
|
297
297
|
forceWebGL: !0
|
|
298
298
|
});
|
|
299
|
-
return t.shadowMap.enabled = this._settings.shadows, t.shadowMap.type = this._settings.shadowQuality === "high" ?
|
|
299
|
+
return t.shadowMap.enabled = this._settings.shadows, t.shadowMap.type = this._settings.shadowQuality === "high" ? BA : this._settings.shadowQuality === "medium" ? cA : PA, t.setPixelRatio(window.devicePixelRatio), t.outputColorSpace = zA, t.toneMapping = IA, t.toneMappingExposure = 1, t;
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
302
|
var k;
|
|
303
303
|
k = Symbol.toStringTag;
|
|
304
|
-
class
|
|
304
|
+
class QA {
|
|
305
305
|
constructor() {
|
|
306
306
|
e(this, "isDIVEDeferredPromise", !0);
|
|
307
307
|
e(this, k, "Promise");
|
|
@@ -341,7 +341,7 @@ class EA {
|
|
|
341
341
|
});
|
|
342
342
|
}
|
|
343
343
|
}
|
|
344
|
-
class
|
|
344
|
+
class WA {
|
|
345
345
|
constructor(t, A) {
|
|
346
346
|
e(this, "isDIVECanvasLifecycleManager", !0);
|
|
347
347
|
e(this, "_resizeObserver");
|
|
@@ -351,13 +351,13 @@ class QA {
|
|
|
351
351
|
e(this, "_disposed", !1);
|
|
352
352
|
// is true initially but is set to false as soon as canvas has a parent
|
|
353
353
|
e(this, "_pollCanvasParent", !0);
|
|
354
|
-
e(this, "_healthyCanvasPromise", new
|
|
354
|
+
e(this, "_healthyCanvasPromise", new QA());
|
|
355
355
|
this._onResize = A, this._canvas = t, this._resizeObserver = new ResizeObserver((i) => {
|
|
356
356
|
this._disposed || i.forEach((g) => {
|
|
357
357
|
var h;
|
|
358
358
|
if (g.target !== this._canvas.parentElement) return;
|
|
359
|
-
const s = (h = g.borderBoxSize) == null ? void 0 : h[0],
|
|
360
|
-
|
|
359
|
+
const s = (h = g.borderBoxSize) == null ? void 0 : h[0], n = (s == null ? void 0 : s.inlineSize) ?? g.contentRect.width, f = (s == null ? void 0 : s.blockSize) ?? g.contentRect.height;
|
|
360
|
+
n > 0 && f > 0 && (this._applyResize(n, f), this._healthyCanvasPromise.resolve({ width: n, height: f }));
|
|
361
361
|
});
|
|
362
362
|
}), this._canvas.parentElement && (this._resizeObserver.observe(this._canvas.parentElement), this._pollCanvasParent = !1);
|
|
363
363
|
}
|
|
@@ -379,7 +379,7 @@ class QA {
|
|
|
379
379
|
t === this._width && A === this._height || (this._width = t, this._height = A, this._onResize(t, A));
|
|
380
380
|
}
|
|
381
381
|
}
|
|
382
|
-
class
|
|
382
|
+
class NA {
|
|
383
383
|
constructor(t, A, i) {
|
|
384
384
|
e(this, "isDIVEView", !0);
|
|
385
385
|
e(this, "uuid", b.generateUUID());
|
|
@@ -390,11 +390,11 @@ class WA {
|
|
|
390
390
|
e(this, "_handleCanvasResize", (t, A) => {
|
|
391
391
|
this.onResize(t, A), this._renderer.tick();
|
|
392
392
|
});
|
|
393
|
-
this._scene = t, this._camera = A, this._settings = i, this._renderer = new
|
|
393
|
+
this._scene = t, this._camera = A, this._settings = i, this._renderer = new EA(
|
|
394
394
|
this._scene,
|
|
395
395
|
this._camera,
|
|
396
396
|
this._settings
|
|
397
|
-
), this._canvasLifecycleManager = new
|
|
397
|
+
), this._canvasLifecycleManager = new WA(
|
|
398
398
|
this._renderer.canvas,
|
|
399
399
|
this._handleCanvasResize
|
|
400
400
|
);
|
|
@@ -448,14 +448,14 @@ class WA {
|
|
|
448
448
|
this._paused = !1;
|
|
449
449
|
}
|
|
450
450
|
}
|
|
451
|
-
class
|
|
451
|
+
class kA extends w {
|
|
452
452
|
constructor() {
|
|
453
453
|
super();
|
|
454
454
|
e(this, "isDIVELight", !0);
|
|
455
455
|
e(this, "isDIVEAmbientLight", !0);
|
|
456
456
|
e(this, "isSelectable", !0);
|
|
457
457
|
e(this, "_light");
|
|
458
|
-
this.name = "DIVEAmbientLight", this._light = new
|
|
458
|
+
this.name = "DIVEAmbientLight", this._light = new CA(16777215, 1), this._light.layers.mask = P, this.add(this._light);
|
|
459
459
|
}
|
|
460
460
|
setColor(A) {
|
|
461
461
|
this._light.color = A;
|
|
@@ -467,7 +467,7 @@ class NA extends w {
|
|
|
467
467
|
this._light.visible = A;
|
|
468
468
|
}
|
|
469
469
|
}
|
|
470
|
-
class
|
|
470
|
+
class xA extends w {
|
|
471
471
|
constructor() {
|
|
472
472
|
super();
|
|
473
473
|
e(this, "isDIVELight", !0);
|
|
@@ -477,8 +477,8 @@ class kA extends w {
|
|
|
477
477
|
e(this, "gizmo", null);
|
|
478
478
|
e(this, "light");
|
|
479
479
|
e(this, "mesh");
|
|
480
|
-
this.name = "DIVEPointLight", this.light = new
|
|
481
|
-
const A = 0.1, i = new
|
|
480
|
+
this.name = "DIVEPointLight", this.light = new uA(16777215, 1), this.light.layers.mask = P, this.light.castShadow = !0, this.light.shadow.mapSize.width = 512, this.light.shadow.mapSize.height = 512, this.add(this.light);
|
|
481
|
+
const A = 0.1, i = new K(
|
|
482
482
|
A,
|
|
483
483
|
A * 320,
|
|
484
484
|
A * 320
|
|
@@ -488,7 +488,7 @@ class kA extends w {
|
|
|
488
488
|
opacity: 0.8,
|
|
489
489
|
side: J
|
|
490
490
|
});
|
|
491
|
-
this.mesh = new u(i, g), this.mesh.layers.mask =
|
|
491
|
+
this.mesh = new u(i, g), this.mesh.layers.mask = yA, this.add(this.mesh);
|
|
492
492
|
}
|
|
493
493
|
setColor(A) {
|
|
494
494
|
this.light.color = A, this.mesh.material.color = A;
|
|
@@ -525,7 +525,7 @@ class kA extends w {
|
|
|
525
525
|
});
|
|
526
526
|
}
|
|
527
527
|
}
|
|
528
|
-
class
|
|
528
|
+
class JA extends w {
|
|
529
529
|
constructor() {
|
|
530
530
|
super();
|
|
531
531
|
e(this, "isDIVELight", !0);
|
|
@@ -533,7 +533,7 @@ class xA extends w {
|
|
|
533
533
|
e(this, "isSelectable", !0);
|
|
534
534
|
e(this, "_hemiLight");
|
|
535
535
|
e(this, "_dirLight");
|
|
536
|
-
this.name = "DIVESceneLight", this._hemiLight = new
|
|
536
|
+
this.name = "DIVESceneLight", this._hemiLight = new wA(16777215, 16777215, 2), this._hemiLight.layers.mask = P, this._hemiLight.position.set(0, 50, 0), this._hemiLight.visible = !0, this.add(this._hemiLight), this._dirLight = new GA(16777215, 3), this._dirLight.layers.mask = P, this._dirLight.position.set(1, 1.75, 1), this._dirLight.position.multiplyScalar(30), this._dirLight.castShadow = !0, this._dirLight.visible = !0, this._dirLight.shadow.mapSize.width = 2048, this._dirLight.shadow.mapSize.height = 2048;
|
|
537
537
|
const A = 5;
|
|
538
538
|
this._dirLight.shadow.camera.left = -A, this._dirLight.shadow.camera.right = A, this._dirLight.shadow.camera.top = A, this._dirLight.shadow.camera.bottom = -A, this._dirLight.shadow.camera.far = 3500, this.add(this._dirLight);
|
|
539
539
|
}
|
|
@@ -547,7 +547,7 @@ class xA extends w {
|
|
|
547
547
|
this._hemiLight.visible = A, this._dirLight.visible = A;
|
|
548
548
|
}
|
|
549
549
|
}
|
|
550
|
-
const R = (
|
|
550
|
+
const R = (o) => o.parent ? R(o.parent) : o;
|
|
551
551
|
class M extends w {
|
|
552
552
|
constructor() {
|
|
553
553
|
super();
|
|
@@ -557,14 +557,14 @@ class M extends w {
|
|
|
557
557
|
e(this, "gizmo", null);
|
|
558
558
|
e(this, "_positionWorldBuffer");
|
|
559
559
|
e(this, "_boundingBox");
|
|
560
|
-
this.layers.mask = P, this._positionWorldBuffer = new
|
|
560
|
+
this.layers.mask = P, this._positionWorldBuffer = new a(), this._boundingBox = new I();
|
|
561
561
|
}
|
|
562
562
|
setPosition(A) {
|
|
563
563
|
if (!this.parent) {
|
|
564
564
|
this.position.set(A.x, A.y, A.z);
|
|
565
565
|
return;
|
|
566
566
|
}
|
|
567
|
-
const i = new
|
|
567
|
+
const i = new a(A.x, A.y, A.z);
|
|
568
568
|
this.position.copy(this.parent.worldToLocal(i)), "isDIVEGroup" in this.parent && this.parent.updateLineTo(this);
|
|
569
569
|
}
|
|
570
570
|
setRotation(A) {
|
|
@@ -664,10 +664,10 @@ class q extends M {
|
|
|
664
664
|
h.geometry.computeBoundingBox(), h.geometry.boundingBox && s.union(
|
|
665
665
|
h.geometry.boundingBox.clone().applyMatrix4(h.matrixWorld)
|
|
666
666
|
);
|
|
667
|
-
})), this.rotation.copy(A.rotation), this._box = s, this._size = s.getSize(new
|
|
668
|
-
const
|
|
669
|
-
|
|
670
|
-
|
|
667
|
+
})), this.rotation.copy(A.rotation), this._box = s, this._size = s.getSize(new a()), this._center = s.getCenter(new a()), this._boxHelper = new mA(this._box, g), this._boxHelper.visible = !1, this.add(this._boxHelper), this._sphere = s.getBoundingSphere(new DA()), this._radius = this._sphere.radius;
|
|
668
|
+
const n = new K(this._radius, 32, 32);
|
|
669
|
+
n.translate(this._center.x, this._center.y, this._center.z), this._sphereHelper = new u(
|
|
670
|
+
n,
|
|
671
671
|
new Y({ color: g, wireframe: !0 })
|
|
672
672
|
), this._sphereHelper.visible = !1, this.add(this._sphereHelper);
|
|
673
673
|
}
|
|
@@ -761,8 +761,8 @@ class U extends M {
|
|
|
761
761
|
async setFromURL(A) {
|
|
762
762
|
const g = await (await this._getAssetLoader()).load(A);
|
|
763
763
|
return this.setFromGLTF(g), import("../plugins/state/index.mjs").then(({ State: s }) => {
|
|
764
|
-
var
|
|
765
|
-
(
|
|
764
|
+
var n;
|
|
765
|
+
(n = s.get(this.userData.id)) == null || n.performAction("MODEL_LOADED", {
|
|
766
766
|
id: this.userData.id
|
|
767
767
|
});
|
|
768
768
|
}), this;
|
|
@@ -780,13 +780,13 @@ class U extends M {
|
|
|
780
780
|
placeOnFloor() {
|
|
781
781
|
this.updateWorldMatrix(!0, !0);
|
|
782
782
|
const A = this.getWorldPosition(this._positionWorldBuffer), i = A.clone(), g = new I();
|
|
783
|
-
this.children.forEach((
|
|
784
|
-
|
|
783
|
+
this.children.forEach((n) => {
|
|
784
|
+
n instanceof q || g.expandByObject(n, !0);
|
|
785
785
|
});
|
|
786
786
|
const s = -g.min.y;
|
|
787
|
-
Math.abs(s) < 1e-9 || (A.y += s, A.y !== i.y && (this.setPosition(A), import("../plugins/state/index.mjs").then(({ State:
|
|
787
|
+
Math.abs(s) < 1e-9 || (A.y += s, A.y !== i.y && (this.setPosition(A), import("../plugins/state/index.mjs").then(({ State: n }) => {
|
|
788
788
|
var f;
|
|
789
|
-
(f =
|
|
789
|
+
(f = n.get(this.userData.id)) == null || f.performAction("UPDATE_OBJECT", {
|
|
790
790
|
id: this.userData.id,
|
|
791
791
|
position: A,
|
|
792
792
|
rotation: this.rotation,
|
|
@@ -806,17 +806,17 @@ class U extends M {
|
|
|
806
806
|
this.children.forEach((h) => {
|
|
807
807
|
h instanceof q || g.expandByObject(h, !0);
|
|
808
808
|
});
|
|
809
|
-
const s = g.getCenter(new
|
|
809
|
+
const s = g.getCenter(new a());
|
|
810
810
|
s.y = g.min.y;
|
|
811
|
-
const
|
|
812
|
-
|
|
813
|
-
const f =
|
|
811
|
+
const n = new pA(s, new a(0, -1, 0));
|
|
812
|
+
n.layers.mask = P;
|
|
813
|
+
const f = n.intersectObjects(
|
|
814
814
|
R(this).root.children,
|
|
815
815
|
!0
|
|
816
816
|
);
|
|
817
817
|
if (f.length > 0) {
|
|
818
|
-
const h = f[0].object,
|
|
819
|
-
if (Math.abs(
|
|
818
|
+
const h = f[0].object, D = new I().setFromObject(h).max.y - g.min.y;
|
|
819
|
+
if (Math.abs(D) < 1e-9 || (A.y += D, A.y === i.y)) return;
|
|
820
820
|
this.setPosition(A), import("../plugins/state/index.mjs").then(({ State: v }) => {
|
|
821
821
|
var p;
|
|
822
822
|
(p = v.get(this.userData.id)) == null || p.performAction("UPDATE_OBJECT", {
|
|
@@ -830,7 +830,7 @@ class U extends M {
|
|
|
830
830
|
this.placeOnFloor();
|
|
831
831
|
}
|
|
832
832
|
}
|
|
833
|
-
class
|
|
833
|
+
class TA extends U {
|
|
834
834
|
constructor() {
|
|
835
835
|
super();
|
|
836
836
|
e(this, "isDIVEPrimitive", !0);
|
|
@@ -867,7 +867,7 @@ class JA extends U {
|
|
|
867
867
|
}
|
|
868
868
|
}
|
|
869
869
|
createCylinderGeometry(A) {
|
|
870
|
-
const i = new
|
|
870
|
+
const i = new lA(
|
|
871
871
|
A.width / 2,
|
|
872
872
|
A.width / 2,
|
|
873
873
|
A.height,
|
|
@@ -876,7 +876,7 @@ class JA extends U {
|
|
|
876
876
|
return i.translate(0, A.height / 2, 0), i;
|
|
877
877
|
}
|
|
878
878
|
createSphereGeometry(A) {
|
|
879
|
-
return new
|
|
879
|
+
return new K(A.width / 2, 256, 256);
|
|
880
880
|
}
|
|
881
881
|
createPyramidGeometry(A) {
|
|
882
882
|
const i = new Float32Array([
|
|
@@ -954,7 +954,7 @@ class JA extends U {
|
|
|
954
954
|
return i.translate(0, A.height / 2, 0), i;
|
|
955
955
|
}
|
|
956
956
|
}
|
|
957
|
-
class
|
|
957
|
+
class SA extends M {
|
|
958
958
|
// lines to children
|
|
959
959
|
constructor() {
|
|
960
960
|
super();
|
|
@@ -1008,11 +1008,11 @@ class TA extends M {
|
|
|
1008
1008
|
* Creates a line for visualization.
|
|
1009
1009
|
*/
|
|
1010
1010
|
createLine() {
|
|
1011
|
-
const A = new T(), i = new
|
|
1011
|
+
const A = new T(), i = new vA({
|
|
1012
1012
|
color: 6710886,
|
|
1013
1013
|
dashSize: 0.05,
|
|
1014
1014
|
gapSize: 0.025
|
|
1015
|
-
}), g = new
|
|
1015
|
+
}), g = new dA(A, i);
|
|
1016
1016
|
return g.visible = !1, g;
|
|
1017
1017
|
}
|
|
1018
1018
|
/**
|
|
@@ -1020,7 +1020,7 @@ class TA extends M {
|
|
|
1020
1020
|
*/
|
|
1021
1021
|
_updateLineTo(A, i) {
|
|
1022
1022
|
const g = [
|
|
1023
|
-
new
|
|
1023
|
+
new a(0, 0, 0),
|
|
1024
1024
|
i.position.clone()
|
|
1025
1025
|
];
|
|
1026
1026
|
A.geometry.setFromPoints(g), A.computeLineDistances();
|
|
@@ -1073,7 +1073,7 @@ class TA extends M {
|
|
|
1073
1073
|
// this._boxMesh.visible = true;
|
|
1074
1074
|
// }
|
|
1075
1075
|
}
|
|
1076
|
-
class
|
|
1076
|
+
class _A extends u {
|
|
1077
1077
|
constructor() {
|
|
1078
1078
|
const A = new S(1, 1);
|
|
1079
1079
|
A.scale(1e3, 1e3, 1), A.rotateX(-Math.PI / 2);
|
|
@@ -1092,12 +1092,12 @@ class SA extends u {
|
|
|
1092
1092
|
this.material.color = new C(A);
|
|
1093
1093
|
}
|
|
1094
1094
|
}
|
|
1095
|
-
class
|
|
1095
|
+
class VA extends w {
|
|
1096
1096
|
constructor() {
|
|
1097
1097
|
super();
|
|
1098
1098
|
e(this, "isDIVERoot", !0);
|
|
1099
1099
|
e(this, "_floor");
|
|
1100
|
-
this.name = "Root", this._floor = new
|
|
1100
|
+
this.name = "Root", this._floor = new _A(), this.add(this._floor);
|
|
1101
1101
|
}
|
|
1102
1102
|
get floor() {
|
|
1103
1103
|
return this._floor;
|
|
@@ -1128,15 +1128,15 @@ class _A extends w {
|
|
|
1128
1128
|
case "light": {
|
|
1129
1129
|
switch (A.type) {
|
|
1130
1130
|
case "scene": {
|
|
1131
|
-
i = new
|
|
1131
|
+
i = new JA();
|
|
1132
1132
|
break;
|
|
1133
1133
|
}
|
|
1134
1134
|
case "ambient": {
|
|
1135
|
-
i = new
|
|
1135
|
+
i = new kA();
|
|
1136
1136
|
break;
|
|
1137
1137
|
}
|
|
1138
1138
|
case "point": {
|
|
1139
|
-
i = new
|
|
1139
|
+
i = new xA();
|
|
1140
1140
|
break;
|
|
1141
1141
|
}
|
|
1142
1142
|
default:
|
|
@@ -1152,11 +1152,11 @@ class _A extends w {
|
|
|
1152
1152
|
break;
|
|
1153
1153
|
}
|
|
1154
1154
|
case "primitive": {
|
|
1155
|
-
i = new
|
|
1155
|
+
i = new TA(), i.name = A.name, i.userData.id = A.id, this.add(i), this._updatePrimitive(i, A);
|
|
1156
1156
|
break;
|
|
1157
1157
|
}
|
|
1158
1158
|
case "group": {
|
|
1159
|
-
i = new
|
|
1159
|
+
i = new SA(), i.name = A.name, i.userData.id = A.id, this.add(i), this._updateGroup(i, A);
|
|
1160
1160
|
break;
|
|
1161
1161
|
}
|
|
1162
1162
|
default:
|
|
@@ -1288,7 +1288,7 @@ class _A extends w {
|
|
|
1288
1288
|
return A.parent !== null ? this._findScene(A.parent) : A;
|
|
1289
1289
|
}
|
|
1290
1290
|
}
|
|
1291
|
-
const
|
|
1291
|
+
const RA = "#dddddd", UA = "#888888", H = 50, $A = 1, Ai = 10;
|
|
1292
1292
|
class Q extends w {
|
|
1293
1293
|
constructor(A) {
|
|
1294
1294
|
super();
|
|
@@ -1296,20 +1296,20 @@ class Q extends w {
|
|
|
1296
1296
|
e(this, "_material");
|
|
1297
1297
|
e(this, "_uniforms");
|
|
1298
1298
|
e(this, "_gridSize");
|
|
1299
|
-
this.name = "Grid", this._gridSize = (A == null ? void 0 : A.gridSize) ??
|
|
1300
|
-
const i = (A == null ? void 0 : A.majorLineEvery) ??
|
|
1299
|
+
this.name = "Grid", this._gridSize = (A == null ? void 0 : A.gridSize) ?? $A;
|
|
1300
|
+
const i = (A == null ? void 0 : A.majorLineEvery) ?? Ai, g = new S(H, H);
|
|
1301
1301
|
g.rotateX(-Math.PI / 2), this._uniforms = {
|
|
1302
1302
|
uGridSize: G(this._gridSize),
|
|
1303
1303
|
uMajorLineEvery: G(i),
|
|
1304
|
-
uMinorLineColor: G(new C(
|
|
1305
|
-
uMajorLineColor: G(new C(
|
|
1304
|
+
uMinorLineColor: G(new C(RA)),
|
|
1305
|
+
uMajorLineColor: G(new C(UA)),
|
|
1306
1306
|
uFadeDistance: G(H / 2)
|
|
1307
|
-
}, this._material = new
|
|
1307
|
+
}, this._material = new HA({
|
|
1308
1308
|
transparent: !0,
|
|
1309
1309
|
depthWrite: !1,
|
|
1310
|
-
side:
|
|
1311
|
-
outputNode: new
|
|
1312
|
-
}), this._mesh = new u(g, this._material), this._mesh.layers.mask =
|
|
1310
|
+
side: qA,
|
|
1311
|
+
outputNode: new FA(this._uniforms)
|
|
1312
|
+
}), this._mesh = new u(g, this._material), this._mesh.layers.mask = OA, this._mesh.frustumCulled = !1, this._mesh.renderOrder = -1, this._mesh.onBeforeRender = (s, n, f) => {
|
|
1313
1313
|
const h = this._gridSize;
|
|
1314
1314
|
this._mesh.position.x = Math.round(f.position.x / h) * h, this._mesh.position.z = Math.round(f.position.z / h) * h, this._mesh.updateMatrixWorld(!0);
|
|
1315
1315
|
}, this.add(this._mesh);
|
|
@@ -1334,14 +1334,14 @@ const $ = {
|
|
|
1334
1334
|
gridMajorLineEvery: 5,
|
|
1335
1335
|
backgroundColor: "transparent"
|
|
1336
1336
|
};
|
|
1337
|
-
class
|
|
1337
|
+
class ii extends x {
|
|
1338
1338
|
constructor(A) {
|
|
1339
1339
|
super();
|
|
1340
1340
|
e(this, "isDIVEScene", !0);
|
|
1341
1341
|
e(this, "_settings");
|
|
1342
1342
|
e(this, "_root");
|
|
1343
1343
|
e(this, "_grid", null);
|
|
1344
|
-
this._settings = { ...$, ...A ?? {} }, this.setBackground(this._settings.backgroundColor), this._root = new
|
|
1344
|
+
this._settings = { ...$, ...A ?? {} }, this.setBackground(this._settings.backgroundColor), this._root = new VA(), this._root.floor.setVisibility(this._settings.displayFloor), this.add(this._root), this._settings.displayGrid && (this._grid = new Q({
|
|
1345
1345
|
gridSize: this._settings.gridSize,
|
|
1346
1346
|
majorLineEvery: this._settings.gridMajorLineEvery
|
|
1347
1347
|
}), this._grid.setVisibility(this._settings.displayGrid), this.add(this._grid));
|
|
@@ -1365,11 +1365,11 @@ class Ai extends x {
|
|
|
1365
1365
|
this.remove(this._root), this._grid && this.remove(this._grid);
|
|
1366
1366
|
}
|
|
1367
1367
|
}
|
|
1368
|
-
const
|
|
1368
|
+
const ei = {
|
|
1369
1369
|
enableDamping: !0,
|
|
1370
1370
|
dampingFactor: 0.05,
|
|
1371
1371
|
enabled: !0,
|
|
1372
|
-
target: new
|
|
1372
|
+
target: new a(),
|
|
1373
1373
|
minDistance: 0,
|
|
1374
1374
|
maxDistance: 1 / 0,
|
|
1375
1375
|
minZoom: 0,
|
|
@@ -1403,14 +1403,14 @@ const ii = {
|
|
|
1403
1403
|
ONE: c.ROTATE,
|
|
1404
1404
|
TWO: c.DOLLY_PAN
|
|
1405
1405
|
}
|
|
1406
|
-
},
|
|
1406
|
+
}, m = class m extends YA {
|
|
1407
1407
|
constructor(A, i, g) {
|
|
1408
1408
|
super();
|
|
1409
1409
|
// public API
|
|
1410
1410
|
e(this, "object");
|
|
1411
1411
|
e(this, "domElements");
|
|
1412
1412
|
e(this, "enabled", !0);
|
|
1413
|
-
e(this, "target", new
|
|
1413
|
+
e(this, "target", new a());
|
|
1414
1414
|
e(this, "minDistance", 0);
|
|
1415
1415
|
e(this, "maxDistance", 1 / 0);
|
|
1416
1416
|
e(this, "minZoom", 0);
|
|
@@ -1457,34 +1457,34 @@ const ii = {
|
|
|
1457
1457
|
e(this, "spherical", new Z());
|
|
1458
1458
|
e(this, "sphericalDelta", new Z());
|
|
1459
1459
|
e(this, "scale", 1);
|
|
1460
|
-
e(this, "panOffset", new
|
|
1460
|
+
e(this, "panOffset", new a());
|
|
1461
1461
|
e(this, "zoomChanged", !1);
|
|
1462
|
-
e(this, "rotateStart", new
|
|
1463
|
-
e(this, "rotateEnd", new
|
|
1464
|
-
e(this, "rotateDelta", new
|
|
1465
|
-
e(this, "panStart", new
|
|
1466
|
-
e(this, "panEnd", new
|
|
1467
|
-
e(this, "panDelta", new
|
|
1468
|
-
e(this, "dollyStart", new
|
|
1469
|
-
e(this, "dollyEnd", new
|
|
1470
|
-
e(this, "dollyDelta", new
|
|
1462
|
+
e(this, "rotateStart", new r());
|
|
1463
|
+
e(this, "rotateEnd", new r());
|
|
1464
|
+
e(this, "rotateDelta", new r());
|
|
1465
|
+
e(this, "panStart", new r());
|
|
1466
|
+
e(this, "panEnd", new r());
|
|
1467
|
+
e(this, "panDelta", new r());
|
|
1468
|
+
e(this, "dollyStart", new r());
|
|
1469
|
+
e(this, "dollyEnd", new r());
|
|
1470
|
+
e(this, "dollyDelta", new r());
|
|
1471
1471
|
e(this, "pointers", []);
|
|
1472
1472
|
e(this, "pointerPositions", {});
|
|
1473
1473
|
// for update() function
|
|
1474
|
-
e(this, "offset", new
|
|
1474
|
+
e(this, "offset", new a());
|
|
1475
1475
|
e(this, "quat");
|
|
1476
1476
|
e(this, "quatInverse");
|
|
1477
|
-
e(this, "lastPosition", new
|
|
1477
|
+
e(this, "lastPosition", new a());
|
|
1478
1478
|
e(this, "lastQuaternion", new E());
|
|
1479
|
-
e(this, "lastTarget", new
|
|
1479
|
+
e(this, "lastTarget", new a());
|
|
1480
1480
|
e(this, "panLeft", (() => {
|
|
1481
|
-
const A = new
|
|
1481
|
+
const A = new a();
|
|
1482
1482
|
return (i, g) => {
|
|
1483
1483
|
A.setFromMatrixColumn(g, 0), A.multiplyScalar(-i), this.panOffset.add(A);
|
|
1484
1484
|
};
|
|
1485
1485
|
})());
|
|
1486
1486
|
e(this, "panUp", (() => {
|
|
1487
|
-
const A = new
|
|
1487
|
+
const A = new a();
|
|
1488
1488
|
return (i, g) => {
|
|
1489
1489
|
this.screenSpacePanning === !0 ? A.setFromMatrixColumn(g, 1) : (A.setFromMatrixColumn(g, 0), A.crossVectors(this.object.up, A)), A.multiplyScalar(i), this.panOffset.add(A);
|
|
1490
1490
|
};
|
|
@@ -1642,7 +1642,7 @@ const ii = {
|
|
|
1642
1642
|
});
|
|
1643
1643
|
this.object = A, this.domElements = Array.isArray(i) ? i : [i], Object.assign(this, g), this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this.quat = new E().setFromUnitVectors(
|
|
1644
1644
|
A.up,
|
|
1645
|
-
new
|
|
1645
|
+
new a(0, 1, 0)
|
|
1646
1646
|
), this.quatInverse = this.quat.clone().invert(), this.domElements.forEach((s) => this.addEventListeners(s)), this.update();
|
|
1647
1647
|
}
|
|
1648
1648
|
get domElement() {
|
|
@@ -1698,9 +1698,9 @@ const ii = {
|
|
|
1698
1698
|
this.removeDomElements(...this.domElements), this.domElements = [], this.addDomElements(...A);
|
|
1699
1699
|
}
|
|
1700
1700
|
computeEncompassingView(A, i = 0) {
|
|
1701
|
-
const g = A.center,
|
|
1701
|
+
const g = A.center, n = A.sphere.radius, f = this.object.fov * (Math.PI / 180), h = this.object.aspect, z = f / 2, L = Math.atan(Math.tan(z) * h), D = n / Math.sin(z), v = n / Math.sin(L), p = Math.max(D, v) * (1 + i), F = this.object.position.clone().sub(this.target).normalize(), iA = F.length() > 1e-3 ? F : new a(0, 0, 1);
|
|
1702
1702
|
return {
|
|
1703
|
-
position: g.clone().add(
|
|
1703
|
+
position: g.clone().add(iA.multiplyScalar(p)),
|
|
1704
1704
|
target: g
|
|
1705
1705
|
};
|
|
1706
1706
|
}
|
|
@@ -1709,11 +1709,11 @@ const ii = {
|
|
|
1709
1709
|
this.object.position.copy(s.position), this.target.copy(s.target), this.update();
|
|
1710
1710
|
}
|
|
1711
1711
|
zoomIn(A) {
|
|
1712
|
-
this.dollyIn(Math.pow(0.95, A ??
|
|
1712
|
+
this.dollyIn(Math.pow(0.95, A ?? m.DEFAULT_ZOOM_FACTOR)), this.update();
|
|
1713
1713
|
}
|
|
1714
1714
|
zoomOut(A) {
|
|
1715
1715
|
this.dollyOut(
|
|
1716
|
-
Math.pow(0.95, A ??
|
|
1716
|
+
Math.pow(0.95, A ?? m.DEFAULT_ZOOM_FACTOR)
|
|
1717
1717
|
), this.update();
|
|
1718
1718
|
}
|
|
1719
1719
|
getState() {
|
|
@@ -1753,10 +1753,10 @@ const ii = {
|
|
|
1753
1753
|
this.sphericalDelta.phi -= A;
|
|
1754
1754
|
}
|
|
1755
1755
|
pan(A, i, g) {
|
|
1756
|
-
const s = new
|
|
1756
|
+
const s = new a();
|
|
1757
1757
|
if ("isPerspectiveCamera" in this.object) {
|
|
1758
|
-
const
|
|
1759
|
-
s.copy(
|
|
1758
|
+
const n = this.object.position;
|
|
1759
|
+
s.copy(n).sub(this.target);
|
|
1760
1760
|
let f = s.length();
|
|
1761
1761
|
f *= Math.tan(
|
|
1762
1762
|
this.object.fov / 2 * Math.PI / 180
|
|
@@ -1852,8 +1852,8 @@ const ii = {
|
|
|
1852
1852
|
}
|
|
1853
1853
|
}
|
|
1854
1854
|
handleTouchStartDolly(A) {
|
|
1855
|
-
const i = this.getSecondPointer(A), g = A.pageX - i.pageX, s = A.pageY - i.pageY,
|
|
1856
|
-
this.dollyStart.set(0,
|
|
1855
|
+
const i = this.getSecondPointer(A), g = A.pageX - i.pageX, s = A.pageY - i.pageY, n = Math.sqrt(g * g + s * s);
|
|
1856
|
+
this.dollyStart.set(0, n);
|
|
1857
1857
|
}
|
|
1858
1858
|
handleTouchStartDollyPan(A) {
|
|
1859
1859
|
this.enableZoom && this.handleTouchStartDolly(A), this.enablePan && this.handleTouchStartPan(A);
|
|
@@ -1865,8 +1865,8 @@ const ii = {
|
|
|
1865
1865
|
if (this.pointers.length === 1)
|
|
1866
1866
|
this.rotateEnd.set(A.pageX, A.pageY);
|
|
1867
1867
|
else {
|
|
1868
|
-
const g = this.getSecondPointer(A), s = 0.5 * (A.pageX + g.pageX),
|
|
1869
|
-
this.rotateEnd.set(s,
|
|
1868
|
+
const g = this.getSecondPointer(A), s = 0.5 * (A.pageX + g.pageX), n = 0.5 * (A.pageY + g.pageY);
|
|
1869
|
+
this.rotateEnd.set(s, n);
|
|
1870
1870
|
}
|
|
1871
1871
|
const i = A.currentTarget;
|
|
1872
1872
|
this.rotateDelta.subVectors(this.rotateEnd, this.rotateStart).multiplyScalar(this.rotateSpeed), this.rotateLeft(
|
|
@@ -1879,15 +1879,15 @@ const ii = {
|
|
|
1879
1879
|
if (this.pointers.length === 1)
|
|
1880
1880
|
this.panEnd.set(A.pageX, A.pageY);
|
|
1881
1881
|
else {
|
|
1882
|
-
const g = this.getSecondPointer(A), s = 0.5 * (A.pageX + g.pageX),
|
|
1883
|
-
this.panEnd.set(s,
|
|
1882
|
+
const g = this.getSecondPointer(A), s = 0.5 * (A.pageX + g.pageX), n = 0.5 * (A.pageY + g.pageY);
|
|
1883
|
+
this.panEnd.set(s, n);
|
|
1884
1884
|
}
|
|
1885
1885
|
const i = A.currentTarget;
|
|
1886
1886
|
this.panDelta.subVectors(this.panEnd, this.panStart).multiplyScalar(this.panSpeed), this.pan(this.panDelta.x, this.panDelta.y, i), this.panStart.copy(this.panEnd);
|
|
1887
1887
|
}
|
|
1888
1888
|
handleTouchMoveDolly(A) {
|
|
1889
|
-
const i = this.getSecondPointer(A), g = A.pageX - i.pageX, s = A.pageY - i.pageY,
|
|
1890
|
-
this.dollyEnd.set(0,
|
|
1889
|
+
const i = this.getSecondPointer(A), g = A.pageX - i.pageX, s = A.pageY - i.pageY, n = Math.sqrt(g * g + s * s);
|
|
1890
|
+
this.dollyEnd.set(0, n), this.dollyDelta.set(
|
|
1891
1891
|
0,
|
|
1892
1892
|
Math.pow(this.dollyEnd.y / this.dollyStart.y, this.zoomSpeed)
|
|
1893
1893
|
), this.dollyOut(this.dollyDelta.y), this.dollyStart.copy(this.dollyEnd);
|
|
@@ -1911,7 +1911,7 @@ const ii = {
|
|
|
1911
1911
|
}
|
|
1912
1912
|
trackPointer(A) {
|
|
1913
1913
|
let i = this.pointerPositions[A.pointerId];
|
|
1914
|
-
i === void 0 && (i = new
|
|
1914
|
+
i === void 0 && (i = new r(), this.pointerPositions[A.pointerId] = i), i.set(A.pageX, A.pageY);
|
|
1915
1915
|
}
|
|
1916
1916
|
getSecondPointer(A) {
|
|
1917
1917
|
return this.pointers[0].pointerId === A.pointerId ? this.pointers[1] : this.pointers[0];
|
|
@@ -1922,9 +1922,9 @@ const ii = {
|
|
|
1922
1922
|
);
|
|
1923
1923
|
}
|
|
1924
1924
|
};
|
|
1925
|
-
e(
|
|
1926
|
-
let W =
|
|
1927
|
-
const
|
|
1925
|
+
e(m, "DEFAULT_ZOOM_FACTOR", 1);
|
|
1926
|
+
let W = m;
|
|
1927
|
+
const ti = `
|
|
1928
1928
|
@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@
|
|
1929
1929
|
@@@@+-:::::::---------------------==------------------------------=#@@@@
|
|
1930
1930
|
@@%=::::.......::---------------------------------------------------------+@@
|
|
@@ -1959,15 +1959,15 @@ window.DIVE = {
|
|
|
1959
1959
|
return window.DIVE.instances[0];
|
|
1960
1960
|
}
|
|
1961
1961
|
};
|
|
1962
|
-
const
|
|
1962
|
+
const l = {
|
|
1963
1963
|
autoStart: !0,
|
|
1964
1964
|
displayAxes: !1,
|
|
1965
1965
|
...$,
|
|
1966
|
-
...
|
|
1966
|
+
...MA,
|
|
1967
1967
|
...V,
|
|
1968
|
-
...
|
|
1968
|
+
...ei
|
|
1969
1969
|
};
|
|
1970
|
-
class
|
|
1970
|
+
class ri {
|
|
1971
1971
|
constructor(t) {
|
|
1972
1972
|
// descriptive members
|
|
1973
1973
|
e(this, "_instanceId", b.generateUUID());
|
|
@@ -1979,16 +1979,16 @@ class ai {
|
|
|
1979
1979
|
e(this, "_clock");
|
|
1980
1980
|
e(this, "_orientationDisplay", null);
|
|
1981
1981
|
this._settings = {
|
|
1982
|
-
...
|
|
1982
|
+
...l,
|
|
1983
1983
|
...t ?? {}
|
|
1984
|
-
}, this._clock = new
|
|
1985
|
-
backgroundColor: (t == null ? void 0 : t.backgroundColor) ??
|
|
1986
|
-
displayGrid: (t == null ? void 0 : t.displayGrid) ??
|
|
1987
|
-
displayFloor: (t == null ? void 0 : t.displayFloor) ??
|
|
1984
|
+
}, this._clock = new XA(), this._scene = new ii({
|
|
1985
|
+
backgroundColor: (t == null ? void 0 : t.backgroundColor) ?? l.backgroundColor,
|
|
1986
|
+
displayGrid: (t == null ? void 0 : t.displayGrid) ?? l.displayGrid,
|
|
1987
|
+
displayFloor: (t == null ? void 0 : t.displayFloor) ?? l.displayFloor
|
|
1988
1988
|
});
|
|
1989
|
-
const A = new
|
|
1989
|
+
const A = new NA(
|
|
1990
1990
|
this._scene,
|
|
1991
|
-
new
|
|
1991
|
+
new LA(),
|
|
1992
1992
|
this._settings
|
|
1993
1993
|
);
|
|
1994
1994
|
this._clock.addTicker(A), this._views = [A], this._mainView = A, this._settings.displayAxes && import("../plugins/orientationdisplay/index.mjs").then(
|
|
@@ -2000,8 +2000,8 @@ class ai {
|
|
|
2000
2000
|
), this._clock.addTicker(this._orientationDisplay));
|
|
2001
2001
|
}
|
|
2002
2002
|
), console.log(
|
|
2003
|
-
"DIVE 3.0.
|
|
2004
|
-
), console.log(
|
|
2003
|
+
"DIVE 3.0.9 initialized successfully!"
|
|
2004
|
+
), console.log(ti), window.DIVE.instances.push(this), this._settings.autoStart && this.start();
|
|
2005
2005
|
}
|
|
2006
2006
|
get views() {
|
|
2007
2007
|
return this._views;
|
|
@@ -2044,68 +2044,98 @@ class ai {
|
|
|
2044
2044
|
});
|
|
2045
2045
|
}
|
|
2046
2046
|
}
|
|
2047
|
-
const
|
|
2047
|
+
const AA = {
|
|
2048
2048
|
glb: {
|
|
2049
2049
|
key: "glb",
|
|
2050
|
+
mimeTypes: ["model/gltf-binary"],
|
|
2050
2051
|
extension: "glb"
|
|
2051
2052
|
},
|
|
2052
2053
|
gltf: {
|
|
2053
2054
|
key: "gltf",
|
|
2055
|
+
mimeTypes: ["model/gltf+json"],
|
|
2054
2056
|
extension: "gltf"
|
|
2055
2057
|
},
|
|
2056
2058
|
usdz: {
|
|
2057
2059
|
key: "usdz",
|
|
2060
|
+
mimeTypes: ["model/vnd.usdz+zip"],
|
|
2058
2061
|
extension: "usdz"
|
|
2059
2062
|
},
|
|
2060
2063
|
step: {
|
|
2061
2064
|
key: "step",
|
|
2065
|
+
mimeTypes: [
|
|
2066
|
+
"application/step",
|
|
2067
|
+
"model/step",
|
|
2068
|
+
"model/step+zip",
|
|
2069
|
+
"model/step+xml"
|
|
2070
|
+
],
|
|
2062
2071
|
extension: "step"
|
|
2063
2072
|
},
|
|
2064
2073
|
stp: {
|
|
2065
2074
|
key: "stp",
|
|
2075
|
+
mimeTypes: [
|
|
2076
|
+
"application/step",
|
|
2077
|
+
"model/step",
|
|
2078
|
+
"model/step+zip",
|
|
2079
|
+
"model/step+xml"
|
|
2080
|
+
],
|
|
2066
2081
|
extension: "stp"
|
|
2067
2082
|
},
|
|
2068
2083
|
iges: {
|
|
2069
2084
|
key: "iges",
|
|
2085
|
+
mimeTypes: [
|
|
2086
|
+
"application/iges",
|
|
2087
|
+
"model/iges",
|
|
2088
|
+
"model/iges+zip",
|
|
2089
|
+
"model/iges+xml"
|
|
2090
|
+
],
|
|
2070
2091
|
extension: "iges"
|
|
2071
2092
|
},
|
|
2072
2093
|
igs: {
|
|
2073
2094
|
key: "igs",
|
|
2095
|
+
mimeTypes: [
|
|
2096
|
+
"application/iges",
|
|
2097
|
+
"model/iges",
|
|
2098
|
+
"model/iges+zip",
|
|
2099
|
+
"model/iges+xml"
|
|
2100
|
+
],
|
|
2074
2101
|
extension: "igs"
|
|
2075
2102
|
}
|
|
2076
|
-
}, Bi = Object.values(
|
|
2077
|
-
(
|
|
2103
|
+
}, Bi = Object.values(AA).map(
|
|
2104
|
+
(o) => o.extension
|
|
2105
|
+
), ci = Object.values(AA).flatMap(
|
|
2106
|
+
(o) => o.mimeTypes
|
|
2078
2107
|
);
|
|
2079
2108
|
export {
|
|
2080
2109
|
q as B,
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2110
|
+
l as D,
|
|
2111
|
+
AA as F,
|
|
2112
|
+
UA as G,
|
|
2084
2113
|
W as O,
|
|
2085
2114
|
Bi as S,
|
|
2086
|
-
|
|
2087
|
-
|
|
2115
|
+
ei as a,
|
|
2116
|
+
ri as b,
|
|
2088
2117
|
U as c,
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2118
|
+
ci as d,
|
|
2119
|
+
O as e,
|
|
2120
|
+
kA as f,
|
|
2121
|
+
WA as g,
|
|
2122
|
+
XA as h,
|
|
2123
|
+
QA as i,
|
|
2124
|
+
ZA as j,
|
|
2125
|
+
jA as k,
|
|
2126
|
+
_A as l,
|
|
2127
|
+
Q as m,
|
|
2128
|
+
SA as n,
|
|
2129
|
+
M as o,
|
|
2130
|
+
xA as p,
|
|
2131
|
+
TA as q,
|
|
2132
|
+
EA as r,
|
|
2133
|
+
V as s,
|
|
2134
|
+
VA as t,
|
|
2135
|
+
ii as u,
|
|
2136
|
+
$ as v,
|
|
2137
|
+
JA as w,
|
|
2138
|
+
NA as x,
|
|
2139
|
+
RA as y,
|
|
2140
|
+
R as z
|
|
2111
2141
|
};
|