viral-viewer-2 6.9.5 → 6.9.6
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.
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
var Nb = Object.defineProperty;
|
|
2
2
|
var Bb = (s, e, t) => e in s ? Nb(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
|
|
3
3
|
var ym = (s, e, t) => (Bb(s, typeof e != "symbol" ? e + "" : e, t), t);
|
|
4
|
-
class
|
|
4
|
+
class XR {
|
|
5
5
|
constructor() {
|
|
6
6
|
this.MaterialIndex = 0, this.Vertices = [], this.Indices = [], this.Name = "", this.Instances = [];
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
|
-
class
|
|
9
|
+
class HR {
|
|
10
10
|
constructor() {
|
|
11
11
|
this.MaterialIndex = 0, this.Elements = [];
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
-
class
|
|
14
|
+
class YR {
|
|
15
15
|
constructor() {
|
|
16
16
|
this.Vertices = [], this.Indices = [], this.Instances = [], this.Id = "";
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
-
class
|
|
19
|
+
class GR {
|
|
20
20
|
constructor() {
|
|
21
21
|
this.Vertices = [], this.Indices = [], this.Transform = null;
|
|
22
22
|
}
|
|
@@ -86,12 +86,12 @@ let Nv = class {
|
|
|
86
86
|
this.min = new fs(), this.max = new fs();
|
|
87
87
|
}
|
|
88
88
|
};
|
|
89
|
-
class
|
|
89
|
+
class qR {
|
|
90
90
|
constructor() {
|
|
91
91
|
this.Data = {}, this.CameraData = new Sp(), this.Translation = [];
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
|
-
class
|
|
94
|
+
class $R {
|
|
95
95
|
constructor() {
|
|
96
96
|
this.Data = {};
|
|
97
97
|
}
|
|
@@ -1895,7 +1895,7 @@ var hw = sc, dw = Ip, uw = cw, fw = Ip, pw = ic, mw = {
|
|
|
1895
1895
|
ungzip: fw,
|
|
1896
1896
|
constants: pw
|
|
1897
1897
|
};
|
|
1898
|
-
const { Inflate: gw, inflate: vw, inflateRaw:
|
|
1898
|
+
const { Inflate: gw, inflate: vw, inflateRaw: KR, ungzip: JR } = mw;
|
|
1899
1899
|
var xw = gw, bw = vw;
|
|
1900
1900
|
class yw {
|
|
1901
1901
|
pakoUnzip(e) {
|
|
@@ -35421,7 +35421,7 @@ class At {
|
|
|
35421
35421
|
return new Q(n, e.material);
|
|
35422
35422
|
}
|
|
35423
35423
|
}
|
|
35424
|
-
class
|
|
35424
|
+
class nD extends _o {
|
|
35425
35425
|
/**
|
|
35426
35426
|
*
|
|
35427
35427
|
* @param geometry geometry for instanced mesh
|
|
@@ -42450,7 +42450,7 @@ class Jn extends Q {
|
|
|
42450
42450
|
*/
|
|
42451
42451
|
async createSimplifiedLODs(e) {
|
|
42452
42452
|
var n, r;
|
|
42453
|
-
const { simplifyBufferElementsBatch: t } = await import("./batched-mesh-simplifier-
|
|
42453
|
+
const { simplifyBufferElementsBatch: t } = await import("./batched-mesh-simplifier-DitwxCT2.mjs"), i = [this];
|
|
42454
42454
|
console.log(`🔨 Creating ${e.length} LOD levels for batched mesh...`);
|
|
42455
42455
|
for (let a = 0; a < e.length; a++) {
|
|
42456
42456
|
const o = e[a];
|
|
@@ -42492,7 +42492,7 @@ class Jn extends Q {
|
|
|
42492
42492
|
* ```
|
|
42493
42493
|
*/
|
|
42494
42494
|
async createSimplifiedLODFast(e) {
|
|
42495
|
-
const { simplifyBatchedMeshFast: t } = await import("./batched-mesh-simplifier-
|
|
42495
|
+
const { simplifyBatchedMeshFast: t } = await import("./batched-mesh-simplifier-DitwxCT2.mjs");
|
|
42496
42496
|
return t(this, e);
|
|
42497
42497
|
}
|
|
42498
42498
|
/**
|
|
@@ -46169,7 +46169,52 @@ class i3 {
|
|
|
46169
46169
|
});
|
|
46170
46170
|
}
|
|
46171
46171
|
}
|
|
46172
|
-
|
|
46172
|
+
function n3() {
|
|
46173
|
+
const s = new bd({
|
|
46174
|
+
side: li
|
|
46175
|
+
});
|
|
46176
|
+
return s.onBeforeCompile = (e) => {
|
|
46177
|
+
e.vertexShader = `attribute vec4 color;
|
|
46178
|
+
varying float vAlpha;
|
|
46179
|
+
` + e.vertexShader, e.vertexShader = e.vertexShader.replace(
|
|
46180
|
+
"#include <project_vertex>",
|
|
46181
|
+
`
|
|
46182
|
+
vAlpha = color.a;
|
|
46183
|
+
#include <project_vertex>
|
|
46184
|
+
`
|
|
46185
|
+
), e.fragmentShader = `varying float vAlpha;
|
|
46186
|
+
` + e.fragmentShader, e.fragmentShader = e.fragmentShader.replace(
|
|
46187
|
+
"void main() {",
|
|
46188
|
+
`void main() {
|
|
46189
|
+
if (vAlpha < 0.01) discard;
|
|
46190
|
+
`
|
|
46191
|
+
);
|
|
46192
|
+
}, s;
|
|
46193
|
+
}
|
|
46194
|
+
function s3() {
|
|
46195
|
+
const s = new Ci({
|
|
46196
|
+
colorWrite: !1,
|
|
46197
|
+
side: li
|
|
46198
|
+
});
|
|
46199
|
+
return s.onBeforeCompile = (e) => {
|
|
46200
|
+
e.vertexShader = `attribute vec4 color;
|
|
46201
|
+
varying float vAlpha;
|
|
46202
|
+
` + e.vertexShader, e.vertexShader = e.vertexShader.replace(
|
|
46203
|
+
"#include <project_vertex>",
|
|
46204
|
+
`
|
|
46205
|
+
vAlpha = color.a;
|
|
46206
|
+
#include <project_vertex>
|
|
46207
|
+
`
|
|
46208
|
+
), e.fragmentShader = `varying float vAlpha;
|
|
46209
|
+
` + e.fragmentShader, e.fragmentShader = e.fragmentShader.replace(
|
|
46210
|
+
"void main() {",
|
|
46211
|
+
`void main() {
|
|
46212
|
+
if (vAlpha < 0.01) discard;
|
|
46213
|
+
`
|
|
46214
|
+
);
|
|
46215
|
+
}, s;
|
|
46216
|
+
}
|
|
46217
|
+
const r3 = {
|
|
46173
46218
|
edgeColor: new Ce(0),
|
|
46174
46219
|
edgeOpacity: 0.6,
|
|
46175
46220
|
// Reduced for subtlety, better perf
|
|
@@ -46177,24 +46222,24 @@ const n3 = {
|
|
|
46177
46222
|
// 1px is cheapest
|
|
46178
46223
|
depthMultiplier: 1.5,
|
|
46179
46224
|
// Boost depth detection (cheap)
|
|
46180
|
-
normalMultiplier:
|
|
46181
|
-
//
|
|
46182
|
-
normalBias: 0.
|
|
46183
|
-
//
|
|
46225
|
+
normalMultiplier: 1,
|
|
46226
|
+
// 🔧 Increased for better normal edge visibility
|
|
46227
|
+
normalBias: 0.05,
|
|
46228
|
+
// 🔧 Lower = more sensitive to normal changes
|
|
46184
46229
|
enableDepthEdges: !0,
|
|
46185
46230
|
// Keep - cheapest, best silhouettes
|
|
46186
46231
|
enableNormalEdges: !0,
|
|
46187
46232
|
// Keep - good for creases
|
|
46188
46233
|
enableObjectIdEdges: !1
|
|
46189
46234
|
// Disable by default - most expensive (extra render pass)
|
|
46190
|
-
},
|
|
46235
|
+
}, a3 = `
|
|
46191
46236
|
varying vec2 vUv;
|
|
46192
46237
|
|
|
46193
46238
|
void main() {
|
|
46194
46239
|
vUv = uv;
|
|
46195
46240
|
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
|
|
46196
46241
|
}
|
|
46197
|
-
`,
|
|
46242
|
+
`, o3 = `
|
|
46198
46243
|
precision highp float;
|
|
46199
46244
|
|
|
46200
46245
|
uniform sampler2D tDiffuse; // Color buffer
|
|
@@ -46347,7 +46392,7 @@ void main() {
|
|
|
46347
46392
|
|
|
46348
46393
|
gl_FragColor = vec4(finalColor, color.a);
|
|
46349
46394
|
}
|
|
46350
|
-
`,
|
|
46395
|
+
`, l3 = `
|
|
46351
46396
|
attribute float objectIndex;
|
|
46352
46397
|
varying float vObjectIndex;
|
|
46353
46398
|
|
|
@@ -46355,7 +46400,7 @@ void main() {
|
|
|
46355
46400
|
vObjectIndex = objectIndex;
|
|
46356
46401
|
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
|
|
46357
46402
|
}
|
|
46358
|
-
`,
|
|
46403
|
+
`, c3 = `
|
|
46359
46404
|
precision highp float;
|
|
46360
46405
|
varying float vObjectIndex;
|
|
46361
46406
|
|
|
@@ -46371,9 +46416,9 @@ void main() {
|
|
|
46371
46416
|
gl_FragColor = vec4(packIndex(vObjectIndex), 1.0);
|
|
46372
46417
|
}
|
|
46373
46418
|
`;
|
|
46374
|
-
class
|
|
46419
|
+
class h3 extends Un {
|
|
46375
46420
|
constructor(e, t, i, n) {
|
|
46376
|
-
super(), this.scene = e, this.camera = t, this.resolution = i || new K(window.innerWidth, window.innerHeight), this.options = { ...
|
|
46421
|
+
super(), this.scene = e, this.camera = t, this.resolution = i || new K(window.innerWidth, window.innerHeight), this.options = { ...r3, ...n };
|
|
46377
46422
|
const r = {
|
|
46378
46423
|
format: ii,
|
|
46379
46424
|
type: Qt,
|
|
@@ -46399,14 +46444,9 @@ class l3 extends Un {
|
|
|
46399
46444
|
this.resolution.x,
|
|
46400
46445
|
this.resolution.y,
|
|
46401
46446
|
r
|
|
46402
|
-
), this.normalMaterial = new
|
|
46403
|
-
|
|
46404
|
-
|
|
46405
|
-
colorWrite: !1,
|
|
46406
|
-
side: li
|
|
46407
|
-
}), this.objectIdMaterial = new gt({
|
|
46408
|
-
vertexShader: a3,
|
|
46409
|
-
fragmentShader: o3,
|
|
46447
|
+
), this.normalMaterial = n3(), this.depthMaterial = s3(), this.objectIdMaterial = new gt({
|
|
46448
|
+
vertexShader: l3,
|
|
46449
|
+
fragmentShader: c3,
|
|
46410
46450
|
side: li
|
|
46411
46451
|
}), this.edgeMaterial = new gt({
|
|
46412
46452
|
uniforms: {
|
|
@@ -46427,8 +46467,8 @@ class l3 extends Un {
|
|
|
46427
46467
|
enableNormalEdges: { value: this.options.enableNormalEdges },
|
|
46428
46468
|
enableObjectIdEdges: { value: this.options.enableObjectIdEdges }
|
|
46429
46469
|
},
|
|
46430
|
-
vertexShader:
|
|
46431
|
-
fragmentShader:
|
|
46470
|
+
vertexShader: a3,
|
|
46471
|
+
fragmentShader: o3
|
|
46432
46472
|
}), this.fsQuad = new Mr(this.edgeMaterial);
|
|
46433
46473
|
}
|
|
46434
46474
|
/**
|
|
@@ -46467,7 +46507,7 @@ class l3 extends Un {
|
|
|
46467
46507
|
}
|
|
46468
46508
|
}
|
|
46469
46509
|
new K(1024, 1024), new Ce(0);
|
|
46470
|
-
class
|
|
46510
|
+
class d3 {
|
|
46471
46511
|
constructor(e, t) {
|
|
46472
46512
|
this.renderer = e, this.viralViewerApi = t, this.gammaPass = null, this.ssaoPass = null, this.saoPass = null, this.smaaPass = null, this.ssaaPass = null, this.fxaaPass = null, this.taaPass = null, this.sobelPass = null, this.whitePass = null, this.shadowRemovalPass = null, this.outlinePass = null, this.screenSpaceEdgesPass = null, this.perfChecker = new i3(), this._whiteShader = {
|
|
46473
46513
|
uniforms: {
|
|
@@ -46600,7 +46640,7 @@ class c3 {
|
|
|
46600
46640
|
* - Object ID discontinuity detection (object boundaries)
|
|
46601
46641
|
*/
|
|
46602
46642
|
initScreenSpaceEdgesPass(e, t) {
|
|
46603
|
-
this.screenSpaceEdgesPass = new
|
|
46643
|
+
this.screenSpaceEdgesPass = new h3(
|
|
46604
46644
|
e,
|
|
46605
46645
|
t,
|
|
46606
46646
|
new K(window.innerWidth, window.innerHeight),
|
|
@@ -46709,7 +46749,7 @@ class c3 {
|
|
|
46709
46749
|
}
|
|
46710
46750
|
//#endregion
|
|
46711
46751
|
}
|
|
46712
|
-
class
|
|
46752
|
+
class u3 {
|
|
46713
46753
|
constructor(e) {
|
|
46714
46754
|
this.viralViewerApi = e, this.renderer = new bb({
|
|
46715
46755
|
alpha: !0,
|
|
@@ -46725,7 +46765,7 @@ class h3 {
|
|
|
46725
46765
|
console.log("Max Fragment Uniform Vectors ->", i), this.renderer.setPixelRatio(window.devicePixelRatio), this.renderer.setSize(
|
|
46726
46766
|
this.viralViewerApi.targetElement.offsetWidth,
|
|
46727
46767
|
this.viralViewerApi.targetElement.offsetHeight
|
|
46728
|
-
), this.renderer.outputColorSpace = Ei, this.renderer.shadowMap.enabled = !0, this.renderer.shadowMap.type = ds, this.renderer.shadowMap.autoUpdate = !1, this.renderer.shadowMap.needsUpdate = !0, this.renderer.info.autoReset = !1, this.viralViewerApi.targetElement.appendChild(this.renderer.domElement), this.viralViewerApi.options.enablePostProcessing !== !1 && (this.postProcessingRenderer = new
|
|
46768
|
+
), this.renderer.outputColorSpace = Ei, this.renderer.shadowMap.enabled = !0, this.renderer.shadowMap.type = ds, this.renderer.shadowMap.autoUpdate = !1, this.renderer.shadowMap.needsUpdate = !0, this.renderer.info.autoReset = !1, this.viralViewerApi.targetElement.appendChild(this.renderer.domElement), this.viralViewerApi.options.enablePostProcessing !== !1 && (this.postProcessingRenderer = new d3(
|
|
46729
46769
|
this.renderer,
|
|
46730
46770
|
this.viralViewerApi
|
|
46731
46771
|
)), this.jitterOffsets = this.generateJitterOffsets(), this.viralViewerApi.emit(Ct.LOADED_RENDERER);
|
|
@@ -46887,7 +46927,7 @@ class h3 {
|
|
|
46887
46927
|
}
|
|
46888
46928
|
//#endregion
|
|
46889
46929
|
}
|
|
46890
|
-
class
|
|
46930
|
+
class f3 {
|
|
46891
46931
|
// 5 seconds for cleanup
|
|
46892
46932
|
constructor(e) {
|
|
46893
46933
|
this.viralViewerApi = e, this.clock = new ub(), this.lastSpatialUpdateTime = 0, this.lastCleanupTime = 0, this.spatialUpdateInterval = 16, this.cleanupInterval = 5e3, this.isRainEnabled = !1;
|
|
@@ -47003,7 +47043,7 @@ class d3 {
|
|
|
47003
47043
|
}
|
|
47004
47044
|
//#endregion
|
|
47005
47045
|
}
|
|
47006
|
-
class
|
|
47046
|
+
class p3 {
|
|
47007
47047
|
set(e, t) {
|
|
47008
47048
|
localStorage[e] = t;
|
|
47009
47049
|
}
|
|
@@ -47048,7 +47088,7 @@ class u3 {
|
|
|
47048
47088
|
localStorage.clear();
|
|
47049
47089
|
}
|
|
47050
47090
|
}
|
|
47051
|
-
class
|
|
47091
|
+
class m3 {
|
|
47052
47092
|
constructor(e) {
|
|
47053
47093
|
this.viralViewerApi = e, this.keydownQueuedEvents = [], this.keyupQueuedEvents = [], this.setupKeyPress();
|
|
47054
47094
|
}
|
|
@@ -47096,7 +47136,7 @@ class f3 {
|
|
|
47096
47136
|
}
|
|
47097
47137
|
//#endregion
|
|
47098
47138
|
}
|
|
47099
|
-
class
|
|
47139
|
+
class g3 {
|
|
47100
47140
|
constructor(e) {
|
|
47101
47141
|
this.viralViewerApi = e, this.contextMenu = null, this.contextItems = [], this.injectContextMenu();
|
|
47102
47142
|
}
|
|
@@ -47153,7 +47193,7 @@ const al = {
|
|
|
47153
47193
|
focus: (s, e) => `<svg xmlns="http://www.w3.org/2000/svg" fill=${e || ""} height=${s || 24} viewBox="0 -960 960 960" width="24"><path d="M120-120v-200h80v120h120v80H120Zm520 0v-80h120v-120h80v200H640ZM120-640v-200h200v80H200v120h-80Zm640 0v-120H640v-80h200v200h-80Z"/></svg>`,
|
|
47154
47194
|
properties: (s, e) => `<svg xmlns="http://www.w3.org/2000/svg" fill=${e || ""} height=${s || 24} viewBox="0 -960 960 960" width="24"><path d="M440-280h80v-240h-80v240Zm40-320q17 0 28.5-11.5T520-640q0-17-11.5-28.5T480-680q-17 0-28.5 11.5T440-640q0 17 11.5 28.5T480-600Zm0 520q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"/></svg>`
|
|
47155
47195
|
};
|
|
47156
|
-
class
|
|
47196
|
+
class v3 {
|
|
47157
47197
|
constructor(e) {
|
|
47158
47198
|
this.viralViewerApi = e, this.elementProperties = {}, this.sleepTimer = null, this.resizeObserver = new ResizeObserver(this.handleResize), this._hoverElementEnable = !0, this._selectElementEnable = !0, this.isShiftPressed = !1, this.windowHandler(), this.contextMenuEventHandler(), this.selectElementHandler2(), this.doubleClickElementHandler(), this.keyboardHandler(), this.cameraHandler(), this._visibilityManager = this.viralViewerApi.viralVisibilityManager;
|
|
47159
47199
|
}
|
|
@@ -47417,7 +47457,7 @@ class m3 {
|
|
|
47417
47457
|
}
|
|
47418
47458
|
//#endregion
|
|
47419
47459
|
}
|
|
47420
|
-
function
|
|
47460
|
+
function x3() {
|
|
47421
47461
|
class s {
|
|
47422
47462
|
constructor() {
|
|
47423
47463
|
this.elements = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
|
|
@@ -47502,8 +47542,8 @@ function g3() {
|
|
|
47502
47542
|
}), self.postMessage(a);
|
|
47503
47543
|
};
|
|
47504
47544
|
}
|
|
47505
|
-
const
|
|
47506
|
-
class
|
|
47545
|
+
const b3 = x3;
|
|
47546
|
+
class y3 extends Q {
|
|
47507
47547
|
constructor() {
|
|
47508
47548
|
super(), this._viralMeshes = [], this._viralInstancedMeshes = [];
|
|
47509
47549
|
}
|
|
@@ -47544,15 +47584,15 @@ class x3 extends Q {
|
|
|
47544
47584
|
this.geometry = null, this.removeFromParent();
|
|
47545
47585
|
}
|
|
47546
47586
|
}
|
|
47547
|
-
class
|
|
47587
|
+
class _3 {
|
|
47548
47588
|
constructor() {
|
|
47549
|
-
this.modelId = -1, this.elements = [], this.materials = [], this.mapMaterialsToMaterialManager = new Gr(), this.seperateModel = new
|
|
47589
|
+
this.modelId = -1, this.elements = [], this.materials = [], this.mapMaterialsToMaterialManager = new Gr(), this.seperateModel = new y3();
|
|
47550
47590
|
}
|
|
47551
47591
|
dispose() {
|
|
47552
47592
|
this.elements = [], this.materials = [], this.mapMaterialsToMaterialManager = new Gr(), this.seperateModel.dispose();
|
|
47553
47593
|
}
|
|
47554
47594
|
}
|
|
47555
|
-
function
|
|
47595
|
+
function w3() {
|
|
47556
47596
|
class s {
|
|
47557
47597
|
constructor() {
|
|
47558
47598
|
this.elements = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
|
|
@@ -47643,8 +47683,8 @@ function y3() {
|
|
|
47643
47683
|
}), self.postMessage(a);
|
|
47644
47684
|
};
|
|
47645
47685
|
}
|
|
47646
|
-
const
|
|
47647
|
-
class
|
|
47686
|
+
const S3 = w3;
|
|
47687
|
+
class M3 {
|
|
47648
47688
|
constructor() {
|
|
47649
47689
|
this.MIN_VERTEX_INSTANCES_FOR_INSTANCING = 1e3, this.MIN_INSTANCES_FOR_INSTANCING = 3, this.MAX_DRAW_CALLS = 25, this.MIN_INSTANCED_VERTEX_RATIO = 0.6, this.HIGH_VERTEX_THRESHOLD = 500;
|
|
47650
47690
|
}
|
|
@@ -47827,18 +47867,18 @@ class w3 {
|
|
|
47827
47867
|
}
|
|
47828
47868
|
}
|
|
47829
47869
|
}
|
|
47830
|
-
const
|
|
47870
|
+
const A3 = new M3();
|
|
47831
47871
|
class Tb {
|
|
47832
47872
|
// Or 5K objects
|
|
47833
47873
|
//#endregion
|
|
47834
47874
|
constructor(e) {
|
|
47835
47875
|
this.viralViewerApi = e, this.lastRenderTime = 0, this.useSpatialMerging = !1, this.elementBuffer = /* @__PURE__ */ new Map(), this.BATCH_THRESHOLD_VERTICES = 1e5, this.BATCH_THRESHOLD_OBJECTS = 5e3;
|
|
47836
|
-
const t = new Blob([`(${
|
|
47876
|
+
const t = new Blob([`(${b3})()`]), i = URL.createObjectURL(t);
|
|
47837
47877
|
this.workerPool = new wr(
|
|
47838
47878
|
navigator.hardwareConcurrency || this.viralViewerApi.options.numberOfWorker,
|
|
47839
47879
|
i
|
|
47840
47880
|
);
|
|
47841
|
-
const n = new Blob([`(${
|
|
47881
|
+
const n = new Blob([`(${S3})()`]), r = URL.createObjectURL(n);
|
|
47842
47882
|
this.workerPool2 = new wr(
|
|
47843
47883
|
this.viralViewerApi.options.numberOfWorker,
|
|
47844
47884
|
r
|
|
@@ -47851,7 +47891,7 @@ class Tb {
|
|
|
47851
47891
|
*/
|
|
47852
47892
|
initial(e) {
|
|
47853
47893
|
console.log(e);
|
|
47854
|
-
let t = new
|
|
47894
|
+
let t = new _3();
|
|
47855
47895
|
t.modelId = this.viralViewerApi.viralScene.mainModels.length, this.viralViewerApi.viralScene.mainModels.push(t), !this.useSpatialMerging && t.seperateModel && this.viralViewerApi.viralScene.addModel(t.seperateModel);
|
|
47856
47896
|
let i = this.viralViewerApi.viralScene.mainModels.length - 1;
|
|
47857
47897
|
for (let n = 0; n < e.length; n++) {
|
|
@@ -47890,7 +47930,7 @@ class Tb {
|
|
|
47890
47930
|
*/
|
|
47891
47931
|
loadElement(e, t, i = () => {
|
|
47892
47932
|
}, n = null) {
|
|
47893
|
-
const { highDuplicationElements: r, lowDuplicationElements: a } =
|
|
47933
|
+
const { highDuplicationElements: r, lowDuplicationElements: a } = A3.analyze(t), o = a.map((m) => m.element), l = r.map((m) => m.element), c = o.length > 0, h = l.length > 0;
|
|
47894
47934
|
if (!c && !h) {
|
|
47895
47935
|
i();
|
|
47896
47936
|
return;
|
|
@@ -48253,7 +48293,7 @@ class Tb {
|
|
|
48253
48293
|
}
|
|
48254
48294
|
//#endregion
|
|
48255
48295
|
}
|
|
48256
|
-
class
|
|
48296
|
+
class T3 {
|
|
48257
48297
|
constructor(e) {
|
|
48258
48298
|
this.viralViewerApi = e, this.elements = [], this._loadElementPatchWorker = new Tb(e);
|
|
48259
48299
|
}
|
|
@@ -48350,7 +48390,7 @@ class M3 {
|
|
|
48350
48390
|
const i = await (await this.viralViewerApi.viralDataManager.gzipFetch(
|
|
48351
48391
|
e
|
|
48352
48392
|
)).arrayBuffer(), n = new Uint8Array(i);
|
|
48353
|
-
return
|
|
48393
|
+
return VR.parseBuffer(n);
|
|
48354
48394
|
}
|
|
48355
48395
|
async getTracking(e) {
|
|
48356
48396
|
return await (await this.viralViewerApi.viralDataManager.normalFetch(
|
|
@@ -48371,7 +48411,7 @@ class M3 {
|
|
|
48371
48411
|
}
|
|
48372
48412
|
//#endregion
|
|
48373
48413
|
}
|
|
48374
|
-
var
|
|
48414
|
+
var E3 = { 746: (s, e, t) => {
|
|
48375
48415
|
t.d(e, { Z: () => i });
|
|
48376
48416
|
const i = `
|
|
48377
48417
|
precision highp float;
|
|
@@ -49290,7 +49330,7 @@ function En(s) {
|
|
|
49290
49330
|
if (e !== void 0)
|
|
49291
49331
|
return e.exports;
|
|
49292
49332
|
var t = gv[s] = { exports: {} };
|
|
49293
|
-
return
|
|
49333
|
+
return E3[s](t, t.exports, En), t.exports;
|
|
49294
49334
|
}
|
|
49295
49335
|
En.d = (s, e) => {
|
|
49296
49336
|
for (var t in e)
|
|
@@ -50561,9 +50601,9 @@ Ft.XL;
|
|
|
50561
50601
|
Ft.uv;
|
|
50562
50602
|
Ft.vs;
|
|
50563
50603
|
Ft.YJ;
|
|
50564
|
-
var
|
|
50604
|
+
var P3 = Ft.i9;
|
|
50565
50605
|
Ft.uD;
|
|
50566
|
-
var
|
|
50606
|
+
var C3 = Ft.lV, I3 = Ft.Sp, R3 = Ft.RJ;
|
|
50567
50607
|
Ft.SB;
|
|
50568
50608
|
Ft.TL;
|
|
50569
50609
|
Ft.oe;
|
|
@@ -50574,9 +50614,9 @@ Ft.gK;
|
|
|
50574
50614
|
Ft.BT;
|
|
50575
50615
|
Ft.bt;
|
|
50576
50616
|
Ft.sX;
|
|
50577
|
-
class
|
|
50617
|
+
class D3 {
|
|
50578
50618
|
constructor(e) {
|
|
50579
|
-
this.viralViewerApi = e, this.potree = new
|
|
50619
|
+
this.viralViewerApi = e, this.potree = new R3(), this.pointClouds = [];
|
|
50580
50620
|
}
|
|
50581
50621
|
/**
|
|
50582
50622
|
*
|
|
@@ -50591,7 +50631,7 @@ class I3 {
|
|
|
50591
50631
|
this.viralViewerApi.viralRenderer.postProcessingRenderer.disableOutline(), this.potree.pointBudget = n, this.potree.loadPointCloudCustom(e, t, i).then((a) => {
|
|
50592
50632
|
var d;
|
|
50593
50633
|
let o = a.material;
|
|
50594
|
-
o.size = 1, o.pointSizeType =
|
|
50634
|
+
o.size = 1, o.pointSizeType = I3.ADAPTIVE, o.shape = C3.CIRCLE, o.pointColorType = P3.RGB, o.inputColorEncoding = 1, o.outputColorEncoding = 1, console.log(a.boundingBox);
|
|
50595
50635
|
let l = new P(0, -1.5, 3), c = new cn(-Math.PI / 2, 0, 0), h = new P(2, 2, 2);
|
|
50596
50636
|
a.position.copy(l), a.rotation.copy(c), a.scale.copy(h), this.viralViewerApi.viralScene.addModel(a), this.viralViewerApi.viralScene.selectables.push(a), this.pointClouds.push(a), this.viralViewerApi.viralCamera.camera && ((d = this.viralViewerApi.viralCamera.cameraControls) == null || d.fitToBox(
|
|
50597
50637
|
a.boundingBox,
|
|
@@ -50600,7 +50640,7 @@ class I3 {
|
|
|
50600
50640
|
});
|
|
50601
50641
|
}
|
|
50602
50642
|
}
|
|
50603
|
-
class
|
|
50643
|
+
class L3 {
|
|
50604
50644
|
constructor(e) {
|
|
50605
50645
|
this.viralViewerApi = e, this.elements = [], this._loadElementBatchWorker = new Tb(e);
|
|
50606
50646
|
}
|
|
@@ -51104,7 +51144,7 @@ class R3 {
|
|
|
51104
51144
|
), this.viralViewerApi.viralMaterialManager.mergeMaterials = [], this.viralViewerApi.viralVisibilityManager.disableGroundShadow(), this.viralViewerApi.viralRenderer.render(), this.viralViewerApi.viralDataManager.dataTree = [], this.viralViewerApi.viralScene.selectables = [];
|
|
51105
51145
|
}
|
|
51106
51146
|
}
|
|
51107
|
-
class
|
|
51147
|
+
class O3 {
|
|
51108
51148
|
constructor(e) {
|
|
51109
51149
|
this.viralViewerApi = e, this.objectLoader = new oM(), this.gltfLoader = new XP();
|
|
51110
51150
|
}
|
|
@@ -51118,9 +51158,9 @@ class D3 {
|
|
|
51118
51158
|
this.gltfLoader.load(e, t, i, n);
|
|
51119
51159
|
}
|
|
51120
51160
|
}
|
|
51121
|
-
class
|
|
51161
|
+
class N3 {
|
|
51122
51162
|
constructor(e) {
|
|
51123
|
-
this.viralViewerApi = e, this.revitLoader = new
|
|
51163
|
+
this.viralViewerApi = e, this.revitLoader = new L3(this.viralViewerApi), this.pointCloudLoader = new D3(this.viralViewerApi), this.threeLoader = new O3(this.viralViewerApi), this.flatbufferLoader = new T3(this.viralViewerApi);
|
|
51124
51164
|
}
|
|
51125
51165
|
}
|
|
51126
51166
|
var Il = function() {
|
|
@@ -51175,24 +51215,24 @@ Il.Panel = function(s, e, t) {
|
|
|
51175
51215
|
}
|
|
51176
51216
|
};
|
|
51177
51217
|
};
|
|
51178
|
-
class
|
|
51218
|
+
class B3 {
|
|
51179
51219
|
constructor(e) {
|
|
51180
51220
|
this.viralViewerApi = e, this.stats = null, this.viralViewerApi.targetElement && (this.stats = Il(), this.stats.showPanel(0), this.viralViewerApi.targetElement.appendChild(this.stats.dom));
|
|
51181
51221
|
}
|
|
51182
51222
|
}
|
|
51183
|
-
const Eb = 0,
|
|
51184
|
-
function
|
|
51223
|
+
const Eb = 0, U3 = 1, F3 = 2, vv = 2, Zu = 1.25, xv = 1, Rl = 6 * 4 + 4 + 4, Td = 65535, z3 = Math.pow(2, -24), qu = Symbol("SKIP_GENERATION");
|
|
51224
|
+
function V3(s) {
|
|
51185
51225
|
return s.index ? s.index.count : s.attributes.position.count;
|
|
51186
51226
|
}
|
|
51187
51227
|
function Ar(s) {
|
|
51188
|
-
return
|
|
51228
|
+
return V3(s) / 3;
|
|
51189
51229
|
}
|
|
51190
|
-
function
|
|
51230
|
+
function k3(s, e = ArrayBuffer) {
|
|
51191
51231
|
return s > 65535 ? new Uint32Array(new e(4 * s)) : new Uint16Array(new e(2 * s));
|
|
51192
51232
|
}
|
|
51193
|
-
function
|
|
51233
|
+
function X3(s, e) {
|
|
51194
51234
|
if (!s.index) {
|
|
51195
|
-
const t = s.attributes.position.count, i = e.useSharedArrayBuffer ? SharedArrayBuffer : ArrayBuffer, n =
|
|
51235
|
+
const t = s.attributes.position.count, i = e.useSharedArrayBuffer ? SharedArrayBuffer : ArrayBuffer, n = k3(t, i);
|
|
51196
51236
|
s.setIndex(new ot(n, 1));
|
|
51197
51237
|
for (let r = 0; r < t; r++)
|
|
51198
51238
|
n[r] = r;
|
|
@@ -51223,7 +51263,7 @@ function Cb(s, e) {
|
|
|
51223
51263
|
}
|
|
51224
51264
|
return t;
|
|
51225
51265
|
}
|
|
51226
|
-
function
|
|
51266
|
+
function H3(s, e) {
|
|
51227
51267
|
const t = Ar(s), i = Cb(s, e).sort((a, o) => a.offset - o.offset), n = i[i.length - 1];
|
|
51228
51268
|
n.count = Math.min(t - n.offset, n.count);
|
|
51229
51269
|
let r = 0;
|
|
@@ -51241,7 +51281,7 @@ function $u(s, e, t, i, n) {
|
|
|
51241
51281
|
}
|
|
51242
51282
|
i[0] = r, i[1] = a, i[2] = o, i[3] = l, i[4] = c, i[5] = h, n[0] = d, n[1] = u, n[2] = f, n[3] = m, n[4] = v, n[5] = g;
|
|
51243
51283
|
}
|
|
51244
|
-
function
|
|
51284
|
+
function Y3(s, e = null, t = null, i = null) {
|
|
51245
51285
|
const n = s.attributes.position, r = s.index ? s.index.array : null, a = Ar(s), o = n.normalized;
|
|
51246
51286
|
let l;
|
|
51247
51287
|
e === null ? l = new Float32Array(a * 6) : l = e, t = t || 0, i = i || a;
|
|
@@ -51261,7 +51301,7 @@ function X3(s, e = null, t = null, i = null) {
|
|
|
51261
51301
|
let E = b;
|
|
51262
51302
|
_ > E && (E = _), w > E && (E = w);
|
|
51263
51303
|
const S = (E - A) / 2, M = x * 2;
|
|
51264
|
-
l[v + M + 0] = A + S, l[v + M + 1] = S + (Math.abs(A) + S) *
|
|
51304
|
+
l[v + M + 0] = A + S, l[v + M + 1] = S + (Math.abs(A) + S) * z3;
|
|
51265
51305
|
}
|
|
51266
51306
|
}
|
|
51267
51307
|
return l;
|
|
@@ -51297,20 +51337,20 @@ function ol(s) {
|
|
|
51297
51337
|
const e = s[3] - s[0], t = s[4] - s[1], i = s[5] - s[2];
|
|
51298
51338
|
return 2 * (e * t + t * i + i * e);
|
|
51299
51339
|
}
|
|
51300
|
-
const Rs = 32,
|
|
51340
|
+
const Rs = 32, G3 = (s, e) => s.candidate - e.candidate, ir = new Array(Rs).fill().map(() => ({
|
|
51301
51341
|
count: 0,
|
|
51302
51342
|
bounds: new Float32Array(6),
|
|
51303
51343
|
rightCacheBounds: new Float32Array(6),
|
|
51304
51344
|
leftCacheBounds: new Float32Array(6),
|
|
51305
51345
|
candidate: 0
|
|
51306
51346
|
})), _h = new Float32Array(6);
|
|
51307
|
-
function
|
|
51347
|
+
function W3(s, e, t, i, n, r) {
|
|
51308
51348
|
let a = -1, o = 0;
|
|
51309
51349
|
if (r === Eb)
|
|
51310
51350
|
a = bv(e), a !== -1 && (o = (e[a] + e[a + 3]) / 2);
|
|
51311
|
-
else if (r ===
|
|
51312
|
-
a = bv(s), a !== -1 && (o =
|
|
51313
|
-
else if (r ===
|
|
51351
|
+
else if (r === U3)
|
|
51352
|
+
a = bv(s), a !== -1 && (o = Q3(t, i, n, a));
|
|
51353
|
+
else if (r === F3) {
|
|
51314
51354
|
const l = ol(s);
|
|
51315
51355
|
let c = Zu * n;
|
|
51316
51356
|
const h = i * 6, d = (i + n) * 6;
|
|
@@ -51332,7 +51372,7 @@ function Y3(s, e, t, i, n, r) {
|
|
|
51332
51372
|
E[S] = 1 / 0, E[S + 3] = -1 / 0, A[S] = 1 / 0, A[S + 3] = -1 / 0, w[S] = 1 / 0, w[S + 3] = -1 / 0;
|
|
51333
51373
|
yh(b, t, w);
|
|
51334
51374
|
}
|
|
51335
|
-
p.sort(
|
|
51375
|
+
p.sort(G3);
|
|
51336
51376
|
let x = n;
|
|
51337
51377
|
for (let b = 0; b < x; b++) {
|
|
51338
51378
|
const _ = p[b];
|
|
@@ -51392,7 +51432,7 @@ function Y3(s, e, t, i, n, r) {
|
|
|
51392
51432
|
console.warn(`MeshBVH: Invalid build strategy value ${r} used.`);
|
|
51393
51433
|
return { axis: a, pos: o };
|
|
51394
51434
|
}
|
|
51395
|
-
function
|
|
51435
|
+
function Q3(s, e, t, i) {
|
|
51396
51436
|
let n = 0;
|
|
51397
51437
|
for (let r = e, a = e + t; r < a; r++)
|
|
51398
51438
|
n += s[r * 6 + i * 2];
|
|
@@ -51403,7 +51443,7 @@ class Ku {
|
|
|
51403
51443
|
this.boundingData = new Float32Array(6);
|
|
51404
51444
|
}
|
|
51405
51445
|
}
|
|
51406
|
-
function
|
|
51446
|
+
function j3(s, e, t, i, n, r) {
|
|
51407
51447
|
let a = i, o = i + n - 1;
|
|
51408
51448
|
const l = r.pos, c = r.axis * 2;
|
|
51409
51449
|
for (; ; ) {
|
|
@@ -51425,7 +51465,7 @@ function W3(s, e, t, i, n, r) {
|
|
|
51425
51465
|
return a;
|
|
51426
51466
|
}
|
|
51427
51467
|
}
|
|
51428
|
-
function
|
|
51468
|
+
function Z3(s, e, t, i, n, r) {
|
|
51429
51469
|
let a = i, o = i + n - 1;
|
|
51430
51470
|
const l = r.pos, c = r.axis * 2;
|
|
51431
51471
|
for (; ; ) {
|
|
@@ -51464,11 +51504,11 @@ function Ib(s, e) {
|
|
|
51464
51504
|
return e[s + 7];
|
|
51465
51505
|
}
|
|
51466
51506
|
let Rb, wl, Gh, Db;
|
|
51467
|
-
const
|
|
51507
|
+
const q3 = Math.pow(2, 32);
|
|
51468
51508
|
function up(s) {
|
|
51469
51509
|
return "count" in s ? 1 : 1 + up(s.left) + up(s.right);
|
|
51470
51510
|
}
|
|
51471
|
-
function
|
|
51511
|
+
function $3(s, e, t) {
|
|
51472
51512
|
return Rb = new Float32Array(t), wl = new Uint32Array(t), Gh = new Uint16Array(t), Db = new Uint8Array(t), fp(s, e);
|
|
51473
51513
|
}
|
|
51474
51514
|
function fp(s, e) {
|
|
@@ -51491,18 +51531,18 @@ function fp(s, e) {
|
|
|
51491
51531
|
else {
|
|
51492
51532
|
const a = e.left, o = e.right, l = e.splitAxis;
|
|
51493
51533
|
let c;
|
|
51494
|
-
if (c = fp(s + Rl, a), c / 4 >
|
|
51534
|
+
if (c = fp(s + Rl, a), c / 4 > q3)
|
|
51495
51535
|
throw new Error("MeshBVH: Cannot store child pointer greater than 32 bits.");
|
|
51496
51536
|
return wl[t + 6] = c / 4, c = fp(c, o), wl[t + 7] = l, c;
|
|
51497
51537
|
}
|
|
51498
51538
|
}
|
|
51499
|
-
function
|
|
51539
|
+
function K3(s, e) {
|
|
51500
51540
|
const t = (s.index ? s.index.count : s.attributes.position.count) / 3, i = t > 2 ** 16, n = i ? 4 : 2, r = e ? new SharedArrayBuffer(t * n) : new ArrayBuffer(t * n), a = i ? new Uint32Array(r) : new Uint16Array(r);
|
|
51501
51541
|
for (let o = 0, l = a.length; o < l; o++)
|
|
51502
51542
|
a[o] = o;
|
|
51503
51543
|
return a;
|
|
51504
51544
|
}
|
|
51505
|
-
function
|
|
51545
|
+
function J3(s, e, t, i, n) {
|
|
51506
51546
|
const {
|
|
51507
51547
|
maxDepth: r,
|
|
51508
51548
|
verbose: a,
|
|
@@ -51510,7 +51550,7 @@ function $3(s, e, t, i, n) {
|
|
|
51510
51550
|
strategy: l,
|
|
51511
51551
|
onProgress: c,
|
|
51512
51552
|
indirect: h
|
|
51513
|
-
} = n, d = s._indirectBuffer, u = s.geometry, f = u.index ? u.index.array : null, m = h ?
|
|
51553
|
+
} = n, d = s._indirectBuffer, u = s.geometry, f = u.index ? u.index.array : null, m = h ? Z3 : j3, v = Ar(u), g = new Float32Array(6);
|
|
51514
51554
|
let p = !1;
|
|
51515
51555
|
const y = new Ku();
|
|
51516
51556
|
return $u(e, t, i, y.boundingData, g), b(y, t, i, g), y;
|
|
@@ -51520,7 +51560,7 @@ function $3(s, e, t, i, n) {
|
|
|
51520
51560
|
function b(_, w, A, E = null, S = 0) {
|
|
51521
51561
|
if (!p && S >= r && (p = !0, a && (console.warn(`MeshBVH: Max depth of ${r} reached when generating BVH. Consider increasing maxDepth.`), console.warn(u))), A <= o || S >= r)
|
|
51522
51562
|
return x(w + A), _.offset = w, _.count = A, _;
|
|
51523
|
-
const M =
|
|
51563
|
+
const M = W3(_.boundingData, E, e, w, A, l);
|
|
51524
51564
|
if (M.axis === -1)
|
|
51525
51565
|
return x(w + A), _.offset = w, _.count = A, _;
|
|
51526
51566
|
const C = m(d, f, e, w, A, M);
|
|
@@ -51536,15 +51576,15 @@ function $3(s, e, t, i, n) {
|
|
|
51536
51576
|
return _;
|
|
51537
51577
|
}
|
|
51538
51578
|
}
|
|
51539
|
-
function
|
|
51579
|
+
function eI(s, e) {
|
|
51540
51580
|
const t = s.geometry;
|
|
51541
|
-
e.indirect && (s._indirectBuffer =
|
|
51581
|
+
e.indirect && (s._indirectBuffer = K3(t, e.useSharedArrayBuffer), H3(t, e.range) && !e.verbose && console.warn(
|
|
51542
51582
|
'MeshBVH: Provided geometry contains groups or a range that do not fully span the vertex contents while using the "indirect" option. BVH may incorrectly report intersections on unrendered portions of the geometry.'
|
|
51543
|
-
)), s._indirectBuffer ||
|
|
51544
|
-
const i = e.useSharedArrayBuffer ? SharedArrayBuffer : ArrayBuffer, n = Pb(t, e.range), r =
|
|
51583
|
+
)), s._indirectBuffer || X3(t, e);
|
|
51584
|
+
const i = e.useSharedArrayBuffer ? SharedArrayBuffer : ArrayBuffer, n = Pb(t, e.range), r = Y3(t, null, n[0].offset, n[0].count), a = e.indirect ? n : Cb(t, e.range);
|
|
51545
51585
|
s._roots = a.map((o) => {
|
|
51546
|
-
const l =
|
|
51547
|
-
return
|
|
51586
|
+
const l = J3(s, r, o.offset, o.count, e), c = up(l), h = new i(Rl * c);
|
|
51587
|
+
return $3(0, l, h), h;
|
|
51548
51588
|
});
|
|
51549
51589
|
}
|
|
51550
51590
|
class Hs {
|
|
@@ -51586,7 +51626,7 @@ Hs.prototype.setFromBox = function() {
|
|
|
51586
51626
|
this.min = a, this.max = o;
|
|
51587
51627
|
};
|
|
51588
51628
|
}();
|
|
51589
|
-
const
|
|
51629
|
+
const tI = function() {
|
|
51590
51630
|
const s = new P(), e = new P(), t = new P();
|
|
51591
51631
|
return function(n, r, a) {
|
|
51592
51632
|
const o = n.start, l = s, c = r.start, h = e;
|
|
@@ -51598,7 +51638,7 @@ const J3 = function() {
|
|
|
51598
51638
|
}(), vm = function() {
|
|
51599
51639
|
const s = new K(), e = new P(), t = new P();
|
|
51600
51640
|
return function(n, r, a, o) {
|
|
51601
|
-
|
|
51641
|
+
tI(n, r, s);
|
|
51602
51642
|
let l = s.x, c = s.y;
|
|
51603
51643
|
if (l >= 0 && l <= 1 && c >= 0 && c <= 1) {
|
|
51604
51644
|
n.at(l, a), r.at(c, o);
|
|
@@ -51624,7 +51664,7 @@ const J3 = function() {
|
|
|
51624
51664
|
}
|
|
51625
51665
|
}
|
|
51626
51666
|
};
|
|
51627
|
-
}(),
|
|
51667
|
+
}(), iI = function() {
|
|
51628
51668
|
const s = new P(), e = new P(), t = new Wi(), i = new ys();
|
|
51629
51669
|
return function(r, a) {
|
|
51630
51670
|
const { radius: o, center: l } = r, { a: c, b: h, c: d } = a;
|
|
@@ -51638,7 +51678,7 @@ const J3 = function() {
|
|
|
51638
51678
|
}
|
|
51639
51679
|
return !1;
|
|
51640
51680
|
};
|
|
51641
|
-
}(),
|
|
51681
|
+
}(), nI = ["x", "y", "z"], Ns = 1e-15, wv = Ns * Ns;
|
|
51642
51682
|
function An(s) {
|
|
51643
51683
|
return Math.abs(s) < Ns;
|
|
51644
51684
|
}
|
|
@@ -51647,7 +51687,7 @@ class es extends vn {
|
|
|
51647
51687
|
super(...e), this.isExtendedTriangle = !0, this.satAxes = new Array(4).fill().map(() => new P()), this.satBounds = new Array(4).fill().map(() => new Hs()), this.points = [this.a, this.b, this.c], this.plane = new Wi(), this.isDegenerateIntoSegment = !1, this.isDegenerateIntoPoint = !1, this.degenerateSegment = new ys(), this.needsUpdate = !0;
|
|
51648
51688
|
}
|
|
51649
51689
|
intersectsSphere(e) {
|
|
51650
|
-
return
|
|
51690
|
+
return iI(e, this);
|
|
51651
51691
|
}
|
|
51652
51692
|
update() {
|
|
51653
51693
|
const e = this.a, t = this.b, i = this.c, n = this.points, r = this.satAxes, a = this.satBounds, o = r[0], l = a[0];
|
|
@@ -51769,7 +51809,7 @@ es.prototype.intersectsTriangle = function() {
|
|
|
51769
51809
|
let Oe = 0, ce = Math.abs(pe.x);
|
|
51770
51810
|
const we = Math.abs(pe.y);
|
|
51771
51811
|
we > ce && (ce = we, Oe = 1), Math.abs(pe.z) > ce && (Oe = 2);
|
|
51772
|
-
const Ue =
|
|
51812
|
+
const Ue = nI[Oe], ne = this.a[Ue], ee = this.b[Ue], Te = this.c[Ue], ke = b.a[Ue], Ye = b.b[Ue], ht = b.c[Ue];
|
|
51773
51813
|
if (m(this, ne, ee, Te, U, z, M, C, L, h, o))
|
|
51774
51814
|
return u(this, b, _, w);
|
|
51775
51815
|
if (m(b, ke, Ye, ht, q, ie, X, j, re, d, l))
|
|
@@ -51957,13 +51997,13 @@ class xm {
|
|
|
51957
51997
|
this._primitives.push(e);
|
|
51958
51998
|
}
|
|
51959
51999
|
}
|
|
51960
|
-
class
|
|
52000
|
+
class sI extends xm {
|
|
51961
52001
|
constructor() {
|
|
51962
52002
|
super(() => new es());
|
|
51963
52003
|
}
|
|
51964
52004
|
}
|
|
51965
|
-
const Ln = /* @__PURE__ */ new
|
|
51966
|
-
class
|
|
52005
|
+
const Ln = /* @__PURE__ */ new sI();
|
|
52006
|
+
class rI {
|
|
51967
52007
|
constructor() {
|
|
51968
52008
|
this.float32Array = null, this.uint16Array = null, this.uint32Array = null;
|
|
51969
52009
|
const e = [];
|
|
@@ -51975,10 +52015,10 @@ class nI {
|
|
|
51975
52015
|
};
|
|
51976
52016
|
}
|
|
51977
52017
|
}
|
|
51978
|
-
const Kt = new
|
|
52018
|
+
const Kt = new rI();
|
|
51979
52019
|
let pr, ao;
|
|
51980
52020
|
const Qa = [], wh = /* @__PURE__ */ new xm(() => new ut());
|
|
51981
|
-
function
|
|
52021
|
+
function aI(s, e, t, i, n, r) {
|
|
51982
52022
|
pr = wh.getPrimitive(), ao = wh.getPrimitive(), Qa.push(pr, ao), Kt.setBuffer(s._roots[e]);
|
|
51983
52023
|
const a = pp(0, s.geometry, t, i, n, r);
|
|
51984
52024
|
Kt.clearBuffer(), wh.releasePrimitive(pr), wh.releasePrimitive(ao), Qa.pop(), Qa.pop();
|
|
@@ -52050,7 +52090,7 @@ function pp(s, e, t, i, n = null, r = 0, a = 0) {
|
|
|
52050
52090
|
}
|
|
52051
52091
|
}
|
|
52052
52092
|
const ll = /* @__PURE__ */ new P(), Ju = /* @__PURE__ */ new P();
|
|
52053
|
-
function
|
|
52093
|
+
function oI(s, e, t = {}, i = 0, n = 1 / 0) {
|
|
52054
52094
|
const r = i * i, a = n * n;
|
|
52055
52095
|
let o = 1 / 0, l = null;
|
|
52056
52096
|
if (s.shapecast(
|
|
@@ -52068,8 +52108,8 @@ function rI(s, e, t = {}, i = 0, n = 1 / 0) {
|
|
|
52068
52108
|
const c = Math.sqrt(o);
|
|
52069
52109
|
return t.point ? t.point.copy(Ju) : t.point = Ju.clone(), t.distance = c, t.faceIndex = l, t;
|
|
52070
52110
|
}
|
|
52071
|
-
const Sh = parseInt(Do) >= 169,
|
|
52072
|
-
function
|
|
52111
|
+
const Sh = parseInt(Do) >= 169, lI = parseInt(Do) <= 161, zr = /* @__PURE__ */ new P(), Vr = /* @__PURE__ */ new P(), kr = /* @__PURE__ */ new P(), Mh = /* @__PURE__ */ new K(), Ah = /* @__PURE__ */ new K(), Th = /* @__PURE__ */ new K(), Sv = /* @__PURE__ */ new P(), Mv = /* @__PURE__ */ new P(), Av = /* @__PURE__ */ new P(), cl = /* @__PURE__ */ new P();
|
|
52112
|
+
function cI(s, e, t, i, n, r, a, o) {
|
|
52073
52113
|
let l;
|
|
52074
52114
|
if (r === qi ? l = s.intersectTriangle(i, t, e, !0, n) : l = s.intersectTriangle(e, t, i, r !== li, n), l === null)
|
|
52075
52115
|
return null;
|
|
@@ -52079,9 +52119,9 @@ function oI(s, e, t, i, n, r, a, o) {
|
|
|
52079
52119
|
point: n.clone()
|
|
52080
52120
|
};
|
|
52081
52121
|
}
|
|
52082
|
-
function
|
|
52122
|
+
function hI(s, e, t, i, n, r, a, o, l, c, h) {
|
|
52083
52123
|
zr.fromBufferAttribute(e, r), Vr.fromBufferAttribute(e, a), kr.fromBufferAttribute(e, o);
|
|
52084
|
-
const d =
|
|
52124
|
+
const d = cI(s, zr, Vr, kr, cl, l, c, h);
|
|
52085
52125
|
if (d) {
|
|
52086
52126
|
if (i) {
|
|
52087
52127
|
Mh.fromBufferAttribute(i, r), Ah.fromBufferAttribute(i, a), Th.fromBufferAttribute(i, o), d.uv = new K();
|
|
@@ -52091,7 +52131,7 @@ function lI(s, e, t, i, n, r, a, o, l, c, h) {
|
|
|
52091
52131
|
if (n) {
|
|
52092
52132
|
Mh.fromBufferAttribute(n, r), Ah.fromBufferAttribute(n, a), Th.fromBufferAttribute(n, o), d.uv1 = new K();
|
|
52093
52133
|
const f = vn.getInterpolation(cl, zr, Vr, kr, Mh, Ah, Th, d.uv1);
|
|
52094
|
-
Sh || (d.uv1 = f),
|
|
52134
|
+
Sh || (d.uv1 = f), lI && (d.uv2 = d.uv1);
|
|
52095
52135
|
}
|
|
52096
52136
|
if (t) {
|
|
52097
52137
|
Sv.fromBufferAttribute(t, r), Mv.fromBufferAttribute(t, a), Av.fromBufferAttribute(t, o), d.normal = new P();
|
|
@@ -52117,7 +52157,7 @@ function Ed(s, e, t, i, n, r, a) {
|
|
|
52117
52157
|
let l = o + 0, c = o + 1, h = o + 2;
|
|
52118
52158
|
const d = s.index;
|
|
52119
52159
|
s.index && (l = d.getX(l), c = d.getX(c), h = d.getX(h));
|
|
52120
|
-
const { position: u, normal: f, uv: m, uv1: v } = s.attributes, g =
|
|
52160
|
+
const { position: u, normal: f, uv: m, uv1: v } = s.attributes, g = hI(t, u, f, m, v, l, c, h, e, r, a);
|
|
52121
52161
|
return g ? (g.faceIndex = i, n && n.push(g), g) : null;
|
|
52122
52162
|
}
|
|
52123
52163
|
function xi(s, e, t, i) {
|
|
@@ -52125,12 +52165,12 @@ function xi(s, e, t, i) {
|
|
|
52125
52165
|
let o = e, l = e + 1, c = e + 2;
|
|
52126
52166
|
t && (o = t.getX(o), l = t.getX(l), c = t.getX(c)), n.x = i.getX(o), n.y = i.getY(o), n.z = i.getZ(o), r.x = i.getX(l), r.y = i.getY(l), r.z = i.getZ(l), a.x = i.getX(c), a.y = i.getY(c), a.z = i.getZ(c);
|
|
52127
52167
|
}
|
|
52128
|
-
function
|
|
52168
|
+
function dI(s, e, t, i, n, r, a, o) {
|
|
52129
52169
|
const { geometry: l, _indirectBuffer: c } = s;
|
|
52130
52170
|
for (let h = i, d = i + n; h < d; h++)
|
|
52131
52171
|
Ed(l, e, t, h, r, a, o);
|
|
52132
52172
|
}
|
|
52133
|
-
function
|
|
52173
|
+
function uI(s, e, t, i, n, r, a) {
|
|
52134
52174
|
const { geometry: o, _indirectBuffer: l } = s;
|
|
52135
52175
|
let c = 1 / 0, h = null;
|
|
52136
52176
|
for (let d = i, u = i + n; d < u; d++) {
|
|
@@ -52139,7 +52179,7 @@ function hI(s, e, t, i, n, r, a) {
|
|
|
52139
52179
|
}
|
|
52140
52180
|
return h;
|
|
52141
52181
|
}
|
|
52142
|
-
function
|
|
52182
|
+
function fI(s, e, t, i, n, r, a) {
|
|
52143
52183
|
const { geometry: o } = t, { index: l } = o, c = o.attributes.position;
|
|
52144
52184
|
for (let h = s, d = e + s; h < d; h++) {
|
|
52145
52185
|
let u;
|
|
@@ -52148,7 +52188,7 @@ function dI(s, e, t, i, n, r, a) {
|
|
|
52148
52188
|
}
|
|
52149
52189
|
return !1;
|
|
52150
52190
|
}
|
|
52151
|
-
function
|
|
52191
|
+
function pI(s, e = null) {
|
|
52152
52192
|
e && Array.isArray(e) && (e = new Set(e));
|
|
52153
52193
|
const t = s.geometry, i = t.index ? t.index.array : null, n = t.attributes.position;
|
|
52154
52194
|
let r, a, o, l, c = 0;
|
|
@@ -52191,14 +52231,14 @@ function Sr(s, e, t, i, n) {
|
|
|
52191
52231
|
let p = e[s], y = e[s + 3], x = e[s + 1], b = e[s + 3 + 1], _ = e[s + 2], w = e[s + 3 + 2];
|
|
52192
52232
|
return d >= 0 ? (r = (p - m) * d, a = (y - m) * d) : (r = (y - m) * d, a = (p - m) * d), u >= 0 ? (o = (x - v) * u, l = (b - v) * u) : (o = (b - v) * u, l = (x - v) * u), r > l || o > a || ((o > r || isNaN(r)) && (r = o), (l < a || isNaN(a)) && (a = l), f >= 0 ? (c = (_ - g) * f, h = (w - g) * f) : (c = (w - g) * f, h = (_ - g) * f), r > h || c > a) ? !1 : ((c > r || r !== r) && (r = c), (h < a || a !== a) && (a = h), r <= n && a >= i);
|
|
52193
52233
|
}
|
|
52194
|
-
function
|
|
52234
|
+
function mI(s, e, t, i, n, r, a, o) {
|
|
52195
52235
|
const { geometry: l, _indirectBuffer: c } = s;
|
|
52196
52236
|
for (let h = i, d = i + n; h < d; h++) {
|
|
52197
52237
|
let u = c ? c[h] : h;
|
|
52198
52238
|
Ed(l, e, t, u, r, a, o);
|
|
52199
52239
|
}
|
|
52200
52240
|
}
|
|
52201
|
-
function
|
|
52241
|
+
function gI(s, e, t, i, n, r, a) {
|
|
52202
52242
|
const { geometry: o, _indirectBuffer: l } = s;
|
|
52203
52243
|
let c = 1 / 0, h = null;
|
|
52204
52244
|
for (let d = i, u = i + n; d < u; d++) {
|
|
@@ -52207,7 +52247,7 @@ function pI(s, e, t, i, n, r, a) {
|
|
|
52207
52247
|
}
|
|
52208
52248
|
return h;
|
|
52209
52249
|
}
|
|
52210
|
-
function
|
|
52250
|
+
function vI(s, e, t, i, n, r, a) {
|
|
52211
52251
|
const { geometry: o } = t, { index: l } = o, c = o.attributes.position;
|
|
52212
52252
|
for (let h = s, d = e + s; h < d; h++) {
|
|
52213
52253
|
let u;
|
|
@@ -52216,14 +52256,14 @@ function mI(s, e, t, i, n, r, a) {
|
|
|
52216
52256
|
}
|
|
52217
52257
|
return !1;
|
|
52218
52258
|
}
|
|
52219
|
-
function
|
|
52259
|
+
function xI(s, e, t, i, n, r, a) {
|
|
52220
52260
|
Kt.setBuffer(s._roots[e]), mp(0, s, t, i, n, r, a), Kt.clearBuffer();
|
|
52221
52261
|
}
|
|
52222
52262
|
function mp(s, e, t, i, n, r, a) {
|
|
52223
52263
|
const { float32Array: o, uint16Array: l, uint32Array: c } = Kt, h = s * 2;
|
|
52224
52264
|
if (on(h, l)) {
|
|
52225
52265
|
const u = _n(s, c), f = In(h, l);
|
|
52226
|
-
|
|
52266
|
+
dI(e, t, i, u, f, n, r, a);
|
|
52227
52267
|
} else {
|
|
52228
52268
|
const u = Rn(s);
|
|
52229
52269
|
Sr(u, o, i, r, a) && mp(u, e, t, i, n, r, a);
|
|
@@ -52231,8 +52271,8 @@ function mp(s, e, t, i, n, r, a) {
|
|
|
52231
52271
|
Sr(f, o, i, r, a) && mp(f, e, t, i, n, r, a);
|
|
52232
52272
|
}
|
|
52233
52273
|
}
|
|
52234
|
-
const
|
|
52235
|
-
function
|
|
52274
|
+
const bI = ["x", "y", "z"];
|
|
52275
|
+
function yI(s, e, t, i, n, r) {
|
|
52236
52276
|
Kt.setBuffer(s._roots[e]);
|
|
52237
52277
|
const a = gp(0, s, t, i, n, r);
|
|
52238
52278
|
return Kt.clearBuffer(), a;
|
|
@@ -52242,9 +52282,9 @@ function gp(s, e, t, i, n, r) {
|
|
|
52242
52282
|
let c = s * 2;
|
|
52243
52283
|
if (on(c, o)) {
|
|
52244
52284
|
const d = _n(s, l), u = In(c, o);
|
|
52245
|
-
return
|
|
52285
|
+
return uI(e, t, i, d, u, n, r);
|
|
52246
52286
|
} else {
|
|
52247
|
-
const d = Ib(s, l), u =
|
|
52287
|
+
const d = Ib(s, l), u = bI[d], m = i.direction[u] >= 0;
|
|
52248
52288
|
let v, g;
|
|
52249
52289
|
m ? (v = Rn(s), g = Dn(s, l)) : (v = Dn(s, l), g = Rn(s));
|
|
52250
52290
|
const y = Sr(v, a, i, n, r) ? gp(v, e, t, i, n, r) : null;
|
|
@@ -52261,7 +52301,7 @@ function gp(s, e, t, i, n, r) {
|
|
|
52261
52301
|
}
|
|
52262
52302
|
}
|
|
52263
52303
|
const Eh = /* @__PURE__ */ new ut(), ja = /* @__PURE__ */ new es(), Za = /* @__PURE__ */ new es(), hl = /* @__PURE__ */ new Ee(), Tv = /* @__PURE__ */ new Ki(), Ph = /* @__PURE__ */ new Ki();
|
|
52264
|
-
function
|
|
52304
|
+
function _I(s, e, t, i) {
|
|
52265
52305
|
Kt.setBuffer(s._roots[e]);
|
|
52266
52306
|
const n = vp(0, s, t, i);
|
|
52267
52307
|
return Kt.clearBuffer(), n;
|
|
@@ -52296,12 +52336,12 @@ function vp(s, e, t, i, n = null) {
|
|
|
52296
52336
|
return ui(h, r, Eh), !!(n.intersectsBox(Eh) && vp(h, e, t, i, n) || (ui(d, r, Eh), n.intersectsBox(Eh) && vp(d, e, t, i, n)));
|
|
52297
52337
|
}
|
|
52298
52338
|
}
|
|
52299
|
-
const Ch = /* @__PURE__ */ new Ee(), ef = /* @__PURE__ */ new Ki(), dl = /* @__PURE__ */ new Ki(),
|
|
52300
|
-
function
|
|
52339
|
+
const Ch = /* @__PURE__ */ new Ee(), ef = /* @__PURE__ */ new Ki(), dl = /* @__PURE__ */ new Ki(), wI = /* @__PURE__ */ new P(), SI = /* @__PURE__ */ new P(), MI = /* @__PURE__ */ new P(), AI = /* @__PURE__ */ new P();
|
|
52340
|
+
function TI(s, e, t, i = {}, n = {}, r = 0, a = 1 / 0) {
|
|
52301
52341
|
e.boundingBox || e.computeBoundingBox(), ef.set(e.boundingBox.min, e.boundingBox.max, t), ef.needsUpdate = !0;
|
|
52302
52342
|
const o = s.geometry, l = o.attributes.position, c = o.index, h = e.attributes.position, d = e.index, u = Ln.getPrimitive(), f = Ln.getPrimitive();
|
|
52303
|
-
let m =
|
|
52304
|
-
n && (g =
|
|
52343
|
+
let m = wI, v = SI, g = null, p = null;
|
|
52344
|
+
n && (g = MI, p = AI);
|
|
52305
52345
|
let y = 1 / 0, x = null, b = null;
|
|
52306
52346
|
return Ch.copy(t).invert(), dl.matrix.copy(Ch), s.shapecast(
|
|
52307
52347
|
{
|
|
@@ -52340,7 +52380,7 @@ function MI(s, e, t, i = {}, n = {}, r = 0, a = 1 / 0) {
|
|
|
52340
52380
|
}
|
|
52341
52381
|
), Ln.releasePrimitive(u), Ln.releasePrimitive(f), y === 1 / 0 ? null : (i.point ? i.point.copy(v) : i.point = v.clone(), i.distance = y, i.faceIndex = x, n && (n.point ? n.point.copy(p) : n.point = p.clone(), n.point.applyMatrix4(Ch), v.applyMatrix4(Ch), n.distance = v.sub(n.point).length(), n.faceIndex = b), i);
|
|
52342
52382
|
}
|
|
52343
|
-
function
|
|
52383
|
+
function EI(s, e = null) {
|
|
52344
52384
|
e && Array.isArray(e) && (e = new Set(e));
|
|
52345
52385
|
const t = s.geometry, i = t.index ? t.index.array : null, n = t.attributes.position;
|
|
52346
52386
|
let r, a, o, l, c = 0;
|
|
@@ -52381,14 +52421,14 @@ function AI(s, e = null) {
|
|
|
52381
52421
|
}
|
|
52382
52422
|
}
|
|
52383
52423
|
}
|
|
52384
|
-
function
|
|
52424
|
+
function PI(s, e, t, i, n, r, a) {
|
|
52385
52425
|
Kt.setBuffer(s._roots[e]), xp(0, s, t, i, n, r, a), Kt.clearBuffer();
|
|
52386
52426
|
}
|
|
52387
52427
|
function xp(s, e, t, i, n, r, a) {
|
|
52388
52428
|
const { float32Array: o, uint16Array: l, uint32Array: c } = Kt, h = s * 2;
|
|
52389
52429
|
if (on(h, l)) {
|
|
52390
52430
|
const u = _n(s, c), f = In(h, l);
|
|
52391
|
-
|
|
52431
|
+
mI(e, t, i, u, f, n, r, a);
|
|
52392
52432
|
} else {
|
|
52393
52433
|
const u = Rn(s);
|
|
52394
52434
|
Sr(u, o, i, r, a) && xp(u, e, t, i, n, r, a);
|
|
@@ -52396,8 +52436,8 @@ function xp(s, e, t, i, n, r, a) {
|
|
|
52396
52436
|
Sr(f, o, i, r, a) && xp(f, e, t, i, n, r, a);
|
|
52397
52437
|
}
|
|
52398
52438
|
}
|
|
52399
|
-
const
|
|
52400
|
-
function
|
|
52439
|
+
const CI = ["x", "y", "z"];
|
|
52440
|
+
function II(s, e, t, i, n, r) {
|
|
52401
52441
|
Kt.setBuffer(s._roots[e]);
|
|
52402
52442
|
const a = bp(0, s, t, i, n, r);
|
|
52403
52443
|
return Kt.clearBuffer(), a;
|
|
@@ -52407,9 +52447,9 @@ function bp(s, e, t, i, n, r) {
|
|
|
52407
52447
|
let c = s * 2;
|
|
52408
52448
|
if (on(c, o)) {
|
|
52409
52449
|
const d = _n(s, l), u = In(c, o);
|
|
52410
|
-
return
|
|
52450
|
+
return gI(e, t, i, d, u, n, r);
|
|
52411
52451
|
} else {
|
|
52412
|
-
const d = Ib(s, l), u =
|
|
52452
|
+
const d = Ib(s, l), u = CI[d], m = i.direction[u] >= 0;
|
|
52413
52453
|
let v, g;
|
|
52414
52454
|
m ? (v = Rn(s), g = Dn(s, l)) : (v = Dn(s, l), g = Rn(s));
|
|
52415
52455
|
const y = Sr(v, a, i, n, r) ? bp(v, e, t, i, n, r) : null;
|
|
@@ -52426,7 +52466,7 @@ function bp(s, e, t, i, n, r) {
|
|
|
52426
52466
|
}
|
|
52427
52467
|
}
|
|
52428
52468
|
const Ih = /* @__PURE__ */ new ut(), qa = /* @__PURE__ */ new es(), $a = /* @__PURE__ */ new es(), ul = /* @__PURE__ */ new Ee(), Ev = /* @__PURE__ */ new Ki(), Rh = /* @__PURE__ */ new Ki();
|
|
52429
|
-
function
|
|
52469
|
+
function RI(s, e, t, i) {
|
|
52430
52470
|
Kt.setBuffer(s._roots[e]);
|
|
52431
52471
|
const n = yp(0, s, t, i);
|
|
52432
52472
|
return Kt.clearBuffer(), n;
|
|
@@ -52462,12 +52502,12 @@ function yp(s, e, t, i, n = null) {
|
|
|
52462
52502
|
return ui(h, r, Ih), !!(n.intersectsBox(Ih) && yp(h, e, t, i, n) || (ui(d, r, Ih), n.intersectsBox(Ih) && yp(d, e, t, i, n)));
|
|
52463
52503
|
}
|
|
52464
52504
|
}
|
|
52465
|
-
const Dh = /* @__PURE__ */ new Ee(), tf = /* @__PURE__ */ new Ki(), fl = /* @__PURE__ */ new Ki(),
|
|
52466
|
-
function
|
|
52505
|
+
const Dh = /* @__PURE__ */ new Ee(), tf = /* @__PURE__ */ new Ki(), fl = /* @__PURE__ */ new Ki(), DI = /* @__PURE__ */ new P(), LI = /* @__PURE__ */ new P(), OI = /* @__PURE__ */ new P(), NI = /* @__PURE__ */ new P();
|
|
52506
|
+
function BI(s, e, t, i = {}, n = {}, r = 0, a = 1 / 0) {
|
|
52467
52507
|
e.boundingBox || e.computeBoundingBox(), tf.set(e.boundingBox.min, e.boundingBox.max, t), tf.needsUpdate = !0;
|
|
52468
52508
|
const o = s.geometry, l = o.attributes.position, c = o.index, h = e.attributes.position, d = e.index, u = Ln.getPrimitive(), f = Ln.getPrimitive();
|
|
52469
|
-
let m =
|
|
52470
|
-
n && (g =
|
|
52509
|
+
let m = DI, v = LI, g = null, p = null;
|
|
52510
|
+
n && (g = OI, p = NI);
|
|
52471
52511
|
let y = 1 / 0, x = null, b = null;
|
|
52472
52512
|
return Dh.copy(t).invert(), fl.matrix.copy(Dh), s.shapecast(
|
|
52473
52513
|
{
|
|
@@ -52510,12 +52550,12 @@ function OI(s, e, t, i = {}, n = {}, r = 0, a = 1 / 0) {
|
|
|
52510
52550
|
}
|
|
52511
52551
|
), Ln.releasePrimitive(u), Ln.releasePrimitive(f), y === 1 / 0 ? null : (i.point ? i.point.copy(v) : i.point = v.clone(), i.distance = y, i.faceIndex = x, n && (n.point ? n.point.copy(p) : n.point = p.clone(), n.point.applyMatrix4(Dh), v.applyMatrix4(Dh), n.distance = v.sub(n.point).length(), n.faceIndex = b), i);
|
|
52512
52552
|
}
|
|
52513
|
-
function
|
|
52553
|
+
function UI() {
|
|
52514
52554
|
return typeof SharedArrayBuffer < "u";
|
|
52515
52555
|
}
|
|
52516
52556
|
const Dl = new Kt.constructor(), od = new Kt.constructor(), rr = new xm(() => new ut()), Ka = new ut(), Ja = new ut(), nf = new ut(), sf = new ut();
|
|
52517
52557
|
let rf = !1;
|
|
52518
|
-
function
|
|
52558
|
+
function FI(s, e, t, i) {
|
|
52519
52559
|
if (rf)
|
|
52520
52560
|
throw new Error("MeshBVH: Recursive calls to bvhcast not supported.");
|
|
52521
52561
|
rf = !0;
|
|
@@ -52727,7 +52767,7 @@ function Hn(s, e, t, i, n, r = 0, a = 0, o = 0, l = 0, c = null, h = !1) {
|
|
|
52727
52767
|
}
|
|
52728
52768
|
return A;
|
|
52729
52769
|
}
|
|
52730
|
-
const Lh = /* @__PURE__ */ new Ki(), Pv = /* @__PURE__ */ new ut(),
|
|
52770
|
+
const Lh = /* @__PURE__ */ new Ki(), Pv = /* @__PURE__ */ new ut(), zI = {
|
|
52731
52771
|
strategy: Eb,
|
|
52732
52772
|
maxDepth: 40,
|
|
52733
52773
|
maxLeafTris: 10,
|
|
@@ -52783,16 +52823,16 @@ class bm {
|
|
|
52783
52823
|
} else
|
|
52784
52824
|
throw new Error("MeshBVH: Only BufferGeometries are supported.");
|
|
52785
52825
|
if (t = Object.assign({
|
|
52786
|
-
...
|
|
52826
|
+
...zI,
|
|
52787
52827
|
// undocumented options
|
|
52788
52828
|
// Whether to skip generating the tree. Used for deserialization.
|
|
52789
52829
|
[qu]: !1
|
|
52790
|
-
}, t), t.useSharedArrayBuffer && !
|
|
52830
|
+
}, t), t.useSharedArrayBuffer && !UI())
|
|
52791
52831
|
throw new Error("MeshBVH: SharedArrayBuffer is not available.");
|
|
52792
|
-
this.geometry = e, this._roots = null, this._indirectBuffer = null, t[qu] || (
|
|
52832
|
+
this.geometry = e, this._roots = null, this._indirectBuffer = null, t[qu] || (eI(this, t), !e.boundingBox && t.setBoundingBox && (e.boundingBox = this.getBoundingBox(new ut()))), this.resolveTriangleIndex = t.indirect ? (i) => this._indirectBuffer[i] : (i) => i;
|
|
52793
52833
|
}
|
|
52794
52834
|
refit(e = null) {
|
|
52795
|
-
return (this.indirect ?
|
|
52835
|
+
return (this.indirect ? EI : pI)(this, e);
|
|
52796
52836
|
}
|
|
52797
52837
|
traverse(e, t = 0) {
|
|
52798
52838
|
const i = this._roots[t], n = new Uint32Array(i), r = new Uint16Array(i);
|
|
@@ -52810,7 +52850,7 @@ class bm {
|
|
|
52810
52850
|
}
|
|
52811
52851
|
/* Core Cast Functions */
|
|
52812
52852
|
raycast(e, t = $n, i = 0, n = 1 / 0) {
|
|
52813
|
-
const r = this._roots, a = this.geometry, o = [], l = t.isMaterial, c = Array.isArray(t), h = a.groups, d = l ? t.side : t, u = this.indirect ?
|
|
52853
|
+
const r = this._roots, a = this.geometry, o = [], l = t.isMaterial, c = Array.isArray(t), h = a.groups, d = l ? t.side : t, u = this.indirect ? PI : xI;
|
|
52814
52854
|
for (let f = 0, m = r.length; f < m; f++) {
|
|
52815
52855
|
const v = c ? t[h[f].materialIndex].side : d, g = o.length;
|
|
52816
52856
|
if (u(this, f, v, e, o, i, n), c) {
|
|
@@ -52824,7 +52864,7 @@ class bm {
|
|
|
52824
52864
|
raycastFirst(e, t = $n, i = 0, n = 1 / 0) {
|
|
52825
52865
|
const r = this._roots, a = this.geometry, o = t.isMaterial, l = Array.isArray(t);
|
|
52826
52866
|
let c = null;
|
|
52827
|
-
const h = a.groups, d = o ? t.side : t, u = this.indirect ?
|
|
52867
|
+
const h = a.groups, d = o ? t.side : t, u = this.indirect ? II : yI;
|
|
52828
52868
|
for (let f = 0, m = r.length; f < m; f++) {
|
|
52829
52869
|
const v = l ? t[h[f].materialIndex].side : d, g = u(this, f, v, e, i, n);
|
|
52830
52870
|
g != null && (c == null || g.distance < c.distance) && (c = g, l && (g.face.materialIndex = h[f].materialIndex));
|
|
@@ -52833,13 +52873,13 @@ class bm {
|
|
|
52833
52873
|
}
|
|
52834
52874
|
intersectsGeometry(e, t) {
|
|
52835
52875
|
let i = !1;
|
|
52836
|
-
const n = this._roots, r = this.indirect ?
|
|
52876
|
+
const n = this._roots, r = this.indirect ? RI : _I;
|
|
52837
52877
|
for (let a = 0, o = n.length; a < o && (i = r(this, a, e, t), !i); a++)
|
|
52838
52878
|
;
|
|
52839
52879
|
return i;
|
|
52840
52880
|
}
|
|
52841
52881
|
shapecast(e) {
|
|
52842
|
-
const t = Ln.getPrimitive(), i = this.indirect ?
|
|
52882
|
+
const t = Ln.getPrimitive(), i = this.indirect ? vI : fI;
|
|
52843
52883
|
let {
|
|
52844
52884
|
boundsTraverseOrder: n,
|
|
52845
52885
|
intersectsBounds: r,
|
|
@@ -52855,7 +52895,7 @@ class bm {
|
|
|
52855
52895
|
const h = this._roots;
|
|
52856
52896
|
for (let d = 0, u = h.length; d < u; d++) {
|
|
52857
52897
|
const f = h[d];
|
|
52858
|
-
if (l =
|
|
52898
|
+
if (l = aI(this, d, r, a, n, c), l)
|
|
52859
52899
|
break;
|
|
52860
52900
|
c += f.byteLength;
|
|
52861
52901
|
}
|
|
@@ -52895,7 +52935,7 @@ class bm {
|
|
|
52895
52935
|
} else
|
|
52896
52936
|
n = m;
|
|
52897
52937
|
}
|
|
52898
|
-
return
|
|
52938
|
+
return FI(this, e, t, n);
|
|
52899
52939
|
}
|
|
52900
52940
|
/* Derived Cast Functions */
|
|
52901
52941
|
intersectsBox(e, t) {
|
|
@@ -52915,7 +52955,7 @@ class bm {
|
|
|
52915
52955
|
);
|
|
52916
52956
|
}
|
|
52917
52957
|
closestPointToGeometry(e, t, i = {}, n = {}, r = 0, a = 1 / 0) {
|
|
52918
|
-
return (this.indirect ?
|
|
52958
|
+
return (this.indirect ? BI : TI)(
|
|
52919
52959
|
this,
|
|
52920
52960
|
e,
|
|
52921
52961
|
t,
|
|
@@ -52926,7 +52966,7 @@ class bm {
|
|
|
52926
52966
|
);
|
|
52927
52967
|
}
|
|
52928
52968
|
closestPointToPoint(e, t = {}, i = 0, n = 1 / 0) {
|
|
52929
|
-
return
|
|
52969
|
+
return oI(
|
|
52930
52970
|
this,
|
|
52931
52971
|
e,
|
|
52932
52972
|
t,
|
|
@@ -52943,11 +52983,11 @@ class bm {
|
|
|
52943
52983
|
function Cv(s, e, t) {
|
|
52944
52984
|
return s === null ? null : (s.point.applyMatrix4(e.matrixWorld), s.distance = s.point.distanceTo(t.ray.origin), s.object = e, s);
|
|
52945
52985
|
}
|
|
52946
|
-
const Oh = /* @__PURE__ */ new Lo(), Iv = /* @__PURE__ */ new P(), Rv = /* @__PURE__ */ new Ee(),
|
|
52947
|
-
function
|
|
52948
|
-
this.isBatchedMesh ?
|
|
52986
|
+
const Oh = /* @__PURE__ */ new Lo(), Iv = /* @__PURE__ */ new P(), Rv = /* @__PURE__ */ new Ee(), VI = Q.prototype.raycast, kI = Yx.prototype.raycast, Dv = /* @__PURE__ */ new P(), Oi = /* @__PURE__ */ new Q(), Nh = [];
|
|
52987
|
+
function XI(s, e) {
|
|
52988
|
+
this.isBatchedMesh ? HI.call(this, s, e) : YI.call(this, s, e);
|
|
52949
52989
|
}
|
|
52950
|
-
function
|
|
52990
|
+
function HI(s, e) {
|
|
52951
52991
|
if (this.boundsTrees) {
|
|
52952
52992
|
const t = this.boundsTrees, i = this._drawInfo || this._instanceInfo, n = this._drawRanges || this._geometryInfo, r = this.matrixWorld;
|
|
52953
52993
|
Oi.material = this.material, Oi.geometry = this.geometry;
|
|
@@ -52971,9 +53011,9 @@ function kI(s, e) {
|
|
|
52971
53011
|
}
|
|
52972
53012
|
Oi.geometry.boundsTree = a, Oi.geometry.drawRange = o, Oi.material = null, Oi.geometry = null;
|
|
52973
53013
|
} else
|
|
52974
|
-
|
|
53014
|
+
kI.call(this, s, e);
|
|
52975
53015
|
}
|
|
52976
|
-
function
|
|
53016
|
+
function YI(s, e) {
|
|
52977
53017
|
if (this.geometry.boundsTree) {
|
|
52978
53018
|
if (this.material === void 0)
|
|
52979
53019
|
return;
|
|
@@ -52990,23 +53030,23 @@ function XI(s, e) {
|
|
|
52990
53030
|
}
|
|
52991
53031
|
}
|
|
52992
53032
|
} else
|
|
52993
|
-
|
|
53033
|
+
VI.call(this, s, e);
|
|
52994
53034
|
}
|
|
52995
|
-
function
|
|
53035
|
+
function GI(s = {}) {
|
|
52996
53036
|
return this.boundsTree = new bm(this, s), this.boundsTree;
|
|
52997
53037
|
}
|
|
52998
|
-
function
|
|
53038
|
+
function WI() {
|
|
52999
53039
|
this.boundsTree = null;
|
|
53000
53040
|
}
|
|
53001
|
-
class
|
|
53041
|
+
class QI {
|
|
53002
53042
|
constructor() {
|
|
53003
|
-
dt.prototype.computeBoundsTree =
|
|
53043
|
+
dt.prototype.computeBoundsTree = GI, dt.prototype.disposeBoundsTree = WI, Q.prototype.raycast = XI;
|
|
53004
53044
|
}
|
|
53005
53045
|
applyThreeMeshBVH(e) {
|
|
53006
53046
|
e.boundsTree || e.computeBoundsTree();
|
|
53007
53047
|
}
|
|
53008
53048
|
}
|
|
53009
|
-
class
|
|
53049
|
+
class jI {
|
|
53010
53050
|
constructor(e) {
|
|
53011
53051
|
this.viralViewerApi = e, this.hoverMaterial = new Jr({
|
|
53012
53052
|
color: At.hexToThreejsColor(je.secondary),
|
|
@@ -53057,7 +53097,7 @@ class WI {
|
|
|
53057
53097
|
}
|
|
53058
53098
|
}
|
|
53059
53099
|
}
|
|
53060
|
-
class
|
|
53100
|
+
class ZI {
|
|
53061
53101
|
constructor() {
|
|
53062
53102
|
this.events = {
|
|
53063
53103
|
[Ct.LOADED_SCENE]: [],
|
|
@@ -53081,7 +53121,7 @@ class QI {
|
|
|
53081
53121
|
i && i.forEach((n) => n(...t));
|
|
53082
53122
|
}
|
|
53083
53123
|
}
|
|
53084
|
-
class
|
|
53124
|
+
class qI {
|
|
53085
53125
|
constructor(e, t) {
|
|
53086
53126
|
this.viralViewerApi = e, this.options = t, this.viralViewerApi.on(
|
|
53087
53127
|
Ct.LOADED_SCENE,
|
|
@@ -53156,14 +53196,14 @@ const Lb = {
|
|
|
53156
53196
|
importLink: "https://fonts.googleapis.com/css2?family=Quicksand:wght@300&display=swap",
|
|
53157
53197
|
fontFamily: "Quicksand, sans-serif"
|
|
53158
53198
|
}
|
|
53159
|
-
},
|
|
53199
|
+
}, $I = (s) => {
|
|
53160
53200
|
const e = document.createElement("style");
|
|
53161
53201
|
e.innerHTML = `@import url(${Lb[s]});`, document.head.appendChild(e);
|
|
53162
|
-
},
|
|
53202
|
+
}, KI = (s, e) => {
|
|
53163
53203
|
let t = Lb[e];
|
|
53164
53204
|
s && t && (s.style.fontFamily = t.fontFamily);
|
|
53165
53205
|
};
|
|
53166
|
-
class
|
|
53206
|
+
class JI {
|
|
53167
53207
|
constructor(e) {
|
|
53168
53208
|
this.viralViewerApi = e, this.hoverMeshes = [], this.hoverInstancedMesh = null, this.selectedMeshes = [], this.selectedInstancedMeshes = [], this.isolateMeshes = [], this.isolateInstancedMeshes = [], this.hiddenMeshes = [], this.hiddenInstancedMeshes = [], this.exceptElements = [], this.isolateModelId = "0", this.sunConfiguration = zb, this._ground = null, this.opacity = 1, this._fog = new pd(13421772, 1, 1e3), this.rainGeometry = new dt(), this.rain = null, this._isGeneratedRain = !1, this._batchColors = /* @__PURE__ */ new Map(), this._originalBatchMaterials = /* @__PURE__ */ new Map(), this._batchVisualizationEnabled = !1, this.showHidePercentage = 100, this.randomColor = 100;
|
|
53169
53209
|
}
|
|
@@ -53894,7 +53934,7 @@ class bt {
|
|
|
53894
53934
|
return i && n && r;
|
|
53895
53935
|
}
|
|
53896
53936
|
}
|
|
53897
|
-
function
|
|
53937
|
+
function eR() {
|
|
53898
53938
|
class s {
|
|
53899
53939
|
constructor() {
|
|
53900
53940
|
this.children = /* @__PURE__ */ new Map(), this.keys = /* @__PURE__ */ new Set();
|
|
@@ -53926,10 +53966,10 @@ function KI() {
|
|
|
53926
53966
|
n(), self.postMessage(i);
|
|
53927
53967
|
};
|
|
53928
53968
|
}
|
|
53929
|
-
const
|
|
53930
|
-
class
|
|
53969
|
+
const tR = eR;
|
|
53970
|
+
class iR {
|
|
53931
53971
|
constructor() {
|
|
53932
|
-
const e = new Blob([`(${
|
|
53972
|
+
const e = new Blob([`(${tR})()`]), t = URL.createObjectURL(e);
|
|
53933
53973
|
this.workerPool = new wr(
|
|
53934
53974
|
2,
|
|
53935
53975
|
t
|
|
@@ -53942,7 +53982,7 @@ class eR {
|
|
|
53942
53982
|
});
|
|
53943
53983
|
}
|
|
53944
53984
|
}
|
|
53945
|
-
function
|
|
53985
|
+
function nR() {
|
|
53946
53986
|
self.addEventListener(
|
|
53947
53987
|
"message",
|
|
53948
53988
|
(s) => {
|
|
@@ -53976,10 +54016,10 @@ function tR() {
|
|
|
53976
54016
|
!1
|
|
53977
54017
|
);
|
|
53978
54018
|
}
|
|
53979
|
-
const
|
|
53980
|
-
class
|
|
54019
|
+
const sR = nR;
|
|
54020
|
+
class rR {
|
|
53981
54021
|
constructor() {
|
|
53982
|
-
const e = new Blob([`(${
|
|
54022
|
+
const e = new Blob([`(${sR})()`]), t = URL.createObjectURL(e);
|
|
53983
54023
|
this.workerPool = new wr(
|
|
53984
54024
|
2,
|
|
53985
54025
|
t
|
|
@@ -53987,18 +54027,18 @@ class nR {
|
|
|
53987
54027
|
}
|
|
53988
54028
|
fetch(e, t = (r) => {
|
|
53989
54029
|
}, i, n) {
|
|
53990
|
-
let r = new
|
|
54030
|
+
let r = new aR(e, i, n);
|
|
53991
54031
|
this.workerPool.Enqueue(r, (a) => {
|
|
53992
54032
|
t(a);
|
|
53993
54033
|
});
|
|
53994
54034
|
}
|
|
53995
54035
|
}
|
|
53996
|
-
class
|
|
54036
|
+
class aR {
|
|
53997
54037
|
constructor(e, t, i) {
|
|
53998
54038
|
this.url = "", this.url = e, this.byteRangeStart = t, this.byteRangeEnd = i;
|
|
53999
54039
|
}
|
|
54000
54040
|
}
|
|
54001
|
-
function
|
|
54041
|
+
function oR() {
|
|
54002
54042
|
class s {
|
|
54003
54043
|
constructor(t, i, n) {
|
|
54004
54044
|
this.X = 0, this.Y = 0, this.Z = 0, this.X = t, this.Y = i, this.Z = n;
|
|
@@ -54020,10 +54060,10 @@ function rR() {
|
|
|
54020
54060
|
self.postMessage(i());
|
|
54021
54061
|
};
|
|
54022
54062
|
}
|
|
54023
|
-
const
|
|
54024
|
-
class
|
|
54063
|
+
const lR = oR;
|
|
54064
|
+
class cR {
|
|
54025
54065
|
constructor() {
|
|
54026
|
-
const e = new Blob([`(${
|
|
54066
|
+
const e = new Blob([`(${lR})()`]), t = URL.createObjectURL(e);
|
|
54027
54067
|
this.workerPool = new wr(navigator.hardwareConcurrency || 10, t);
|
|
54028
54068
|
}
|
|
54029
54069
|
getBoundingBox(e, t = (i) => {
|
|
@@ -54036,7 +54076,7 @@ class oR {
|
|
|
54036
54076
|
);
|
|
54037
54077
|
}
|
|
54038
54078
|
}
|
|
54039
|
-
function
|
|
54079
|
+
function hR() {
|
|
54040
54080
|
self.onmessage = function(s) {
|
|
54041
54081
|
const e = s.data;
|
|
54042
54082
|
function t(n, r, a = 0.1) {
|
|
@@ -54054,10 +54094,10 @@ function lR() {
|
|
|
54054
54094
|
self.postMessage(i);
|
|
54055
54095
|
};
|
|
54056
54096
|
}
|
|
54057
|
-
const
|
|
54058
|
-
class
|
|
54097
|
+
const dR = hR;
|
|
54098
|
+
class uR {
|
|
54059
54099
|
constructor() {
|
|
54060
|
-
const e = new Blob([`(${
|
|
54100
|
+
const e = new Blob([`(${dR})()`]), t = URL.createObjectURL(e);
|
|
54061
54101
|
this.workerPool = new wr(4, t);
|
|
54062
54102
|
}
|
|
54063
54103
|
checkIntersect(e, t = (i) => {
|
|
@@ -54067,7 +54107,7 @@ class hR {
|
|
|
54067
54107
|
});
|
|
54068
54108
|
}
|
|
54069
54109
|
}
|
|
54070
|
-
function
|
|
54110
|
+
function fR() {
|
|
54071
54111
|
class s {
|
|
54072
54112
|
constructor(f, m, v) {
|
|
54073
54113
|
this.x = 0, this.y = 0, this.z = 0, this.x = f, this.y = m, this.z = v;
|
|
@@ -54149,10 +54189,10 @@ function dR() {
|
|
|
54149
54189
|
self.postMessage(!1);
|
|
54150
54190
|
};
|
|
54151
54191
|
}
|
|
54152
|
-
const
|
|
54153
|
-
class
|
|
54192
|
+
const pR = fR;
|
|
54193
|
+
class mR {
|
|
54154
54194
|
constructor() {
|
|
54155
|
-
const e = new Blob([`(${
|
|
54195
|
+
const e = new Blob([`(${pR})()`]), t = URL.createObjectURL(e);
|
|
54156
54196
|
this.workerPool = new wr(
|
|
54157
54197
|
navigator.hardwareConcurrency || 10,
|
|
54158
54198
|
t
|
|
@@ -54165,9 +54205,9 @@ class fR {
|
|
|
54165
54205
|
});
|
|
54166
54206
|
}
|
|
54167
54207
|
}
|
|
54168
|
-
class
|
|
54208
|
+
class gR {
|
|
54169
54209
|
constructor(e) {
|
|
54170
|
-
this.viralViewerApi = e, this.dataTree = [], this.trackingData = /* @__PURE__ */ new Map(), this.fetchDataWorker = new
|
|
54210
|
+
this.viralViewerApi = e, this.dataTree = [], this.trackingData = /* @__PURE__ */ new Map(), this.fetchDataWorker = new rR(), this.buildTreeNodeWorker = new iR(), this._boundingBoxWorker = new cR(), this._boundingBoxIntersectWorker = new uR(), this._checkClashWorker = new mR(), this.searchValue = "", this.firstElementId = "211850", this.secondElementId = "680539", this.groupByKeyword = "Category", this._shallowCompare = (t, i) => JSON.stringify(Object.keys(t).sort()) === JSON.stringify(Object.keys(i).sort()) && JSON.stringify(Object.values(t).sort()) === JSON.stringify(Object.values(i).sort());
|
|
54171
54211
|
}
|
|
54172
54212
|
addTrackingData(e, t) {
|
|
54173
54213
|
this.trackingData.set(e, t);
|
|
@@ -54472,7 +54512,7 @@ class pR {
|
|
|
54472
54512
|
}
|
|
54473
54513
|
//#endregion
|
|
54474
54514
|
}
|
|
54475
|
-
class
|
|
54515
|
+
class vR {
|
|
54476
54516
|
constructor(e) {
|
|
54477
54517
|
this.viralViewerApi = e, this.spinner = null, this.logo = `<svg
|
|
54478
54518
|
width="348.25488"
|
|
@@ -54547,7 +54587,7 @@ class mR {
|
|
|
54547
54587
|
this.spinner && this.spinner.style.setProperty("display", "none");
|
|
54548
54588
|
}
|
|
54549
54589
|
}
|
|
54550
|
-
class
|
|
54590
|
+
class xR {
|
|
54551
54591
|
constructor(e) {
|
|
54552
54592
|
this.viralViewerApi = e, this.modal = null, this.modalTitle = null, this.modalBody = null, this.modalBodyLeft = null, this.modalBodyRight = null, this.properties = {}, this.rawModal = `<div class="modal" id="myModal">
|
|
54553
54593
|
<div class="modal-content">
|
|
@@ -54653,7 +54693,7 @@ class gR {
|
|
|
54653
54693
|
}
|
|
54654
54694
|
}
|
|
54655
54695
|
}
|
|
54656
|
-
class
|
|
54696
|
+
class bR {
|
|
54657
54697
|
constructor(e) {
|
|
54658
54698
|
this.viralTools = e;
|
|
54659
54699
|
}
|
|
@@ -54662,7 +54702,7 @@ class vR {
|
|
|
54662
54702
|
e.activate && console.log((t = this.viralTools.viralViewerApi.viralCamera.camera) == null ? void 0 : t.position);
|
|
54663
54703
|
}
|
|
54664
54704
|
}
|
|
54665
|
-
class
|
|
54705
|
+
class yR {
|
|
54666
54706
|
constructor(e) {
|
|
54667
54707
|
this.viralTools = e;
|
|
54668
54708
|
}
|
|
@@ -54670,7 +54710,7 @@ class xR {
|
|
|
54670
54710
|
this.viralTools.viralViewerApi.targetElement && e.activate;
|
|
54671
54711
|
}
|
|
54672
54712
|
}
|
|
54673
|
-
class
|
|
54713
|
+
class _R {
|
|
54674
54714
|
constructor(e) {
|
|
54675
54715
|
this.viralTools = e;
|
|
54676
54716
|
}
|
|
@@ -54678,7 +54718,7 @@ class bR {
|
|
|
54678
54718
|
this.viralTools.viralViewerApi.targetElement && (e.activate ? this.viralTools.viralViewerApi.targetElement.style.setProperty("background-color", "#303030") : this.viralTools.viralViewerApi.targetElement.style.setProperty("background-color", "unset"), this.viralTools.viralViewerApi.localStorageService.setObject("viral-viewer-tool", this.viralTools.tools));
|
|
54679
54719
|
}
|
|
54680
54720
|
}
|
|
54681
|
-
class
|
|
54721
|
+
class wR {
|
|
54682
54722
|
constructor(e) {
|
|
54683
54723
|
this.viralTools = e, this.isActivated = !1;
|
|
54684
54724
|
}
|
|
@@ -54698,7 +54738,7 @@ class yR {
|
|
|
54698
54738
|
}
|
|
54699
54739
|
}
|
|
54700
54740
|
}
|
|
54701
|
-
class
|
|
54741
|
+
class SR {
|
|
54702
54742
|
constructor(e) {
|
|
54703
54743
|
this.viralTools = e, this.viralToolMeasureScene = new oc(), this.isActivated = !1, this.measures = [], this.point1 = null, this.point2 = null, this.tempPoint2 = null, this.defaultSprite = this.makeSprite(), this.measureObject = new Q(), this.tempMeasure = new Q(), this.tempSprite1 = null, this.tempLine = null, this.tempSprite2 = null;
|
|
54704
54744
|
}
|
|
@@ -54798,7 +54838,7 @@ class _R {
|
|
|
54798
54838
|
e.code == "Escape" && (At.clearChildren(this.tempMeasure), this.point1 = null, this.point2 = null, this.tempPoint2 = null, this.viralTools.viralViewerApi.viralRenderer.render());
|
|
54799
54839
|
}
|
|
54800
54840
|
}
|
|
54801
|
-
class
|
|
54841
|
+
class MR {
|
|
54802
54842
|
constructor(e) {
|
|
54803
54843
|
this.viralTools = e;
|
|
54804
54844
|
}
|
|
@@ -54834,7 +54874,7 @@ class wR {
|
|
|
54834
54874
|
}
|
|
54835
54875
|
}
|
|
54836
54876
|
}
|
|
54837
|
-
class
|
|
54877
|
+
class AR {
|
|
54838
54878
|
constructor(e) {
|
|
54839
54879
|
this.viralViewerApi = e, this.tools = [
|
|
54840
54880
|
{
|
|
@@ -54938,7 +54978,7 @@ class SR {
|
|
|
54938
54978
|
}
|
|
54939
54979
|
]
|
|
54940
54980
|
}
|
|
54941
|
-
], this.items = [], this.viralToolAvatar = new
|
|
54981
|
+
], this.items = [], this.viralToolAvatar = new yR(this), this.viralToolDarkMode = new _R(this), this.viralToolSunlight = new MR(this), this.viralToolElevation = new wR(this), this.viralToolMeasure = new SR(this), this.viralToolAmbientOcclusion = new bR(this), this.dehydratedCachedData(), this.executeToolsByDefault(), this.injectTools(), this.viralViewerApi.emit(Ct.LOADED_TOOLS);
|
|
54942
54982
|
}
|
|
54943
54983
|
//#region Init
|
|
54944
54984
|
injectTools() {
|
|
@@ -55025,7 +55065,7 @@ class SR {
|
|
|
55025
55065
|
}
|
|
55026
55066
|
//#endregion
|
|
55027
55067
|
}
|
|
55028
|
-
class
|
|
55068
|
+
class TR {
|
|
55029
55069
|
constructor(e) {
|
|
55030
55070
|
this.viralNavigationCube = e, this.camera = null, this.cameraControls = null, this.cameraControlOldPosition = new P(), this.cameraControlNewPosition = new P(), this.cameraControlHasMoved = !1, this.setupCamera(), this.setupHandle();
|
|
55031
55071
|
}
|
|
@@ -55056,7 +55096,7 @@ class MR {
|
|
|
55056
55096
|
window.addEventListener("mousedown", e, !1), window.addEventListener("mousemove", t, !1), window.addEventListener("touchstart", e, !1), window.addEventListener("touchmove", t, !0);
|
|
55057
55097
|
}
|
|
55058
55098
|
}
|
|
55059
|
-
class
|
|
55099
|
+
class ER {
|
|
55060
55100
|
constructor(e) {
|
|
55061
55101
|
this.viralNavigationCube = e, this.renderer = new bb({
|
|
55062
55102
|
alpha: !0,
|
|
@@ -55085,7 +55125,7 @@ class AR {
|
|
|
55085
55125
|
// }
|
|
55086
55126
|
// }
|
|
55087
55127
|
}
|
|
55088
|
-
class
|
|
55128
|
+
class PR {
|
|
55089
55129
|
constructor(e) {
|
|
55090
55130
|
this.viralNavigationCube = e, this.scene = new oc(), this.objects = [], this.cube = null, this.activePlane = null, this.addCube(), this.addPlanes();
|
|
55091
55131
|
}
|
|
@@ -55265,7 +55305,7 @@ class TR {
|
|
|
55265
55305
|
mi.name = "corner8", mi.add(M), mi.add(q), mi.add(H), this.addObject(mi);
|
|
55266
55306
|
}
|
|
55267
55307
|
}
|
|
55268
|
-
class
|
|
55308
|
+
class CR {
|
|
55269
55309
|
constructor(e) {
|
|
55270
55310
|
this.viralNavigationCube = e, this._mouseDownTime = null, this.clickThreshold = 250, this._handleClick = async (t) => {
|
|
55271
55311
|
var h, d, u, f, m, v, g, p, y, x, b, _, w, A, E, S, M, C, L, U, z;
|
|
@@ -55435,10 +55475,10 @@ class ER {
|
|
|
55435
55475
|
}
|
|
55436
55476
|
//#endregion
|
|
55437
55477
|
}
|
|
55438
|
-
class
|
|
55478
|
+
class IR {
|
|
55439
55479
|
//* view cube from third party (new approach)
|
|
55440
55480
|
constructor(e) {
|
|
55441
|
-
this.viralViewerApi = e, this.targetElement = null, this.cubeScene = null, this.cubeRenderer = null, this.cubeCamera = null, this.cubeMouse = null, this.injectCubeWrapperElement(), this.targetElement = document.getElementById("orientCubeWrapper"), this.targetElement && (this.cubeScene = new
|
|
55481
|
+
this.viralViewerApi = e, this.targetElement = null, this.cubeScene = null, this.cubeRenderer = null, this.cubeCamera = null, this.cubeMouse = null, this.injectCubeWrapperElement(), this.targetElement = document.getElementById("orientCubeWrapper"), this.targetElement && (this.cubeScene = new PR(this), this.cubeRenderer = new ER(this), this.cubeCamera = new TR(this), this.cubeMouse = new CR(this)), this.viralViewerApi.emit(Ct.LOADED_CUBE);
|
|
55442
55482
|
}
|
|
55443
55483
|
injectCubeWrapperElement() {
|
|
55444
55484
|
if (this.viralViewerApi.targetElement) {
|
|
@@ -55459,7 +55499,7 @@ class PR {
|
|
|
55459
55499
|
this.viralViewerApi.viralCamera.focusModelByName();
|
|
55460
55500
|
}
|
|
55461
55501
|
}
|
|
55462
|
-
class
|
|
55502
|
+
class RR {
|
|
55463
55503
|
static generateRandomString(e) {
|
|
55464
55504
|
const t = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
|
|
55465
55505
|
let i = "";
|
|
@@ -55470,16 +55510,16 @@ class CR {
|
|
|
55470
55510
|
return i;
|
|
55471
55511
|
}
|
|
55472
55512
|
}
|
|
55473
|
-
const
|
|
55474
|
-
class
|
|
55513
|
+
const DR = 0.032;
|
|
55514
|
+
class LR {
|
|
55475
55515
|
constructor(e, t, i, n, r = 2, a = 1, o, l) {
|
|
55476
|
-
this.viralViewerApi = e, this.scaleRatio = r, this.mixer = null, this.idleAnimation = null, this.walkAnimation = null, this.avatar = null, this.destination = null, this.isReady = !1, this.name = "", this.id =
|
|
55516
|
+
this.viralViewerApi = e, this.scaleRatio = r, this.mixer = null, this.idleAnimation = null, this.walkAnimation = null, this.avatar = null, this.destination = null, this.isReady = !1, this.name = "", this.id = RR.generateRandomString(10), this.MOVEMENT_SPEED = 0.032, this.talkContent = "", o && (this.id = o), l && (this.name = l, this.nameDiv = document.createElement("div"), this.nameDiv.setAttribute(
|
|
55477
55517
|
"style",
|
|
55478
55518
|
"position: absolute; top:0; left:0;transform: translateX(-50%); pointer-events: none; background-color:rgba(226, 230, 220,1); color:rgb(23, 49, 44); padding: 5px ; border-radius:5px; font-size:x-small"
|
|
55479
55519
|
), this.nameDiv.id = this.id, this.nameDiv.append(this.name), this.viralViewerApi.targetElement.appendChild(this.nameDiv)), this.chatDiv = document.createElement("div"), this.chatDiv.setAttribute(
|
|
55480
55520
|
"style",
|
|
55481
55521
|
"position: absolute;display:none; top:0; left:0;transform: translate(-50%, -100%); pointer-events: none; background-color:rgba(226, 230, 220,1); color:rgb(23, 49, 44); padding: 5px ; border-radius:5px; font-size:x-small"
|
|
55482
|
-
), this.viralViewerApi.targetElement.appendChild(this.chatDiv), this.MOVEMENT_SPEED =
|
|
55522
|
+
), this.viralViewerApi.targetElement.appendChild(this.chatDiv), this.MOVEMENT_SPEED = DR * a, this.viralViewerApi.viralLoader.threeLoader.loadGLTF(
|
|
55483
55523
|
t,
|
|
55484
55524
|
(c) => {
|
|
55485
55525
|
this.avatar = c.scene;
|
|
@@ -55553,12 +55593,12 @@ class RR {
|
|
|
55553
55593
|
(e = this.avatar) == null || e.removeFromParent(), this.mixer = null, this.walkAnimation = null, this.avatar = null, (i = (t = this.nameDiv) == null ? void 0 : t.parentNode) == null || i.removeChild(this.nameDiv), (r = (n = this.chatDiv) == null ? void 0 : n.parentNode) == null || r.removeChild(this.chatDiv);
|
|
55554
55594
|
}
|
|
55555
55595
|
}
|
|
55556
|
-
class
|
|
55596
|
+
class OR {
|
|
55557
55597
|
constructor(e) {
|
|
55558
55598
|
this.viralViewerApi = e, this.avatars = [];
|
|
55559
55599
|
}
|
|
55560
55600
|
load(e, t, i, n = 2, r = 1, a, o) {
|
|
55561
|
-
let l = new
|
|
55601
|
+
let l = new LR(
|
|
55562
55602
|
this.viralViewerApi,
|
|
55563
55603
|
e,
|
|
55564
55604
|
t,
|
|
@@ -55575,7 +55615,7 @@ class DR {
|
|
|
55575
55615
|
t && t.dispose(), this.avatars = this.avatars.filter((i) => i.id != e);
|
|
55576
55616
|
}
|
|
55577
55617
|
}
|
|
55578
|
-
class
|
|
55618
|
+
class NR {
|
|
55579
55619
|
constructor(e) {
|
|
55580
55620
|
this.viralViewerApi = e, this.isGeneratingMergeModel = !1;
|
|
55581
55621
|
}
|
|
@@ -55710,7 +55750,7 @@ class LR {
|
|
|
55710
55750
|
}), this.viralViewerApi.options.isDev && Pi.memory("merge model successfully!"), this.viralViewerApi.viralScene.mergedModel.setReady(!0), this.isGeneratingMergeModel = !1, console.log(this.viralViewerApi.viralScene.mergedModel.children), console.log("Time to generate model: ", performance.now() - e), this.viralViewerApi.emit(Ct.GENERATED_MERGE_MODEL);
|
|
55711
55751
|
}
|
|
55712
55752
|
}
|
|
55713
|
-
class
|
|
55753
|
+
class BR {
|
|
55714
55754
|
constructor(e) {
|
|
55715
55755
|
this.viralViewerApi = e, this.planeEdges = null, this._isGenerated = !1, this.planeMaterial = new Ci({
|
|
55716
55756
|
color: 16777215,
|
|
@@ -55807,7 +55847,7 @@ class OR {
|
|
|
55807
55847
|
this.createPlaneEdges();
|
|
55808
55848
|
}
|
|
55809
55849
|
}
|
|
55810
|
-
class
|
|
55850
|
+
class UR {
|
|
55811
55851
|
constructor(e) {
|
|
55812
55852
|
this.viralViewerApi = e, this.contextMenu = null, this.injectContextMenu();
|
|
55813
55853
|
}
|
|
@@ -55824,7 +55864,7 @@ class NR {
|
|
|
55824
55864
|
this.contextMenu && this.contextMenu.style.setProperty("display", "none");
|
|
55825
55865
|
}
|
|
55826
55866
|
}
|
|
55827
|
-
class
|
|
55867
|
+
class FR {
|
|
55828
55868
|
constructor(e) {
|
|
55829
55869
|
this.viralViewerApi = e, this.panel = null, this.batchListContainer = null, this.isVisible = !1, this.selectedBatchMesh = null, this.inject();
|
|
55830
55870
|
}
|
|
@@ -56043,7 +56083,7 @@ class BR {
|
|
|
56043
56083
|
this.clearIsolation(), this.panel && (this.panel.remove(), this.panel = null);
|
|
56044
56084
|
}
|
|
56045
56085
|
}
|
|
56046
|
-
class
|
|
56086
|
+
class sD extends ZI {
|
|
56047
56087
|
constructor(e = {
|
|
56048
56088
|
isDev: !1,
|
|
56049
56089
|
cameraZUp: !1,
|
|
@@ -56053,12 +56093,12 @@ class iD extends QI {
|
|
|
56053
56093
|
enableTools: !0,
|
|
56054
56094
|
enablePostProcessing: !0
|
|
56055
56095
|
}) {
|
|
56056
|
-
super(), this.viralCompressProcessor = new yw(), this.localStorageService = new
|
|
56096
|
+
super(), this.viralCompressProcessor = new yw(), this.localStorageService = new p3(), this.viralStats = null, this.viralGeometryHandler = null, this.viralSectionBox = null, this.viralBatchDebugPanel = null, this.options = e, this.viralLifecycleEventHandler = new qI(
|
|
56057
56097
|
this,
|
|
56058
56098
|
this.options
|
|
56059
|
-
), this.targetElement = e.container,
|
|
56099
|
+
), this.targetElement = e.container, $I("QUICK_SAND"), KI(this.targetElement, "QUICK_SAND"), this.options.enableTools && (this.viralTools = new AR(this)), this.viralSpinner = new vR(this), this.viralDraggableModal = new xR(this), this.viralContextMenu = new g3(this), this.viralPivotPoint = new UR(this), this.viralScene = new kC(this), this.viralMaterialManager = new jI(this), this.viralRenderer = new u3(this), this.viralCamera = new xP(this), this.options.enableNavigationCube && (this.viralNavigationCube = new IR(this)), this.viralMouse = new FC(this), this.viralKeyboard = new m3(this), this.viralAnimation = new f3(this), this.viralVisibilityManager = new JI(this), this.viralCentralizedEventHandler = new v3(this), this.viralLoader = new N3(this), this.viralBVH = new QI(), this.viralDataManager = new gR(this), this.viralAvatarManager = new OR(this), this.options.isDev && (this.viralStats = new B3(this)), this.options.isDev ? this.viralAnimation.devAnimation() : this.viralAnimation.animation();
|
|
56060
56100
|
let t = window;
|
|
56061
|
-
t.VIRAL_VIEWER = this, this.viralGeometryHandler = new
|
|
56101
|
+
t.VIRAL_VIEWER = this, this.viralGeometryHandler = new NR(this), this.viralSectionBox = new BR(this), this.viralBatchDebugPanel = new FR(this), this.options.isDev && import("./lil-gui.esm-BtfdsiIY.mjs").then(({ GUI: i }) => {
|
|
56062
56102
|
var m, v, g, p, y;
|
|
56063
56103
|
const n = new i({ title: "Controls" }), r = n.addFolder("Sun Light");
|
|
56064
56104
|
r.add(this.viralScene.sunLight, "visible").onChange(() => {
|
|
@@ -56438,9 +56478,9 @@ class ia {
|
|
|
56438
56478
|
return i;
|
|
56439
56479
|
}
|
|
56440
56480
|
}
|
|
56441
|
-
const
|
|
56481
|
+
const zR = {}, Kr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
56442
56482
|
__proto__: null,
|
|
56443
|
-
default:
|
|
56483
|
+
default: zR
|
|
56444
56484
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
56445
56485
|
class Yi {
|
|
56446
56486
|
constructor() {
|
|
@@ -56627,7 +56667,7 @@ class hr {
|
|
|
56627
56667
|
return hr.startViralutionInformation(e), hr.addData(e, t), hr.endViralutionInformation(e);
|
|
56628
56668
|
}
|
|
56629
56669
|
}
|
|
56630
|
-
class
|
|
56670
|
+
class VR {
|
|
56631
56671
|
/**
|
|
56632
56672
|
* Reads a FlatBuffer from a URL and parses it into the elementData structure
|
|
56633
56673
|
* @param url - Full URL or path to fetch the .fb file from
|
|
@@ -57415,17 +57455,17 @@ export {
|
|
|
57415
57455
|
dt as B,
|
|
57416
57456
|
kb as C,
|
|
57417
57457
|
Gr as D,
|
|
57418
|
-
|
|
57419
|
-
|
|
57458
|
+
YR as E,
|
|
57459
|
+
HR as F,
|
|
57420
57460
|
Hb as G,
|
|
57421
57461
|
Md as H,
|
|
57422
|
-
|
|
57462
|
+
$R as I,
|
|
57423
57463
|
Pi as L,
|
|
57424
57464
|
Mm as T,
|
|
57425
57465
|
Jn as V,
|
|
57426
57466
|
ot as a,
|
|
57427
|
-
|
|
57428
|
-
|
|
57467
|
+
XR as b,
|
|
57468
|
+
GR as c,
|
|
57429
57469
|
fs as d,
|
|
57430
57470
|
yi as e,
|
|
57431
57471
|
Ds as f,
|
|
@@ -57436,16 +57476,16 @@ export {
|
|
|
57436
57476
|
wm as k,
|
|
57437
57477
|
Sp as l,
|
|
57438
57478
|
Nv as m,
|
|
57439
|
-
|
|
57479
|
+
qR as n,
|
|
57440
57480
|
Fb as o,
|
|
57441
57481
|
Sm as p,
|
|
57442
57482
|
zb as q,
|
|
57443
57483
|
Vb as r,
|
|
57444
57484
|
Xb as s,
|
|
57445
|
-
|
|
57485
|
+
sD as t,
|
|
57446
57486
|
At as u,
|
|
57447
|
-
|
|
57487
|
+
nD as v,
|
|
57448
57488
|
UC as w,
|
|
57449
|
-
|
|
57489
|
+
VR as x,
|
|
57450
57490
|
wp as y
|
|
57451
57491
|
};
|