vim-web 0.3.44-dev.1 → 0.3.44-dev.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/style.css +38 -1
- package/dist/types/core-viewers/ultra/index.d.ts +1 -1
- package/dist/types/core-viewers/ultra/utils/math3d.d.ts +11 -51
- package/dist/types/core-viewers/ultra/viewer/marshal.d.ts +0 -1
- package/dist/types/core-viewers/ultra/viewer/rpcClient.d.ts +1 -0
- package/dist/types/core-viewers/ultra/viewer/rpcSafeClient.d.ts +1 -0
- package/dist/types/core-viewers/ultra/viewer/sectionBox.d.ts +2 -5
- package/dist/types/core-viewers/ultra/viewer/selection.d.ts +2 -0
- package/dist/types/core-viewers/ultra/viewer/viewer.d.ts +2 -0
- package/dist/types/core-viewers/ultra/viewer/vimCollection.d.ts +4 -0
- package/dist/types/core-viewers/webgl/utils/threeUtils.d.ts +3 -0
- package/dist/types/core-viewers/webgl/viewer/gizmos/gizmos.d.ts +1 -1
- package/dist/types/core-viewers/webgl/viewer/gizmos/sectionBox/sectionBox.d.ts +1 -1
- package/dist/types/core-viewers/webgl/viewer/gizmos/sectionBox/sectionBoxGizmo.d.ts +2 -1
- package/dist/types/core-viewers/webgl/viewer/gizmos/sectionBox/sectionBoxHandle.d.ts +3 -0
- package/dist/types/core-viewers/webgl/viewer/gizmos/sectionBox/sectionBoxHandles.d.ts +2 -1
- package/dist/types/react-viewers/controlbar/controlBar.d.ts +6 -44
- package/dist/types/react-viewers/controlbar/controlBarButton.d.ts +3 -1
- package/dist/types/react-viewers/controlbar/controlBarIds.d.ts +27 -0
- package/dist/types/react-viewers/controlbar/controlBarSection.d.ts +2 -1
- package/dist/types/react-viewers/helpers/reactUtils.d.ts +14 -0
- package/dist/types/react-viewers/panels/icons.d.ts +6 -0
- package/dist/types/react-viewers/panels/sectionBoxPanel.d.ts +4 -0
- package/dist/types/react-viewers/state/controlBarState.d.ts +39 -0
- package/dist/types/react-viewers/state/sectionBoxState.d.ts +31 -0
- package/dist/types/react-viewers/ultra/ultraComponent.d.ts +18 -0
- package/dist/types/react-viewers/ultra/ultraControlBarState.d.ts +6 -0
- package/dist/types/react-viewers/ultra/ultraModal.d.ts +4 -0
- package/dist/types/react-viewers/ultra/ultraSectionBoxState.d.ts +3 -0
- package/dist/types/react-viewers/webgl/index.d.ts +0 -1
- package/dist/types/react-viewers/webgl/webglComponentRef.d.ts +5 -0
- package/dist/types/react-viewers/webgl/webglSectionBoxState.d.ts +3 -0
- package/dist/vim-web.iife.js +1283 -1014
- package/dist/vim-web.iife.js.map +1 -1
- package/dist/vim-web.js +1302 -1033
- package/dist/vim-web.js.map +1 -1
- package/package.json +1 -1
- package/dist/types/react-viewers/controlbar/controlBarCommands.d.ts +0 -4
- package/dist/types/react-viewers/controlbar/sectionBoxState.d.ts +0 -15
- /package/dist/types/react-viewers/{controlbar → panels}/restOfScreen.d.ts +0 -0
- /package/dist/types/react-viewers/{controlbar → state}/fullScreenState.d.ts +0 -0
- /package/dist/types/react-viewers/{controlbar → state}/measureState.d.ts +0 -0
- /package/dist/types/react-viewers/{controlbar → state}/pointerState.d.ts +0 -0
package/dist/vim-web.iife.js
CHANGED
|
@@ -13866,9 +13866,9 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
13866
13866
|
normalize: normalize$1,
|
|
13867
13867
|
denormalize
|
|
13868
13868
|
};
|
|
13869
|
-
|
|
13869
|
+
class Vector2 {
|
|
13870
13870
|
constructor(x = 0, y = 0) {
|
|
13871
|
-
|
|
13871
|
+
Vector2.prototype.isVector2 = true;
|
|
13872
13872
|
this.x = x;
|
|
13873
13873
|
this.y = y;
|
|
13874
13874
|
}
|
|
@@ -14128,7 +14128,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
14128
14128
|
yield this.x;
|
|
14129
14129
|
yield this.y;
|
|
14130
14130
|
}
|
|
14131
|
-
}
|
|
14131
|
+
}
|
|
14132
14132
|
class Matrix3 {
|
|
14133
14133
|
constructor(n11, n12, n13, n21, n22, n23, n31, n32, n33) {
|
|
14134
14134
|
Matrix3.prototype.isMatrix3 = true;
|
|
@@ -14764,9 +14764,9 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
14764
14764
|
this.format = format;
|
|
14765
14765
|
this.internalFormat = null;
|
|
14766
14766
|
this.type = type;
|
|
14767
|
-
this.offset = new Vector2
|
|
14768
|
-
this.repeat = new Vector2
|
|
14769
|
-
this.center = new Vector2
|
|
14767
|
+
this.offset = new Vector2(0, 0);
|
|
14768
|
+
this.repeat = new Vector2(1, 1);
|
|
14769
|
+
this.center = new Vector2(0, 0);
|
|
14770
14770
|
this.rotation = 0;
|
|
14771
14771
|
this.matrixAutoUpdate = true;
|
|
14772
14772
|
this.matrix = new Matrix3();
|
|
@@ -15851,9 +15851,9 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
15851
15851
|
yield this._w;
|
|
15852
15852
|
}
|
|
15853
15853
|
}
|
|
15854
|
-
|
|
15854
|
+
class Vector3 {
|
|
15855
15855
|
constructor(x = 0, y = 0, z = 0) {
|
|
15856
|
-
|
|
15856
|
+
Vector3.prototype.isVector3 = true;
|
|
15857
15857
|
this.x = x;
|
|
15858
15858
|
this.y = y;
|
|
15859
15859
|
this.z = z;
|
|
@@ -16263,11 +16263,11 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
16263
16263
|
yield this.y;
|
|
16264
16264
|
yield this.z;
|
|
16265
16265
|
}
|
|
16266
|
-
}
|
|
16267
|
-
const _vector$c = /* @__PURE__ */ new Vector3
|
|
16266
|
+
}
|
|
16267
|
+
const _vector$c = /* @__PURE__ */ new Vector3();
|
|
16268
16268
|
const _quaternion$4 = /* @__PURE__ */ new Quaternion();
|
|
16269
|
-
|
|
16270
|
-
constructor(min2 = new Vector3
|
|
16269
|
+
class Box3 {
|
|
16270
|
+
constructor(min2 = new Vector3(Infinity, Infinity, Infinity), max2 = new Vector3(-Infinity, -Infinity, -Infinity)) {
|
|
16271
16271
|
this.isBox3 = true;
|
|
16272
16272
|
this.min = min2;
|
|
16273
16273
|
this.max = max2;
|
|
@@ -16526,29 +16526,29 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
16526
16526
|
equals(box) {
|
|
16527
16527
|
return box.min.equals(this.min) && box.max.equals(this.max);
|
|
16528
16528
|
}
|
|
16529
|
-
}
|
|
16529
|
+
}
|
|
16530
16530
|
const _points = [
|
|
16531
|
-
/* @__PURE__ */ new Vector3
|
|
16532
|
-
/* @__PURE__ */ new Vector3
|
|
16533
|
-
/* @__PURE__ */ new Vector3
|
|
16534
|
-
/* @__PURE__ */ new Vector3
|
|
16535
|
-
/* @__PURE__ */ new Vector3
|
|
16536
|
-
/* @__PURE__ */ new Vector3
|
|
16537
|
-
/* @__PURE__ */ new Vector3
|
|
16538
|
-
/* @__PURE__ */ new Vector3
|
|
16531
|
+
/* @__PURE__ */ new Vector3(),
|
|
16532
|
+
/* @__PURE__ */ new Vector3(),
|
|
16533
|
+
/* @__PURE__ */ new Vector3(),
|
|
16534
|
+
/* @__PURE__ */ new Vector3(),
|
|
16535
|
+
/* @__PURE__ */ new Vector3(),
|
|
16536
|
+
/* @__PURE__ */ new Vector3(),
|
|
16537
|
+
/* @__PURE__ */ new Vector3(),
|
|
16538
|
+
/* @__PURE__ */ new Vector3()
|
|
16539
16539
|
];
|
|
16540
|
-
const _vector$b = /* @__PURE__ */ new Vector3
|
|
16541
|
-
const _box$4 = /* @__PURE__ */ new Box3
|
|
16542
|
-
const _v0$2 = /* @__PURE__ */ new Vector3
|
|
16543
|
-
const _v1$7 = /* @__PURE__ */ new Vector3
|
|
16544
|
-
const _v2$4 = /* @__PURE__ */ new Vector3
|
|
16545
|
-
const _f0 = /* @__PURE__ */ new Vector3
|
|
16546
|
-
const _f1 = /* @__PURE__ */ new Vector3
|
|
16547
|
-
const _f2 = /* @__PURE__ */ new Vector3
|
|
16548
|
-
const _center = /* @__PURE__ */ new Vector3
|
|
16549
|
-
const _extents = /* @__PURE__ */ new Vector3
|
|
16550
|
-
const _triangleNormal = /* @__PURE__ */ new Vector3
|
|
16551
|
-
const _testAxis = /* @__PURE__ */ new Vector3
|
|
16540
|
+
const _vector$b = /* @__PURE__ */ new Vector3();
|
|
16541
|
+
const _box$4 = /* @__PURE__ */ new Box3();
|
|
16542
|
+
const _v0$2 = /* @__PURE__ */ new Vector3();
|
|
16543
|
+
const _v1$7 = /* @__PURE__ */ new Vector3();
|
|
16544
|
+
const _v2$4 = /* @__PURE__ */ new Vector3();
|
|
16545
|
+
const _f0 = /* @__PURE__ */ new Vector3();
|
|
16546
|
+
const _f1 = /* @__PURE__ */ new Vector3();
|
|
16547
|
+
const _f2 = /* @__PURE__ */ new Vector3();
|
|
16548
|
+
const _center = /* @__PURE__ */ new Vector3();
|
|
16549
|
+
const _extents = /* @__PURE__ */ new Vector3();
|
|
16550
|
+
const _triangleNormal = /* @__PURE__ */ new Vector3();
|
|
16551
|
+
const _testAxis = /* @__PURE__ */ new Vector3();
|
|
16552
16552
|
function satForAxes(axes, v0, v1, v2, extents) {
|
|
16553
16553
|
for (let i2 = 0, j = axes.length - 3; i2 <= j; i2 += 3) {
|
|
16554
16554
|
_testAxis.fromArray(axes, i2);
|
|
@@ -16562,11 +16562,11 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
16562
16562
|
}
|
|
16563
16563
|
return true;
|
|
16564
16564
|
}
|
|
16565
|
-
const _box$3 = /* @__PURE__ */ new Box3
|
|
16566
|
-
const _v1$6 = /* @__PURE__ */ new Vector3
|
|
16567
|
-
const _v2$3 = /* @__PURE__ */ new Vector3
|
|
16565
|
+
const _box$3 = /* @__PURE__ */ new Box3();
|
|
16566
|
+
const _v1$6 = /* @__PURE__ */ new Vector3();
|
|
16567
|
+
const _v2$3 = /* @__PURE__ */ new Vector3();
|
|
16568
16568
|
class Sphere {
|
|
16569
|
-
constructor(center = new Vector3
|
|
16569
|
+
constructor(center = new Vector3(), radius = -1) {
|
|
16570
16570
|
this.isSphere = true;
|
|
16571
16571
|
this.center = center;
|
|
16572
16572
|
this.radius = radius;
|
|
@@ -16686,15 +16686,15 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
16686
16686
|
return new this.constructor().copy(this);
|
|
16687
16687
|
}
|
|
16688
16688
|
}
|
|
16689
|
-
const _vector$a = /* @__PURE__ */ new Vector3
|
|
16690
|
-
const _segCenter = /* @__PURE__ */ new Vector3
|
|
16691
|
-
const _segDir = /* @__PURE__ */ new Vector3
|
|
16692
|
-
const _diff = /* @__PURE__ */ new Vector3
|
|
16693
|
-
const _edge1 = /* @__PURE__ */ new Vector3
|
|
16694
|
-
const _edge2 = /* @__PURE__ */ new Vector3
|
|
16695
|
-
const _normal$1 = /* @__PURE__ */ new Vector3
|
|
16689
|
+
const _vector$a = /* @__PURE__ */ new Vector3();
|
|
16690
|
+
const _segCenter = /* @__PURE__ */ new Vector3();
|
|
16691
|
+
const _segDir = /* @__PURE__ */ new Vector3();
|
|
16692
|
+
const _diff = /* @__PURE__ */ new Vector3();
|
|
16693
|
+
const _edge1 = /* @__PURE__ */ new Vector3();
|
|
16694
|
+
const _edge2 = /* @__PURE__ */ new Vector3();
|
|
16695
|
+
const _normal$1 = /* @__PURE__ */ new Vector3();
|
|
16696
16696
|
class Ray {
|
|
16697
|
-
constructor(origin = new Vector3
|
|
16697
|
+
constructor(origin = new Vector3(), direction = new Vector3(0, 0, -1)) {
|
|
16698
16698
|
this.origin = origin;
|
|
16699
16699
|
this.direction = direction;
|
|
16700
16700
|
}
|
|
@@ -17692,13 +17692,13 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
17692
17692
|
return array;
|
|
17693
17693
|
}
|
|
17694
17694
|
}
|
|
17695
|
-
const _v1$5 = /* @__PURE__ */ new Vector3
|
|
17695
|
+
const _v1$5 = /* @__PURE__ */ new Vector3();
|
|
17696
17696
|
const _m1$2 = /* @__PURE__ */ new Matrix4();
|
|
17697
|
-
const _zero = /* @__PURE__ */ new Vector3
|
|
17698
|
-
const _one = /* @__PURE__ */ new Vector3
|
|
17699
|
-
const _x = /* @__PURE__ */ new Vector3
|
|
17700
|
-
const _y = /* @__PURE__ */ new Vector3
|
|
17701
|
-
const _z = /* @__PURE__ */ new Vector3
|
|
17697
|
+
const _zero = /* @__PURE__ */ new Vector3(0, 0, 0);
|
|
17698
|
+
const _one = /* @__PURE__ */ new Vector3(1, 1, 1);
|
|
17699
|
+
const _x = /* @__PURE__ */ new Vector3();
|
|
17700
|
+
const _y = /* @__PURE__ */ new Vector3();
|
|
17701
|
+
const _z = /* @__PURE__ */ new Vector3();
|
|
17702
17702
|
const _matrix$2 = /* @__PURE__ */ new Matrix4();
|
|
17703
17703
|
const _quaternion$3 = /* @__PURE__ */ new Quaternion();
|
|
17704
17704
|
class Euler {
|
|
@@ -17902,16 +17902,16 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
17902
17902
|
}
|
|
17903
17903
|
}
|
|
17904
17904
|
let _object3DId = 0;
|
|
17905
|
-
const _v1$4 = /* @__PURE__ */ new Vector3
|
|
17905
|
+
const _v1$4 = /* @__PURE__ */ new Vector3();
|
|
17906
17906
|
const _q1 = /* @__PURE__ */ new Quaternion();
|
|
17907
17907
|
const _m1$1$1 = /* @__PURE__ */ new Matrix4();
|
|
17908
|
-
const _target = /* @__PURE__ */ new Vector3
|
|
17909
|
-
const _position$3 = /* @__PURE__ */ new Vector3
|
|
17910
|
-
const _scale$2 = /* @__PURE__ */ new Vector3
|
|
17908
|
+
const _target = /* @__PURE__ */ new Vector3();
|
|
17909
|
+
const _position$3 = /* @__PURE__ */ new Vector3();
|
|
17910
|
+
const _scale$2 = /* @__PURE__ */ new Vector3();
|
|
17911
17911
|
const _quaternion$2 = /* @__PURE__ */ new Quaternion();
|
|
17912
|
-
const _xAxis = /* @__PURE__ */ new Vector3
|
|
17913
|
-
const _yAxis = /* @__PURE__ */ new Vector3
|
|
17914
|
-
const _zAxis = /* @__PURE__ */ new Vector3
|
|
17912
|
+
const _xAxis = /* @__PURE__ */ new Vector3(1, 0, 0);
|
|
17913
|
+
const _yAxis = /* @__PURE__ */ new Vector3(0, 1, 0);
|
|
17914
|
+
const _zAxis = /* @__PURE__ */ new Vector3(0, 0, 1);
|
|
17915
17915
|
const _addedEvent = { type: "added" };
|
|
17916
17916
|
const _removedEvent = { type: "removed" };
|
|
17917
17917
|
const _childaddedEvent = { type: "childadded", child: null };
|
|
@@ -17927,10 +17927,10 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
17927
17927
|
this.parent = null;
|
|
17928
17928
|
this.children = [];
|
|
17929
17929
|
this.up = Object3D2.DEFAULT_UP.clone();
|
|
17930
|
-
const position = new Vector3
|
|
17930
|
+
const position = new Vector3();
|
|
17931
17931
|
const rotation = new Euler();
|
|
17932
17932
|
const quaternion = new Quaternion();
|
|
17933
|
-
const scale = new Vector3
|
|
17933
|
+
const scale = new Vector3(1, 1, 1);
|
|
17934
17934
|
function onRotationChange() {
|
|
17935
17935
|
quaternion.setFromEuler(rotation, false);
|
|
17936
17936
|
}
|
|
@@ -18456,24 +18456,24 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
18456
18456
|
return this;
|
|
18457
18457
|
}
|
|
18458
18458
|
};
|
|
18459
|
-
Object3D$1.DEFAULT_UP = /* @__PURE__ */ new Vector3
|
|
18459
|
+
Object3D$1.DEFAULT_UP = /* @__PURE__ */ new Vector3(0, 1, 0);
|
|
18460
18460
|
Object3D$1.DEFAULT_MATRIX_AUTO_UPDATE = true;
|
|
18461
18461
|
Object3D$1.DEFAULT_MATRIX_WORLD_AUTO_UPDATE = true;
|
|
18462
|
-
const _v0$1 = /* @__PURE__ */ new Vector3
|
|
18463
|
-
const _v1$3 = /* @__PURE__ */ new Vector3
|
|
18464
|
-
const _v2$2 = /* @__PURE__ */ new Vector3
|
|
18465
|
-
const _v3$2 = /* @__PURE__ */ new Vector3
|
|
18466
|
-
const _vab = /* @__PURE__ */ new Vector3
|
|
18467
|
-
const _vac = /* @__PURE__ */ new Vector3
|
|
18468
|
-
const _vbc = /* @__PURE__ */ new Vector3
|
|
18469
|
-
const _vap = /* @__PURE__ */ new Vector3
|
|
18470
|
-
const _vbp = /* @__PURE__ */ new Vector3
|
|
18471
|
-
const _vcp = /* @__PURE__ */ new Vector3
|
|
18462
|
+
const _v0$1 = /* @__PURE__ */ new Vector3();
|
|
18463
|
+
const _v1$3 = /* @__PURE__ */ new Vector3();
|
|
18464
|
+
const _v2$2 = /* @__PURE__ */ new Vector3();
|
|
18465
|
+
const _v3$2 = /* @__PURE__ */ new Vector3();
|
|
18466
|
+
const _vab = /* @__PURE__ */ new Vector3();
|
|
18467
|
+
const _vac = /* @__PURE__ */ new Vector3();
|
|
18468
|
+
const _vbc = /* @__PURE__ */ new Vector3();
|
|
18469
|
+
const _vap = /* @__PURE__ */ new Vector3();
|
|
18470
|
+
const _vbp = /* @__PURE__ */ new Vector3();
|
|
18471
|
+
const _vcp = /* @__PURE__ */ new Vector3();
|
|
18472
18472
|
const _v40 = /* @__PURE__ */ new Vector4();
|
|
18473
18473
|
const _v41 = /* @__PURE__ */ new Vector4();
|
|
18474
18474
|
const _v42 = /* @__PURE__ */ new Vector4();
|
|
18475
18475
|
class Triangle {
|
|
18476
|
-
constructor(a = new Vector3
|
|
18476
|
+
constructor(a = new Vector3(), b = new Vector3(), c = new Vector3()) {
|
|
18477
18477
|
this.a = a;
|
|
18478
18478
|
this.b = b;
|
|
18479
18479
|
this.c = c;
|
|
@@ -19613,8 +19613,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
19613
19613
|
toHalfFloat,
|
|
19614
19614
|
fromHalfFloat
|
|
19615
19615
|
};
|
|
19616
|
-
const _vector$9 = /* @__PURE__ */ new Vector3
|
|
19617
|
-
const _vector2$1 = /* @__PURE__ */ new Vector2
|
|
19616
|
+
const _vector$9 = /* @__PURE__ */ new Vector3();
|
|
19617
|
+
const _vector2$1 = /* @__PURE__ */ new Vector2();
|
|
19618
19618
|
class BufferAttribute {
|
|
19619
19619
|
constructor(array, itemSize, normalized = false) {
|
|
19620
19620
|
if (Array.isArray(array)) {
|
|
@@ -19942,10 +19942,10 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
19942
19942
|
let _id$1 = 0;
|
|
19943
19943
|
const _m1$3 = /* @__PURE__ */ new Matrix4();
|
|
19944
19944
|
const _obj = /* @__PURE__ */ new Object3D$1();
|
|
19945
|
-
const _offset = /* @__PURE__ */ new Vector3
|
|
19946
|
-
const _box$2 = /* @__PURE__ */ new Box3
|
|
19947
|
-
const _boxMorphTargets = /* @__PURE__ */ new Box3
|
|
19948
|
-
const _vector$8 = /* @__PURE__ */ new Vector3
|
|
19945
|
+
const _offset = /* @__PURE__ */ new Vector3();
|
|
19946
|
+
const _box$2 = /* @__PURE__ */ new Box3();
|
|
19947
|
+
const _boxMorphTargets = /* @__PURE__ */ new Box3();
|
|
19948
|
+
const _vector$8 = /* @__PURE__ */ new Vector3();
|
|
19949
19949
|
class BufferGeometry extends EventDispatcher {
|
|
19950
19950
|
constructor() {
|
|
19951
19951
|
super();
|
|
@@ -20102,15 +20102,15 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
20102
20102
|
}
|
|
20103
20103
|
computeBoundingBox() {
|
|
20104
20104
|
if (this.boundingBox === null) {
|
|
20105
|
-
this.boundingBox = new Box3
|
|
20105
|
+
this.boundingBox = new Box3();
|
|
20106
20106
|
}
|
|
20107
20107
|
const position = this.attributes.position;
|
|
20108
20108
|
const morphAttributesPosition = this.morphAttributes.position;
|
|
20109
20109
|
if (position && position.isGLBufferAttribute) {
|
|
20110
20110
|
console.error("THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.", this);
|
|
20111
20111
|
this.boundingBox.set(
|
|
20112
|
-
new Vector3
|
|
20113
|
-
new Vector3
|
|
20112
|
+
new Vector3(-Infinity, -Infinity, -Infinity),
|
|
20113
|
+
new Vector3(Infinity, Infinity, Infinity)
|
|
20114
20114
|
);
|
|
20115
20115
|
return;
|
|
20116
20116
|
}
|
|
@@ -20146,7 +20146,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
20146
20146
|
const morphAttributesPosition = this.morphAttributes.position;
|
|
20147
20147
|
if (position && position.isGLBufferAttribute) {
|
|
20148
20148
|
console.error("THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.", this);
|
|
20149
|
-
this.boundingSphere.set(new Vector3
|
|
20149
|
+
this.boundingSphere.set(new Vector3(), Infinity);
|
|
20150
20150
|
return;
|
|
20151
20151
|
}
|
|
20152
20152
|
if (position) {
|
|
@@ -20209,10 +20209,10 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
20209
20209
|
const tangentAttribute = this.getAttribute("tangent");
|
|
20210
20210
|
const tan1 = [], tan2 = [];
|
|
20211
20211
|
for (let i2 = 0; i2 < positionAttribute.count; i2++) {
|
|
20212
|
-
tan1[i2] = new Vector3
|
|
20213
|
-
tan2[i2] = new Vector3
|
|
20212
|
+
tan1[i2] = new Vector3();
|
|
20213
|
+
tan2[i2] = new Vector3();
|
|
20214
20214
|
}
|
|
20215
|
-
const vA = new Vector3
|
|
20215
|
+
const vA = new Vector3(), vB = new Vector3(), vC = new Vector3(), uvA = new Vector2(), uvB = new Vector2(), uvC = new Vector2(), sdir = new Vector3(), tdir = new Vector3();
|
|
20216
20216
|
function handleTriangle(a, b, c) {
|
|
20217
20217
|
vA.fromBufferAttribute(positionAttribute, a);
|
|
20218
20218
|
vB.fromBufferAttribute(positionAttribute, b);
|
|
@@ -20254,8 +20254,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
20254
20254
|
);
|
|
20255
20255
|
}
|
|
20256
20256
|
}
|
|
20257
|
-
const tmp2 = new Vector3
|
|
20258
|
-
const n = new Vector3
|
|
20257
|
+
const tmp2 = new Vector3(), tmp22 = new Vector3();
|
|
20258
|
+
const n = new Vector3(), n2 = new Vector3();
|
|
20259
20259
|
function handleVertex(v) {
|
|
20260
20260
|
n.fromBufferAttribute(normalAttribute, v);
|
|
20261
20261
|
n2.copy(n);
|
|
@@ -20291,9 +20291,9 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
20291
20291
|
normalAttribute.setXYZ(i2, 0, 0, 0);
|
|
20292
20292
|
}
|
|
20293
20293
|
}
|
|
20294
|
-
const pA = new Vector3
|
|
20295
|
-
const nA = new Vector3
|
|
20296
|
-
const cb = new Vector3
|
|
20294
|
+
const pA = new Vector3(), pB = new Vector3(), pC = new Vector3();
|
|
20295
|
+
const nA = new Vector3(), nB = new Vector3(), nC = new Vector3();
|
|
20296
|
+
const cb = new Vector3(), ab = new Vector3();
|
|
20297
20297
|
if (index2) {
|
|
20298
20298
|
for (let i2 = 0, il = index2.count; i2 < il; i2 += 3) {
|
|
20299
20299
|
const vA = index2.getX(i2 + 0);
|
|
@@ -20509,14 +20509,14 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
20509
20509
|
const _inverseMatrix$3 = /* @__PURE__ */ new Matrix4();
|
|
20510
20510
|
const _ray$3 = /* @__PURE__ */ new Ray();
|
|
20511
20511
|
const _sphere$6 = /* @__PURE__ */ new Sphere();
|
|
20512
|
-
const _sphereHitAt = /* @__PURE__ */ new Vector3
|
|
20513
|
-
const _vA$1 = /* @__PURE__ */ new Vector3
|
|
20514
|
-
const _vB$1 = /* @__PURE__ */ new Vector3
|
|
20515
|
-
const _vC$1 = /* @__PURE__ */ new Vector3
|
|
20516
|
-
const _tempA = /* @__PURE__ */ new Vector3
|
|
20517
|
-
const _morphA = /* @__PURE__ */ new Vector3
|
|
20518
|
-
const _intersectionPoint = /* @__PURE__ */ new Vector3
|
|
20519
|
-
const _intersectionPointWorld = /* @__PURE__ */ new Vector3
|
|
20512
|
+
const _sphereHitAt = /* @__PURE__ */ new Vector3();
|
|
20513
|
+
const _vA$1 = /* @__PURE__ */ new Vector3();
|
|
20514
|
+
const _vB$1 = /* @__PURE__ */ new Vector3();
|
|
20515
|
+
const _vC$1 = /* @__PURE__ */ new Vector3();
|
|
20516
|
+
const _tempA = /* @__PURE__ */ new Vector3();
|
|
20517
|
+
const _morphA = /* @__PURE__ */ new Vector3();
|
|
20518
|
+
const _intersectionPoint = /* @__PURE__ */ new Vector3();
|
|
20519
|
+
const _intersectionPointWorld = /* @__PURE__ */ new Vector3();
|
|
20520
20520
|
class Mesh extends Object3D$1 {
|
|
20521
20521
|
constructor(geometry = new BufferGeometry(), material = new MeshBasicMaterial()) {
|
|
20522
20522
|
super();
|
|
@@ -20703,16 +20703,16 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
20703
20703
|
object.getVertexPosition(c, _vC$1);
|
|
20704
20704
|
const intersection = checkIntersection$1(object, material, raycaster, ray, _vA$1, _vB$1, _vC$1, _intersectionPoint);
|
|
20705
20705
|
if (intersection) {
|
|
20706
|
-
const barycoord = new Vector3
|
|
20706
|
+
const barycoord = new Vector3();
|
|
20707
20707
|
Triangle.getBarycoord(_intersectionPoint, _vA$1, _vB$1, _vC$1, barycoord);
|
|
20708
20708
|
if (uv) {
|
|
20709
|
-
intersection.uv = Triangle.getInterpolatedAttribute(uv, a, b, c, barycoord, new Vector2
|
|
20709
|
+
intersection.uv = Triangle.getInterpolatedAttribute(uv, a, b, c, barycoord, new Vector2());
|
|
20710
20710
|
}
|
|
20711
20711
|
if (uv1) {
|
|
20712
|
-
intersection.uv1 = Triangle.getInterpolatedAttribute(uv1, a, b, c, barycoord, new Vector2
|
|
20712
|
+
intersection.uv1 = Triangle.getInterpolatedAttribute(uv1, a, b, c, barycoord, new Vector2());
|
|
20713
20713
|
}
|
|
20714
20714
|
if (normal) {
|
|
20715
|
-
intersection.normal = Triangle.getInterpolatedAttribute(normal, a, b, c, barycoord, new Vector3
|
|
20715
|
+
intersection.normal = Triangle.getInterpolatedAttribute(normal, a, b, c, barycoord, new Vector3());
|
|
20716
20716
|
if (intersection.normal.dot(ray.direction) > 0) {
|
|
20717
20717
|
intersection.normal.multiplyScalar(-1);
|
|
20718
20718
|
}
|
|
@@ -20721,7 +20721,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
20721
20721
|
a,
|
|
20722
20722
|
b,
|
|
20723
20723
|
c,
|
|
20724
|
-
normal: new Vector3
|
|
20724
|
+
normal: new Vector3(),
|
|
20725
20725
|
materialIndex: 0
|
|
20726
20726
|
};
|
|
20727
20727
|
Triangle.getNormal(_vA$1, _vB$1, _vC$1, face.normal);
|
|
@@ -20772,7 +20772,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
20772
20772
|
const gridY1 = gridY + 1;
|
|
20773
20773
|
let vertexCounter = 0;
|
|
20774
20774
|
let groupCount = 0;
|
|
20775
|
-
const vector = new Vector3
|
|
20775
|
+
const vector = new Vector3();
|
|
20776
20776
|
for (let iy = 0; iy < gridY1; iy++) {
|
|
20777
20777
|
const y = iy * segmentHeight - heightHalf;
|
|
20778
20778
|
for (let ix = 0; ix < gridX1; ix++) {
|
|
@@ -21012,9 +21012,9 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
21012
21012
|
return new this.constructor().copy(this);
|
|
21013
21013
|
}
|
|
21014
21014
|
};
|
|
21015
|
-
const _v3$1 = /* @__PURE__ */ new Vector3
|
|
21016
|
-
const _minTarget = /* @__PURE__ */ new Vector2
|
|
21017
|
-
const _maxTarget = /* @__PURE__ */ new Vector2
|
|
21015
|
+
const _v3$1 = /* @__PURE__ */ new Vector3();
|
|
21016
|
+
const _minTarget = /* @__PURE__ */ new Vector2();
|
|
21017
|
+
const _maxTarget = /* @__PURE__ */ new Vector2();
|
|
21018
21018
|
class PerspectiveCamera extends Camera$2 {
|
|
21019
21019
|
constructor(fov2 = 50, aspect2 = 1, near = 0.1, far = 2e3) {
|
|
21020
21020
|
super();
|
|
@@ -21563,7 +21563,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
21563
21563
|
};
|
|
21564
21564
|
}
|
|
21565
21565
|
}
|
|
21566
|
-
const _vector$7 = /* @__PURE__ */ new Vector3
|
|
21566
|
+
const _vector$7 = /* @__PURE__ */ new Vector3();
|
|
21567
21567
|
class InterleavedBufferAttribute {
|
|
21568
21568
|
constructor(interleavedBuffer, itemSize, offset, normalized = false) {
|
|
21569
21569
|
this.isInterleavedBufferAttribute = true;
|
|
@@ -21772,18 +21772,18 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
21772
21772
|
}
|
|
21773
21773
|
}
|
|
21774
21774
|
let _geometry$1;
|
|
21775
|
-
const _intersectPoint = /* @__PURE__ */ new Vector3
|
|
21776
|
-
const _worldScale = /* @__PURE__ */ new Vector3
|
|
21777
|
-
const _mvPosition = /* @__PURE__ */ new Vector3
|
|
21778
|
-
const _alignedPosition = /* @__PURE__ */ new Vector2
|
|
21779
|
-
const _rotatedPosition = /* @__PURE__ */ new Vector2
|
|
21775
|
+
const _intersectPoint = /* @__PURE__ */ new Vector3();
|
|
21776
|
+
const _worldScale = /* @__PURE__ */ new Vector3();
|
|
21777
|
+
const _mvPosition = /* @__PURE__ */ new Vector3();
|
|
21778
|
+
const _alignedPosition = /* @__PURE__ */ new Vector2();
|
|
21779
|
+
const _rotatedPosition = /* @__PURE__ */ new Vector2();
|
|
21780
21780
|
const _viewWorldMatrix = /* @__PURE__ */ new Matrix4();
|
|
21781
|
-
const _vA = /* @__PURE__ */ new Vector3
|
|
21782
|
-
const _vB = /* @__PURE__ */ new Vector3
|
|
21783
|
-
const _vC = /* @__PURE__ */ new Vector3
|
|
21784
|
-
const _uvA = /* @__PURE__ */ new Vector2
|
|
21785
|
-
const _uvB = /* @__PURE__ */ new Vector2
|
|
21786
|
-
const _uvC = /* @__PURE__ */ new Vector2
|
|
21781
|
+
const _vA = /* @__PURE__ */ new Vector3();
|
|
21782
|
+
const _vB = /* @__PURE__ */ new Vector3();
|
|
21783
|
+
const _vC = /* @__PURE__ */ new Vector3();
|
|
21784
|
+
const _uvA = /* @__PURE__ */ new Vector2();
|
|
21785
|
+
const _uvB = /* @__PURE__ */ new Vector2();
|
|
21786
|
+
const _uvC = /* @__PURE__ */ new Vector2();
|
|
21787
21787
|
class Sprite extends Object3D$1 {
|
|
21788
21788
|
constructor(material = new SpriteMaterial()) {
|
|
21789
21789
|
super();
|
|
@@ -21820,7 +21820,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
21820
21820
|
}
|
|
21821
21821
|
this.geometry = _geometry$1;
|
|
21822
21822
|
this.material = material;
|
|
21823
|
-
this.center = new Vector2
|
|
21823
|
+
this.center = new Vector2(0.5, 0.5);
|
|
21824
21824
|
}
|
|
21825
21825
|
raycast(raycaster, intersects2) {
|
|
21826
21826
|
if (raycaster.camera === null) {
|
|
@@ -21860,7 +21860,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
21860
21860
|
intersects2.push({
|
|
21861
21861
|
distance,
|
|
21862
21862
|
point: _intersectPoint.clone(),
|
|
21863
|
-
uv: Triangle.getInterpolation(_intersectPoint, _vA, _vB, _vC, _uvA, _uvB, _uvC, new Vector2
|
|
21863
|
+
uv: Triangle.getInterpolation(_intersectPoint, _vA, _vB, _vC, _uvA, _uvB, _uvC, new Vector2()),
|
|
21864
21864
|
face: null,
|
|
21865
21865
|
object: this
|
|
21866
21866
|
});
|
|
@@ -21885,8 +21885,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
21885
21885
|
vertexPosition.y += _rotatedPosition.y;
|
|
21886
21886
|
vertexPosition.applyMatrix4(_viewWorldMatrix);
|
|
21887
21887
|
}
|
|
21888
|
-
const _v1$2 = /* @__PURE__ */ new Vector3
|
|
21889
|
-
const _v2$1 = /* @__PURE__ */ new Vector3
|
|
21888
|
+
const _v1$2 = /* @__PURE__ */ new Vector3();
|
|
21889
|
+
const _v2$1 = /* @__PURE__ */ new Vector3();
|
|
21890
21890
|
class LOD extends Object3D$1 {
|
|
21891
21891
|
constructor() {
|
|
21892
21892
|
super();
|
|
@@ -22007,12 +22007,12 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
22007
22007
|
return data2;
|
|
22008
22008
|
}
|
|
22009
22009
|
}
|
|
22010
|
-
const _basePosition = /* @__PURE__ */ new Vector3
|
|
22010
|
+
const _basePosition = /* @__PURE__ */ new Vector3();
|
|
22011
22011
|
const _skinIndex = /* @__PURE__ */ new Vector4();
|
|
22012
22012
|
const _skinWeight = /* @__PURE__ */ new Vector4();
|
|
22013
|
-
const _vector3 = /* @__PURE__ */ new Vector3
|
|
22013
|
+
const _vector3 = /* @__PURE__ */ new Vector3();
|
|
22014
22014
|
const _matrix4 = /* @__PURE__ */ new Matrix4();
|
|
22015
|
-
const _vertex = /* @__PURE__ */ new Vector3
|
|
22015
|
+
const _vertex = /* @__PURE__ */ new Vector3();
|
|
22016
22016
|
const _sphere$5 = /* @__PURE__ */ new Sphere();
|
|
22017
22017
|
const _inverseMatrix$2 = /* @__PURE__ */ new Matrix4();
|
|
22018
22018
|
const _ray$2 = /* @__PURE__ */ new Ray();
|
|
@@ -22030,7 +22030,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
22030
22030
|
computeBoundingBox() {
|
|
22031
22031
|
const geometry = this.geometry;
|
|
22032
22032
|
if (this.boundingBox === null) {
|
|
22033
|
-
this.boundingBox = new Box3
|
|
22033
|
+
this.boundingBox = new Box3();
|
|
22034
22034
|
}
|
|
22035
22035
|
this.boundingBox.makeEmpty();
|
|
22036
22036
|
const positionAttribute = geometry.getAttribute("position");
|
|
@@ -22312,7 +22312,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
22312
22312
|
const _instanceLocalMatrix = /* @__PURE__ */ new Matrix4();
|
|
22313
22313
|
const _instanceWorldMatrix = /* @__PURE__ */ new Matrix4();
|
|
22314
22314
|
const _instanceIntersects = [];
|
|
22315
|
-
const _box3 = /* @__PURE__ */ new Box3
|
|
22315
|
+
const _box3 = /* @__PURE__ */ new Box3();
|
|
22316
22316
|
const _identity = /* @__PURE__ */ new Matrix4();
|
|
22317
22317
|
const _mesh$1 = /* @__PURE__ */ new Mesh();
|
|
22318
22318
|
const _sphere$4 = /* @__PURE__ */ new Sphere();
|
|
@@ -22334,7 +22334,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
22334
22334
|
const geometry = this.geometry;
|
|
22335
22335
|
const count = this.count;
|
|
22336
22336
|
if (this.boundingBox === null) {
|
|
22337
|
-
this.boundingBox = new Box3
|
|
22337
|
+
this.boundingBox = new Box3();
|
|
22338
22338
|
}
|
|
22339
22339
|
if (geometry.boundingBox === null) {
|
|
22340
22340
|
geometry.computeBoundingBox();
|
|
@@ -22447,11 +22447,11 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
22447
22447
|
return this;
|
|
22448
22448
|
}
|
|
22449
22449
|
};
|
|
22450
|
-
const _vector1 = /* @__PURE__ */ new Vector3
|
|
22451
|
-
const _vector2 = /* @__PURE__ */ new Vector3
|
|
22450
|
+
const _vector1 = /* @__PURE__ */ new Vector3();
|
|
22451
|
+
const _vector2 = /* @__PURE__ */ new Vector3();
|
|
22452
22452
|
const _normalMatrix = /* @__PURE__ */ new Matrix3();
|
|
22453
22453
|
class Plane {
|
|
22454
|
-
constructor(normal = new Vector3
|
|
22454
|
+
constructor(normal = new Vector3(1, 0, 0), constant = 0) {
|
|
22455
22455
|
this.isPlane = true;
|
|
22456
22456
|
this.normal = normal;
|
|
22457
22457
|
this.constant = constant;
|
|
@@ -22549,7 +22549,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
22549
22549
|
}
|
|
22550
22550
|
}
|
|
22551
22551
|
const _sphere$3 = /* @__PURE__ */ new Sphere();
|
|
22552
|
-
const _vector$6 = /* @__PURE__ */ new Vector3
|
|
22552
|
+
const _vector$6 = /* @__PURE__ */ new Vector3();
|
|
22553
22553
|
class Frustum {
|
|
22554
22554
|
constructor(p0 = new Plane(), p1 = new Plane(), p2 = new Plane(), p3 = new Plane(), p4 = new Plane(), p5 = new Plane()) {
|
|
22555
22555
|
this.planes = [p0, p1, p2, p3, p4, p5];
|
|
@@ -22689,11 +22689,11 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
22689
22689
|
const _matrix$1 = /* @__PURE__ */ new Matrix4();
|
|
22690
22690
|
const _whiteColor = /* @__PURE__ */ new Color(1, 1, 1);
|
|
22691
22691
|
const _frustum = /* @__PURE__ */ new Frustum();
|
|
22692
|
-
const _box$1 = /* @__PURE__ */ new Box3
|
|
22692
|
+
const _box$1 = /* @__PURE__ */ new Box3();
|
|
22693
22693
|
const _sphere$2 = /* @__PURE__ */ new Sphere();
|
|
22694
|
-
const _vector$5 = /* @__PURE__ */ new Vector3
|
|
22695
|
-
const _forward = /* @__PURE__ */ new Vector3
|
|
22696
|
-
const _temp = /* @__PURE__ */ new Vector3
|
|
22694
|
+
const _vector$5 = /* @__PURE__ */ new Vector3();
|
|
22695
|
+
const _forward = /* @__PURE__ */ new Vector3();
|
|
22696
|
+
const _temp = /* @__PURE__ */ new Vector3();
|
|
22697
22697
|
const _renderList = /* @__PURE__ */ new MultiDrawRenderList();
|
|
22698
22698
|
const _mesh = /* @__PURE__ */ new Mesh();
|
|
22699
22699
|
const _batchIntersects = [];
|
|
@@ -22842,7 +22842,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
22842
22842
|
}
|
|
22843
22843
|
computeBoundingBox() {
|
|
22844
22844
|
if (this.boundingBox === null) {
|
|
22845
|
-
this.boundingBox = new Box3
|
|
22845
|
+
this.boundingBox = new Box3();
|
|
22846
22846
|
}
|
|
22847
22847
|
const boundingBox = this.boundingBox;
|
|
22848
22848
|
const instanceInfo = this._instanceInfo;
|
|
@@ -23080,7 +23080,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
23080
23080
|
const geometry = this.geometry;
|
|
23081
23081
|
const geometryInfo = this._geometryInfo[geometryId];
|
|
23082
23082
|
if (geometryInfo.boundingBox === null) {
|
|
23083
|
-
const box = new Box3
|
|
23083
|
+
const box = new Box3();
|
|
23084
23084
|
const index2 = geometry.index;
|
|
23085
23085
|
const position = geometry.attributes.position;
|
|
23086
23086
|
for (let i2 = geometryInfo.start, l = geometryInfo.start + geometryInfo.count; i2 < l; i2++) {
|
|
@@ -23255,7 +23255,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
23255
23255
|
_mesh.geometry.index = batchGeometry.index;
|
|
23256
23256
|
_mesh.geometry.attributes = batchGeometry.attributes;
|
|
23257
23257
|
if (_mesh.geometry.boundingBox === null) {
|
|
23258
|
-
_mesh.geometry.boundingBox = new Box3
|
|
23258
|
+
_mesh.geometry.boundingBox = new Box3();
|
|
23259
23259
|
}
|
|
23260
23260
|
if (_mesh.geometry.boundingSphere === null) {
|
|
23261
23261
|
_mesh.geometry.boundingSphere = new Sphere();
|
|
@@ -23432,13 +23432,13 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
23432
23432
|
return this;
|
|
23433
23433
|
}
|
|
23434
23434
|
}
|
|
23435
|
-
const _vStart = /* @__PURE__ */ new Vector3
|
|
23436
|
-
const _vEnd = /* @__PURE__ */ new Vector3
|
|
23435
|
+
const _vStart = /* @__PURE__ */ new Vector3();
|
|
23436
|
+
const _vEnd = /* @__PURE__ */ new Vector3();
|
|
23437
23437
|
const _inverseMatrix$1 = /* @__PURE__ */ new Matrix4();
|
|
23438
23438
|
const _ray$1 = /* @__PURE__ */ new Ray();
|
|
23439
23439
|
const _sphere$1 = /* @__PURE__ */ new Sphere();
|
|
23440
|
-
const _intersectPointOnRay = /* @__PURE__ */ new Vector3
|
|
23441
|
-
const _intersectPointOnSegment = /* @__PURE__ */ new Vector3
|
|
23440
|
+
const _intersectPointOnRay = /* @__PURE__ */ new Vector3();
|
|
23441
|
+
const _intersectPointOnSegment = /* @__PURE__ */ new Vector3();
|
|
23442
23442
|
class Line extends Object3D$1 {
|
|
23443
23443
|
constructor(geometry = new BufferGeometry(), material = new LineBasicMaterial()) {
|
|
23444
23444
|
super();
|
|
@@ -23564,8 +23564,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
23564
23564
|
object
|
|
23565
23565
|
};
|
|
23566
23566
|
}
|
|
23567
|
-
const _start = /* @__PURE__ */ new Vector3
|
|
23568
|
-
const _end = /* @__PURE__ */ new Vector3
|
|
23567
|
+
const _start = /* @__PURE__ */ new Vector3();
|
|
23568
|
+
const _end = /* @__PURE__ */ new Vector3();
|
|
23569
23569
|
class LineSegments extends Line {
|
|
23570
23570
|
constructor(geometry, material) {
|
|
23571
23571
|
super(geometry, material);
|
|
@@ -23624,7 +23624,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
23624
23624
|
const _inverseMatrix = /* @__PURE__ */ new Matrix4();
|
|
23625
23625
|
const _ray = /* @__PURE__ */ new Ray();
|
|
23626
23626
|
const _sphere = /* @__PURE__ */ new Sphere();
|
|
23627
|
-
const _position$2 = /* @__PURE__ */ new Vector3
|
|
23627
|
+
const _position$2 = /* @__PURE__ */ new Vector3();
|
|
23628
23628
|
class Points extends Object3D$1 {
|
|
23629
23629
|
constructor(geometry = new BufferGeometry(), material = new PointsMaterial()) {
|
|
23630
23630
|
super();
|
|
@@ -23695,7 +23695,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
23695
23695
|
function testPoint(point, index2, localThresholdSq, matrixWorld, raycaster, intersects2, object) {
|
|
23696
23696
|
const rayPointDistanceSq = _ray.distanceSqToPoint(point);
|
|
23697
23697
|
if (rayPointDistanceSq < localThresholdSq) {
|
|
23698
|
-
const intersectPoint = new Vector3
|
|
23698
|
+
const intersectPoint = new Vector3();
|
|
23699
23699
|
_ray.closestPointToPoint(point, intersectPoint);
|
|
23700
23700
|
intersectPoint.applyMatrix4(matrixWorld);
|
|
23701
23701
|
const distance = raycaster.ray.origin.distanceTo(intersectPoint);
|
|
@@ -23931,7 +23931,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
23931
23931
|
if (t2 > 1) t2 = 1;
|
|
23932
23932
|
const pt1 = this.getPoint(t1);
|
|
23933
23933
|
const pt2 = this.getPoint(t2);
|
|
23934
|
-
const tangent = optionalTarget || (pt1.isVector2 ? new Vector2
|
|
23934
|
+
const tangent = optionalTarget || (pt1.isVector2 ? new Vector2() : new Vector3());
|
|
23935
23935
|
tangent.copy(pt2).sub(pt1).normalize();
|
|
23936
23936
|
return tangent;
|
|
23937
23937
|
}
|
|
@@ -23940,18 +23940,18 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
23940
23940
|
return this.getTangent(t, optionalTarget);
|
|
23941
23941
|
}
|
|
23942
23942
|
computeFrenetFrames(segments, closed) {
|
|
23943
|
-
const normal = new Vector3
|
|
23943
|
+
const normal = new Vector3();
|
|
23944
23944
|
const tangents = [];
|
|
23945
23945
|
const normals = [];
|
|
23946
23946
|
const binormals = [];
|
|
23947
|
-
const vec = new Vector3
|
|
23947
|
+
const vec = new Vector3();
|
|
23948
23948
|
const mat = new Matrix4();
|
|
23949
23949
|
for (let i2 = 0; i2 <= segments; i2++) {
|
|
23950
23950
|
const u = i2 / segments;
|
|
23951
|
-
tangents[i2] = this.getTangentAt(u, new Vector3
|
|
23951
|
+
tangents[i2] = this.getTangentAt(u, new Vector3());
|
|
23952
23952
|
}
|
|
23953
|
-
normals[0] = new Vector3
|
|
23954
|
-
binormals[0] = new Vector3
|
|
23953
|
+
normals[0] = new Vector3();
|
|
23954
|
+
binormals[0] = new Vector3();
|
|
23955
23955
|
let min2 = Number.MAX_VALUE;
|
|
23956
23956
|
const tx = Math.abs(tangents[0].x);
|
|
23957
23957
|
const ty = Math.abs(tangents[0].y);
|
|
@@ -24036,7 +24036,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
24036
24036
|
this.aClockwise = aClockwise;
|
|
24037
24037
|
this.aRotation = aRotation;
|
|
24038
24038
|
}
|
|
24039
|
-
getPoint(t, optionalTarget = new Vector2
|
|
24039
|
+
getPoint(t, optionalTarget = new Vector2()) {
|
|
24040
24040
|
const point = optionalTarget;
|
|
24041
24041
|
const twoPi = Math.PI * 2;
|
|
24042
24042
|
let deltaAngle = this.aEndAngle - this.aStartAngle;
|
|
@@ -24140,7 +24140,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
24140
24140
|
}
|
|
24141
24141
|
};
|
|
24142
24142
|
}
|
|
24143
|
-
const tmp = /* @__PURE__ */ new Vector3
|
|
24143
|
+
const tmp = /* @__PURE__ */ new Vector3();
|
|
24144
24144
|
const px = /* @__PURE__ */ new CubicPoly();
|
|
24145
24145
|
const py = /* @__PURE__ */ new CubicPoly();
|
|
24146
24146
|
const pz = /* @__PURE__ */ new CubicPoly();
|
|
@@ -24154,7 +24154,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
24154
24154
|
this.curveType = curveType;
|
|
24155
24155
|
this.tension = tension;
|
|
24156
24156
|
}
|
|
24157
|
-
getPoint(t, optionalTarget = new Vector3
|
|
24157
|
+
getPoint(t, optionalTarget = new Vector3()) {
|
|
24158
24158
|
const point = optionalTarget;
|
|
24159
24159
|
const points = this.points;
|
|
24160
24160
|
const l = points.length;
|
|
@@ -24234,7 +24234,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
24234
24234
|
this.points = [];
|
|
24235
24235
|
for (let i2 = 0, l = json.points.length; i2 < l; i2++) {
|
|
24236
24236
|
const point = json.points[i2];
|
|
24237
|
-
this.points.push(new Vector3
|
|
24237
|
+
this.points.push(new Vector3().fromArray(point));
|
|
24238
24238
|
}
|
|
24239
24239
|
this.closed = json.closed;
|
|
24240
24240
|
this.curveType = json.curveType;
|
|
@@ -24280,7 +24280,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
24280
24280
|
return CubicBezierP0(t, p0) + CubicBezierP1(t, p1) + CubicBezierP2(t, p2) + CubicBezierP3(t, p3);
|
|
24281
24281
|
}
|
|
24282
24282
|
class CubicBezierCurve extends Curve {
|
|
24283
|
-
constructor(v0 = new Vector2
|
|
24283
|
+
constructor(v0 = new Vector2(), v1 = new Vector2(), v2 = new Vector2(), v3 = new Vector2()) {
|
|
24284
24284
|
super();
|
|
24285
24285
|
this.isCubicBezierCurve = true;
|
|
24286
24286
|
this.type = "CubicBezierCurve";
|
|
@@ -24289,7 +24289,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
24289
24289
|
this.v2 = v2;
|
|
24290
24290
|
this.v3 = v3;
|
|
24291
24291
|
}
|
|
24292
|
-
getPoint(t, optionalTarget = new Vector2
|
|
24292
|
+
getPoint(t, optionalTarget = new Vector2()) {
|
|
24293
24293
|
const point = optionalTarget;
|
|
24294
24294
|
const v0 = this.v0, v1 = this.v1, v2 = this.v2, v3 = this.v3;
|
|
24295
24295
|
point.set(
|
|
@@ -24324,7 +24324,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
24324
24324
|
}
|
|
24325
24325
|
}
|
|
24326
24326
|
class CubicBezierCurve3 extends Curve {
|
|
24327
|
-
constructor(v0 = new Vector3
|
|
24327
|
+
constructor(v0 = new Vector3(), v1 = new Vector3(), v2 = new Vector3(), v3 = new Vector3()) {
|
|
24328
24328
|
super();
|
|
24329
24329
|
this.isCubicBezierCurve3 = true;
|
|
24330
24330
|
this.type = "CubicBezierCurve3";
|
|
@@ -24333,7 +24333,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
24333
24333
|
this.v2 = v2;
|
|
24334
24334
|
this.v3 = v3;
|
|
24335
24335
|
}
|
|
24336
|
-
getPoint(t, optionalTarget = new Vector3
|
|
24336
|
+
getPoint(t, optionalTarget = new Vector3()) {
|
|
24337
24337
|
const point = optionalTarget;
|
|
24338
24338
|
const v0 = this.v0, v1 = this.v1, v2 = this.v2, v3 = this.v3;
|
|
24339
24339
|
point.set(
|
|
@@ -24369,14 +24369,14 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
24369
24369
|
}
|
|
24370
24370
|
}
|
|
24371
24371
|
class LineCurve extends Curve {
|
|
24372
|
-
constructor(v1 = new Vector2
|
|
24372
|
+
constructor(v1 = new Vector2(), v2 = new Vector2()) {
|
|
24373
24373
|
super();
|
|
24374
24374
|
this.isLineCurve = true;
|
|
24375
24375
|
this.type = "LineCurve";
|
|
24376
24376
|
this.v1 = v1;
|
|
24377
24377
|
this.v2 = v2;
|
|
24378
24378
|
}
|
|
24379
|
-
getPoint(t, optionalTarget = new Vector2
|
|
24379
|
+
getPoint(t, optionalTarget = new Vector2()) {
|
|
24380
24380
|
const point = optionalTarget;
|
|
24381
24381
|
if (t === 1) {
|
|
24382
24382
|
point.copy(this.v2);
|
|
@@ -24390,7 +24390,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
24390
24390
|
getPointAt(u, optionalTarget) {
|
|
24391
24391
|
return this.getPoint(u, optionalTarget);
|
|
24392
24392
|
}
|
|
24393
|
-
getTangent(t, optionalTarget = new Vector2
|
|
24393
|
+
getTangent(t, optionalTarget = new Vector2()) {
|
|
24394
24394
|
return optionalTarget.subVectors(this.v2, this.v1).normalize();
|
|
24395
24395
|
}
|
|
24396
24396
|
getTangentAt(u, optionalTarget) {
|
|
@@ -24416,14 +24416,14 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
24416
24416
|
}
|
|
24417
24417
|
}
|
|
24418
24418
|
class LineCurve3 extends Curve {
|
|
24419
|
-
constructor(v1 = new Vector3
|
|
24419
|
+
constructor(v1 = new Vector3(), v2 = new Vector3()) {
|
|
24420
24420
|
super();
|
|
24421
24421
|
this.isLineCurve3 = true;
|
|
24422
24422
|
this.type = "LineCurve3";
|
|
24423
24423
|
this.v1 = v1;
|
|
24424
24424
|
this.v2 = v2;
|
|
24425
24425
|
}
|
|
24426
|
-
getPoint(t, optionalTarget = new Vector3
|
|
24426
|
+
getPoint(t, optionalTarget = new Vector3()) {
|
|
24427
24427
|
const point = optionalTarget;
|
|
24428
24428
|
if (t === 1) {
|
|
24429
24429
|
point.copy(this.v2);
|
|
@@ -24437,7 +24437,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
24437
24437
|
getPointAt(u, optionalTarget) {
|
|
24438
24438
|
return this.getPoint(u, optionalTarget);
|
|
24439
24439
|
}
|
|
24440
|
-
getTangent(t, optionalTarget = new Vector3
|
|
24440
|
+
getTangent(t, optionalTarget = new Vector3()) {
|
|
24441
24441
|
return optionalTarget.subVectors(this.v2, this.v1).normalize();
|
|
24442
24442
|
}
|
|
24443
24443
|
getTangentAt(u, optionalTarget) {
|
|
@@ -24463,7 +24463,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
24463
24463
|
}
|
|
24464
24464
|
}
|
|
24465
24465
|
class QuadraticBezierCurve extends Curve {
|
|
24466
|
-
constructor(v0 = new Vector2
|
|
24466
|
+
constructor(v0 = new Vector2(), v1 = new Vector2(), v2 = new Vector2()) {
|
|
24467
24467
|
super();
|
|
24468
24468
|
this.isQuadraticBezierCurve = true;
|
|
24469
24469
|
this.type = "QuadraticBezierCurve";
|
|
@@ -24471,7 +24471,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
24471
24471
|
this.v1 = v1;
|
|
24472
24472
|
this.v2 = v2;
|
|
24473
24473
|
}
|
|
24474
|
-
getPoint(t, optionalTarget = new Vector2
|
|
24474
|
+
getPoint(t, optionalTarget = new Vector2()) {
|
|
24475
24475
|
const point = optionalTarget;
|
|
24476
24476
|
const v0 = this.v0, v1 = this.v1, v2 = this.v2;
|
|
24477
24477
|
point.set(
|
|
@@ -24503,7 +24503,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
24503
24503
|
}
|
|
24504
24504
|
}
|
|
24505
24505
|
class QuadraticBezierCurve3 extends Curve {
|
|
24506
|
-
constructor(v0 = new Vector3
|
|
24506
|
+
constructor(v0 = new Vector3(), v1 = new Vector3(), v2 = new Vector3()) {
|
|
24507
24507
|
super();
|
|
24508
24508
|
this.isQuadraticBezierCurve3 = true;
|
|
24509
24509
|
this.type = "QuadraticBezierCurve3";
|
|
@@ -24511,7 +24511,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
24511
24511
|
this.v1 = v1;
|
|
24512
24512
|
this.v2 = v2;
|
|
24513
24513
|
}
|
|
24514
|
-
getPoint(t, optionalTarget = new Vector3
|
|
24514
|
+
getPoint(t, optionalTarget = new Vector3()) {
|
|
24515
24515
|
const point = optionalTarget;
|
|
24516
24516
|
const v0 = this.v0, v1 = this.v1, v2 = this.v2;
|
|
24517
24517
|
point.set(
|
|
@@ -24550,7 +24550,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
24550
24550
|
this.type = "SplineCurve";
|
|
24551
24551
|
this.points = points;
|
|
24552
24552
|
}
|
|
24553
|
-
getPoint(t, optionalTarget = new Vector2
|
|
24553
|
+
getPoint(t, optionalTarget = new Vector2()) {
|
|
24554
24554
|
const point = optionalTarget;
|
|
24555
24555
|
const points = this.points;
|
|
24556
24556
|
const p = (points.length - 1) * t;
|
|
@@ -24589,7 +24589,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
24589
24589
|
this.points = [];
|
|
24590
24590
|
for (let i2 = 0, l = json.points.length; i2 < l; i2++) {
|
|
24591
24591
|
const point = json.points[i2];
|
|
24592
|
-
this.points.push(new Vector2
|
|
24592
|
+
this.points.push(new Vector2().fromArray(point));
|
|
24593
24593
|
}
|
|
24594
24594
|
return this;
|
|
24595
24595
|
}
|
|
@@ -24741,7 +24741,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
24741
24741
|
constructor(points) {
|
|
24742
24742
|
super();
|
|
24743
24743
|
this.type = "Path";
|
|
24744
|
-
this.currentPoint = new Vector2
|
|
24744
|
+
this.currentPoint = new Vector2();
|
|
24745
24745
|
if (points) {
|
|
24746
24746
|
this.setFromPoints(points);
|
|
24747
24747
|
}
|
|
@@ -24758,7 +24758,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
24758
24758
|
return this;
|
|
24759
24759
|
}
|
|
24760
24760
|
lineTo(x, y) {
|
|
24761
|
-
const curve = new LineCurve(this.currentPoint.clone(), new Vector2
|
|
24761
|
+
const curve = new LineCurve(this.currentPoint.clone(), new Vector2(x, y));
|
|
24762
24762
|
this.curves.push(curve);
|
|
24763
24763
|
this.currentPoint.set(x, y);
|
|
24764
24764
|
return this;
|
|
@@ -24766,8 +24766,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
24766
24766
|
quadraticCurveTo(aCPx, aCPy, aX, aY) {
|
|
24767
24767
|
const curve = new QuadraticBezierCurve(
|
|
24768
24768
|
this.currentPoint.clone(),
|
|
24769
|
-
new Vector2
|
|
24770
|
-
new Vector2
|
|
24769
|
+
new Vector2(aCPx, aCPy),
|
|
24770
|
+
new Vector2(aX, aY)
|
|
24771
24771
|
);
|
|
24772
24772
|
this.curves.push(curve);
|
|
24773
24773
|
this.currentPoint.set(aX, aY);
|
|
@@ -24776,9 +24776,9 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
24776
24776
|
bezierCurveTo(aCP1x, aCP1y, aCP2x, aCP2y, aX, aY) {
|
|
24777
24777
|
const curve = new CubicBezierCurve(
|
|
24778
24778
|
this.currentPoint.clone(),
|
|
24779
|
-
new Vector2
|
|
24780
|
-
new Vector2
|
|
24781
|
-
new Vector2
|
|
24779
|
+
new Vector2(aCP1x, aCP1y),
|
|
24780
|
+
new Vector2(aCP2x, aCP2y),
|
|
24781
|
+
new Vector2(aX, aY)
|
|
24782
24782
|
);
|
|
24783
24783
|
this.curves.push(curve);
|
|
24784
24784
|
this.currentPoint.set(aX, aY);
|
|
@@ -24844,7 +24844,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
24844
24844
|
}
|
|
24845
24845
|
}
|
|
24846
24846
|
class LatheGeometry extends BufferGeometry {
|
|
24847
|
-
constructor(points = [new Vector2
|
|
24847
|
+
constructor(points = [new Vector2(0, -0.5), new Vector2(0.5, 0), new Vector2(0, 0.5)], segments = 12, phiStart = 0, phiLength = Math.PI * 2) {
|
|
24848
24848
|
super();
|
|
24849
24849
|
this.type = "LatheGeometry";
|
|
24850
24850
|
this.parameters = {
|
|
@@ -24861,11 +24861,11 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
24861
24861
|
const initNormals = [];
|
|
24862
24862
|
const normals = [];
|
|
24863
24863
|
const inverseSegments = 1 / segments;
|
|
24864
|
-
const vertex2 = new Vector3
|
|
24865
|
-
const uv = new Vector2
|
|
24866
|
-
const normal = new Vector3
|
|
24867
|
-
const curNormal = new Vector3
|
|
24868
|
-
const prevNormal = new Vector3
|
|
24864
|
+
const vertex2 = new Vector3();
|
|
24865
|
+
const uv = new Vector2();
|
|
24866
|
+
const normal = new Vector3();
|
|
24867
|
+
const curNormal = new Vector3();
|
|
24868
|
+
const prevNormal = new Vector3();
|
|
24869
24869
|
let dx = 0;
|
|
24870
24870
|
let dy = 0;
|
|
24871
24871
|
for (let j = 0; j <= points.length - 1; j++) {
|
|
@@ -24974,8 +24974,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
24974
24974
|
const vertices = [];
|
|
24975
24975
|
const normals = [];
|
|
24976
24976
|
const uvs = [];
|
|
24977
|
-
const vertex2 = new Vector3
|
|
24978
|
-
const uv = new Vector2
|
|
24977
|
+
const vertex2 = new Vector3();
|
|
24978
|
+
const uv = new Vector2();
|
|
24979
24979
|
vertices.push(0, 0, 0);
|
|
24980
24980
|
normals.push(0, 0, 1);
|
|
24981
24981
|
uvs.push(0.5, 0.5);
|
|
@@ -25041,8 +25041,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
25041
25041
|
this.setAttribute("normal", new Float32BufferAttribute(normals, 3));
|
|
25042
25042
|
this.setAttribute("uv", new Float32BufferAttribute(uvs, 2));
|
|
25043
25043
|
function generateTorso() {
|
|
25044
|
-
const normal = new Vector3
|
|
25045
|
-
const vertex2 = new Vector3
|
|
25044
|
+
const normal = new Vector3();
|
|
25045
|
+
const vertex2 = new Vector3();
|
|
25046
25046
|
let groupCount = 0;
|
|
25047
25047
|
const slope = (radiusBottom - radiusTop) / height;
|
|
25048
25048
|
for (let y = 0; y <= heightSegments; y++) {
|
|
@@ -25086,8 +25086,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
25086
25086
|
}
|
|
25087
25087
|
function generateCap(top) {
|
|
25088
25088
|
const centerIndexStart = index2;
|
|
25089
|
-
const uv = new Vector2
|
|
25090
|
-
const vertex2 = new Vector3
|
|
25089
|
+
const uv = new Vector2();
|
|
25090
|
+
const vertex2 = new Vector3();
|
|
25091
25091
|
let groupCount = 0;
|
|
25092
25092
|
const radius = top === true ? radiusTop : radiusBottom;
|
|
25093
25093
|
const sign2 = top === true ? 1 : -1;
|
|
@@ -25178,9 +25178,9 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
25178
25178
|
this.normalizeNormals();
|
|
25179
25179
|
}
|
|
25180
25180
|
function subdivide(detail2) {
|
|
25181
|
-
const a = new Vector3
|
|
25182
|
-
const b = new Vector3
|
|
25183
|
-
const c = new Vector3
|
|
25181
|
+
const a = new Vector3();
|
|
25182
|
+
const b = new Vector3();
|
|
25183
|
+
const c = new Vector3();
|
|
25184
25184
|
for (let i2 = 0; i2 < indices.length; i2 += 3) {
|
|
25185
25185
|
getVertexByIndex(indices[i2 + 0], a);
|
|
25186
25186
|
getVertexByIndex(indices[i2 + 1], b);
|
|
@@ -25220,7 +25220,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
25220
25220
|
}
|
|
25221
25221
|
}
|
|
25222
25222
|
function applyRadius(radius2) {
|
|
25223
|
-
const vertex2 = new Vector3
|
|
25223
|
+
const vertex2 = new Vector3();
|
|
25224
25224
|
for (let i2 = 0; i2 < vertexBuffer.length; i2 += 3) {
|
|
25225
25225
|
vertex2.x = vertexBuffer[i2 + 0];
|
|
25226
25226
|
vertex2.y = vertexBuffer[i2 + 1];
|
|
@@ -25232,7 +25232,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
25232
25232
|
}
|
|
25233
25233
|
}
|
|
25234
25234
|
function generateUVs() {
|
|
25235
|
-
const vertex2 = new Vector3
|
|
25235
|
+
const vertex2 = new Vector3();
|
|
25236
25236
|
for (let i2 = 0; i2 < vertexBuffer.length; i2 += 3) {
|
|
25237
25237
|
vertex2.x = vertexBuffer[i2 + 0];
|
|
25238
25238
|
vertex2.y = vertexBuffer[i2 + 1];
|
|
@@ -25268,13 +25268,13 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
25268
25268
|
vertex2.z = vertices[stride + 2];
|
|
25269
25269
|
}
|
|
25270
25270
|
function correctUVs() {
|
|
25271
|
-
const a = new Vector3
|
|
25272
|
-
const b = new Vector3
|
|
25273
|
-
const c = new Vector3
|
|
25274
|
-
const centroid = new Vector3
|
|
25275
|
-
const uvA = new Vector2
|
|
25276
|
-
const uvB = new Vector2
|
|
25277
|
-
const uvC = new Vector2
|
|
25271
|
+
const a = new Vector3();
|
|
25272
|
+
const b = new Vector3();
|
|
25273
|
+
const c = new Vector3();
|
|
25274
|
+
const centroid = new Vector3();
|
|
25275
|
+
const uvA = new Vector2();
|
|
25276
|
+
const uvB = new Vector2();
|
|
25277
|
+
const uvC = new Vector2();
|
|
25278
25278
|
for (let i2 = 0, j = 0; i2 < vertexBuffer.length; i2 += 9, j += 6) {
|
|
25279
25279
|
a.set(vertexBuffer[i2 + 0], vertexBuffer[i2 + 1], vertexBuffer[i2 + 2]);
|
|
25280
25280
|
b.set(vertexBuffer[i2 + 3], vertexBuffer[i2 + 4], vertexBuffer[i2 + 5]);
|
|
@@ -25504,9 +25504,9 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
25504
25504
|
return new DodecahedronGeometry(data2.radius, data2.detail);
|
|
25505
25505
|
}
|
|
25506
25506
|
}
|
|
25507
|
-
const _v0$3 = /* @__PURE__ */ new Vector3
|
|
25508
|
-
const _v1$1 = /* @__PURE__ */ new Vector3
|
|
25509
|
-
const _normal = /* @__PURE__ */ new Vector3
|
|
25507
|
+
const _v0$3 = /* @__PURE__ */ new Vector3();
|
|
25508
|
+
const _v1$1 = /* @__PURE__ */ new Vector3();
|
|
25509
|
+
const _normal = /* @__PURE__ */ new Vector3();
|
|
25510
25510
|
const _triangle = /* @__PURE__ */ new Triangle();
|
|
25511
25511
|
class EdgesGeometry extends BufferGeometry {
|
|
25512
25512
|
constructor(geometry = null, thresholdAngle = 1) {
|
|
@@ -26080,7 +26080,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
26080
26080
|
}
|
|
26081
26081
|
}
|
|
26082
26082
|
class ExtrudeGeometry extends BufferGeometry {
|
|
26083
|
-
constructor(shapes = new Shape([new Vector2
|
|
26083
|
+
constructor(shapes = new Shape([new Vector2(0.5, 0.5), new Vector2(-0.5, 0.5), new Vector2(-0.5, -0.5), new Vector2(0.5, -0.5)]), options = {}) {
|
|
26084
26084
|
super();
|
|
26085
26085
|
this.type = "ExtrudeGeometry";
|
|
26086
26086
|
this.parameters = {
|
|
@@ -26117,9 +26117,9 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
26117
26117
|
extrudeByPath = true;
|
|
26118
26118
|
bevelEnabled = false;
|
|
26119
26119
|
splineTube = extrudePath.computeFrenetFrames(steps, false);
|
|
26120
|
-
binormal = new Vector3
|
|
26121
|
-
normal = new Vector3
|
|
26122
|
-
position2 = new Vector3
|
|
26120
|
+
binormal = new Vector3();
|
|
26121
|
+
normal = new Vector3();
|
|
26122
|
+
position2 = new Vector3();
|
|
26123
26123
|
}
|
|
26124
26124
|
if (!bevelEnabled) {
|
|
26125
26125
|
bevelSegments = 0;
|
|
@@ -26169,7 +26169,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
26169
26169
|
v_trans_y = ptPrevShift_y + v_prev_y * sf - inPt.y;
|
|
26170
26170
|
const v_trans_lensq = v_trans_x * v_trans_x + v_trans_y * v_trans_y;
|
|
26171
26171
|
if (v_trans_lensq <= 2) {
|
|
26172
|
-
return new Vector2
|
|
26172
|
+
return new Vector2(v_trans_x, v_trans_y);
|
|
26173
26173
|
} else {
|
|
26174
26174
|
shrink_by = Math.sqrt(v_trans_lensq / 2);
|
|
26175
26175
|
}
|
|
@@ -26200,7 +26200,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
26200
26200
|
shrink_by = Math.sqrt(v_prev_lensq / 2);
|
|
26201
26201
|
}
|
|
26202
26202
|
}
|
|
26203
|
-
return new Vector2
|
|
26203
|
+
return new Vector2(v_trans_x / shrink_by, v_trans_y / shrink_by);
|
|
26204
26204
|
}
|
|
26205
26205
|
const contourMovements = [];
|
|
26206
26206
|
for (let i2 = 0, il = contour.length, j = il - 1, k = i2 + 1; i2 < il; i2++, j++, k++) {
|
|
@@ -26414,9 +26414,9 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
26414
26414
|
const c_x = vertices[indexC * 3];
|
|
26415
26415
|
const c_y = vertices[indexC * 3 + 1];
|
|
26416
26416
|
return [
|
|
26417
|
-
new Vector2
|
|
26418
|
-
new Vector2
|
|
26419
|
-
new Vector2
|
|
26417
|
+
new Vector2(a_x, a_y),
|
|
26418
|
+
new Vector2(b_x, b_y),
|
|
26419
|
+
new Vector2(c_x, c_y)
|
|
26420
26420
|
];
|
|
26421
26421
|
},
|
|
26422
26422
|
generateSideWallUV: function(geometry, vertices, indexA, indexB, indexC, indexD) {
|
|
@@ -26434,17 +26434,17 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
26434
26434
|
const d_z = vertices[indexD * 3 + 2];
|
|
26435
26435
|
if (Math.abs(a_y - b_y) < Math.abs(a_x - b_x)) {
|
|
26436
26436
|
return [
|
|
26437
|
-
new Vector2
|
|
26438
|
-
new Vector2
|
|
26439
|
-
new Vector2
|
|
26440
|
-
new Vector2
|
|
26437
|
+
new Vector2(a_x, 1 - a_z),
|
|
26438
|
+
new Vector2(b_x, 1 - b_z),
|
|
26439
|
+
new Vector2(c_x, 1 - c_z),
|
|
26440
|
+
new Vector2(d_x, 1 - d_z)
|
|
26441
26441
|
];
|
|
26442
26442
|
} else {
|
|
26443
26443
|
return [
|
|
26444
|
-
new Vector2
|
|
26445
|
-
new Vector2
|
|
26446
|
-
new Vector2
|
|
26447
|
-
new Vector2
|
|
26444
|
+
new Vector2(a_y, 1 - a_z),
|
|
26445
|
+
new Vector2(b_y, 1 - b_z),
|
|
26446
|
+
new Vector2(c_y, 1 - c_z),
|
|
26447
|
+
new Vector2(d_y, 1 - d_z)
|
|
26448
26448
|
];
|
|
26449
26449
|
}
|
|
26450
26450
|
}
|
|
@@ -26712,8 +26712,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
26712
26712
|
const uvs = [];
|
|
26713
26713
|
let radius = innerRadius;
|
|
26714
26714
|
const radiusStep = (outerRadius - innerRadius) / phiSegments;
|
|
26715
|
-
const vertex2 = new Vector3
|
|
26716
|
-
const uv = new Vector2
|
|
26715
|
+
const vertex2 = new Vector3();
|
|
26716
|
+
const uv = new Vector2();
|
|
26717
26717
|
for (let j = 0; j <= phiSegments; j++) {
|
|
26718
26718
|
for (let i2 = 0; i2 <= thetaSegments; i2++) {
|
|
26719
26719
|
const segment = thetaStart + i2 / thetaSegments * thetaLength;
|
|
@@ -26754,7 +26754,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
26754
26754
|
}
|
|
26755
26755
|
}
|
|
26756
26756
|
class ShapeGeometry extends BufferGeometry {
|
|
26757
|
-
constructor(shapes = new Shape([new Vector2
|
|
26757
|
+
constructor(shapes = new Shape([new Vector2(0, 0.5), new Vector2(-0.5, -0.5), new Vector2(0.5, -0.5)]), curveSegments = 12) {
|
|
26758
26758
|
super();
|
|
26759
26759
|
this.type = "ShapeGeometry";
|
|
26760
26760
|
this.parameters = {
|
|
@@ -26865,8 +26865,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
26865
26865
|
const thetaEnd = Math.min(thetaStart + thetaLength, Math.PI);
|
|
26866
26866
|
let index2 = 0;
|
|
26867
26867
|
const grid = [];
|
|
26868
|
-
const vertex2 = new Vector3
|
|
26869
|
-
const normal = new Vector3
|
|
26868
|
+
const vertex2 = new Vector3();
|
|
26869
|
+
const normal = new Vector3();
|
|
26870
26870
|
const indices = [];
|
|
26871
26871
|
const vertices = [];
|
|
26872
26872
|
const normals = [];
|
|
@@ -26975,9 +26975,9 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
26975
26975
|
const vertices = [];
|
|
26976
26976
|
const normals = [];
|
|
26977
26977
|
const uvs = [];
|
|
26978
|
-
const center = new Vector3
|
|
26979
|
-
const vertex2 = new Vector3
|
|
26980
|
-
const normal = new Vector3
|
|
26978
|
+
const center = new Vector3();
|
|
26979
|
+
const vertex2 = new Vector3();
|
|
26980
|
+
const normal = new Vector3();
|
|
26981
26981
|
for (let j = 0; j <= radialSegments; j++) {
|
|
26982
26982
|
for (let i2 = 0; i2 <= tubularSegments; i2++) {
|
|
26983
26983
|
const u = i2 / tubularSegments * arc;
|
|
@@ -27036,13 +27036,13 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
27036
27036
|
const vertices = [];
|
|
27037
27037
|
const normals = [];
|
|
27038
27038
|
const uvs = [];
|
|
27039
|
-
const vertex2 = new Vector3
|
|
27040
|
-
const normal = new Vector3
|
|
27041
|
-
const P1 = new Vector3
|
|
27042
|
-
const P2 = new Vector3
|
|
27043
|
-
const B = new Vector3
|
|
27044
|
-
const T = new Vector3
|
|
27045
|
-
const N = new Vector3
|
|
27039
|
+
const vertex2 = new Vector3();
|
|
27040
|
+
const normal = new Vector3();
|
|
27041
|
+
const P1 = new Vector3();
|
|
27042
|
+
const P2 = new Vector3();
|
|
27043
|
+
const B = new Vector3();
|
|
27044
|
+
const T = new Vector3();
|
|
27045
|
+
const N = new Vector3();
|
|
27046
27046
|
for (let i2 = 0; i2 <= tubularSegments; ++i2) {
|
|
27047
27047
|
const u = i2 / tubularSegments * p * Math.PI * 2;
|
|
27048
27048
|
calculatePositionOnCurve(u, p, q, radius, P1);
|
|
@@ -27101,7 +27101,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
27101
27101
|
}
|
|
27102
27102
|
}
|
|
27103
27103
|
class TubeGeometry extends BufferGeometry {
|
|
27104
|
-
constructor(path = new QuadraticBezierCurve3(new Vector3
|
|
27104
|
+
constructor(path = new QuadraticBezierCurve3(new Vector3(-1, -1, 0), new Vector3(-1, 1, 0), new Vector3(1, 1, 0)), tubularSegments = 64, radius = 1, radialSegments = 8, closed = false) {
|
|
27105
27105
|
super();
|
|
27106
27106
|
this.type = "TubeGeometry";
|
|
27107
27107
|
this.parameters = {
|
|
@@ -27115,10 +27115,10 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
27115
27115
|
this.tangents = frames.tangents;
|
|
27116
27116
|
this.normals = frames.normals;
|
|
27117
27117
|
this.binormals = frames.binormals;
|
|
27118
|
-
const vertex2 = new Vector3
|
|
27119
|
-
const normal = new Vector3
|
|
27120
|
-
const uv = new Vector2
|
|
27121
|
-
let P = new Vector3
|
|
27118
|
+
const vertex2 = new Vector3();
|
|
27119
|
+
const normal = new Vector3();
|
|
27120
|
+
const uv = new Vector2();
|
|
27121
|
+
let P = new Vector3();
|
|
27122
27122
|
const vertices = [];
|
|
27123
27123
|
const normals = [];
|
|
27124
27124
|
const uvs = [];
|
|
@@ -27207,8 +27207,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
27207
27207
|
if (geometry !== null) {
|
|
27208
27208
|
const vertices = [];
|
|
27209
27209
|
const edges = /* @__PURE__ */ new Set();
|
|
27210
|
-
const start = new Vector3
|
|
27211
|
-
const end = new Vector3
|
|
27210
|
+
const start = new Vector3();
|
|
27211
|
+
const end = new Vector3();
|
|
27212
27212
|
if (geometry.index !== null) {
|
|
27213
27213
|
const position = geometry.attributes.position;
|
|
27214
27214
|
const indices = geometry.index;
|
|
@@ -27337,7 +27337,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
27337
27337
|
this.bumpScale = 1;
|
|
27338
27338
|
this.normalMap = null;
|
|
27339
27339
|
this.normalMapType = TangentSpaceNormalMap;
|
|
27340
|
-
this.normalScale = new Vector2
|
|
27340
|
+
this.normalScale = new Vector2(1, 1);
|
|
27341
27341
|
this.displacementMap = null;
|
|
27342
27342
|
this.displacementScale = 1;
|
|
27343
27343
|
this.displacementBias = 0;
|
|
@@ -27406,7 +27406,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
27406
27406
|
this.clearcoatMap = null;
|
|
27407
27407
|
this.clearcoatRoughness = 0;
|
|
27408
27408
|
this.clearcoatRoughnessMap = null;
|
|
27409
|
-
this.clearcoatNormalScale = new Vector2
|
|
27409
|
+
this.clearcoatNormalScale = new Vector2(1, 1);
|
|
27410
27410
|
this.clearcoatNormalMap = null;
|
|
27411
27411
|
this.ior = 1.5;
|
|
27412
27412
|
Object.defineProperty(this, "reflectivity", {
|
|
@@ -27556,7 +27556,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
27556
27556
|
this.bumpScale = 1;
|
|
27557
27557
|
this.normalMap = null;
|
|
27558
27558
|
this.normalMapType = TangentSpaceNormalMap;
|
|
27559
|
-
this.normalScale = new Vector2
|
|
27559
|
+
this.normalScale = new Vector2(1, 1);
|
|
27560
27560
|
this.displacementMap = null;
|
|
27561
27561
|
this.displacementScale = 1;
|
|
27562
27562
|
this.displacementBias = 0;
|
|
@@ -27632,7 +27632,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
27632
27632
|
this.bumpScale = 1;
|
|
27633
27633
|
this.normalMap = null;
|
|
27634
27634
|
this.normalMapType = TangentSpaceNormalMap;
|
|
27635
|
-
this.normalScale = new Vector2
|
|
27635
|
+
this.normalScale = new Vector2(1, 1);
|
|
27636
27636
|
this.displacementMap = null;
|
|
27637
27637
|
this.displacementScale = 1;
|
|
27638
27638
|
this.displacementBias = 0;
|
|
@@ -27682,7 +27682,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
27682
27682
|
this.bumpScale = 1;
|
|
27683
27683
|
this.normalMap = null;
|
|
27684
27684
|
this.normalMapType = TangentSpaceNormalMap;
|
|
27685
|
-
this.normalScale = new Vector2
|
|
27685
|
+
this.normalScale = new Vector2(1, 1);
|
|
27686
27686
|
this.displacementMap = null;
|
|
27687
27687
|
this.displacementScale = 1;
|
|
27688
27688
|
this.displacementBias = 0;
|
|
@@ -27725,7 +27725,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
27725
27725
|
this.bumpScale = 1;
|
|
27726
27726
|
this.normalMap = null;
|
|
27727
27727
|
this.normalMapType = TangentSpaceNormalMap;
|
|
27728
|
-
this.normalScale = new Vector2
|
|
27728
|
+
this.normalScale = new Vector2(1, 1);
|
|
27729
27729
|
this.displacementMap = null;
|
|
27730
27730
|
this.displacementScale = 1;
|
|
27731
27731
|
this.displacementBias = 0;
|
|
@@ -27842,7 +27842,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
27842
27842
|
this.bumpScale = 1;
|
|
27843
27843
|
this.normalMap = null;
|
|
27844
27844
|
this.normalMapType = TangentSpaceNormalMap;
|
|
27845
|
-
this.normalScale = new Vector2
|
|
27845
|
+
this.normalScale = new Vector2(1, 1);
|
|
27846
27846
|
this.displacementMap = null;
|
|
27847
27847
|
this.displacementScale = 1;
|
|
27848
27848
|
this.displacementBias = 0;
|
|
@@ -29362,8 +29362,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
29362
29362
|
}
|
|
29363
29363
|
}
|
|
29364
29364
|
const _projScreenMatrix$1 = /* @__PURE__ */ new Matrix4();
|
|
29365
|
-
const _lightPositionWorld$1 = /* @__PURE__ */ new Vector3
|
|
29366
|
-
const _lookTarget$1 = /* @__PURE__ */ new Vector3
|
|
29365
|
+
const _lightPositionWorld$1 = /* @__PURE__ */ new Vector3();
|
|
29366
|
+
const _lookTarget$1 = /* @__PURE__ */ new Vector3();
|
|
29367
29367
|
class LightShadow {
|
|
29368
29368
|
constructor(camera2) {
|
|
29369
29369
|
this.camera = camera2;
|
|
@@ -29372,14 +29372,14 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
29372
29372
|
this.normalBias = 0;
|
|
29373
29373
|
this.radius = 1;
|
|
29374
29374
|
this.blurSamples = 8;
|
|
29375
|
-
this.mapSize = new Vector2
|
|
29375
|
+
this.mapSize = new Vector2(512, 512);
|
|
29376
29376
|
this.map = null;
|
|
29377
29377
|
this.mapPass = null;
|
|
29378
29378
|
this.matrix = new Matrix4();
|
|
29379
29379
|
this.autoUpdate = true;
|
|
29380
29380
|
this.needsUpdate = false;
|
|
29381
29381
|
this._frustum = new Frustum();
|
|
29382
|
-
this._frameExtents = new Vector2
|
|
29382
|
+
this._frameExtents = new Vector2(1, 1);
|
|
29383
29383
|
this._viewportCount = 1;
|
|
29384
29384
|
this._viewports = [
|
|
29385
29385
|
new Vector4(0, 0, 1, 1)
|
|
@@ -29519,13 +29519,13 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
29519
29519
|
}
|
|
29520
29520
|
}
|
|
29521
29521
|
const _projScreenMatrix = /* @__PURE__ */ new Matrix4();
|
|
29522
|
-
const _lightPositionWorld = /* @__PURE__ */ new Vector3
|
|
29523
|
-
const _lookTarget = /* @__PURE__ */ new Vector3
|
|
29522
|
+
const _lightPositionWorld = /* @__PURE__ */ new Vector3();
|
|
29523
|
+
const _lookTarget = /* @__PURE__ */ new Vector3();
|
|
29524
29524
|
class PointLightShadow extends LightShadow {
|
|
29525
29525
|
constructor() {
|
|
29526
29526
|
super(new PerspectiveCamera(90, 1, 0.5, 500));
|
|
29527
29527
|
this.isPointLightShadow = true;
|
|
29528
|
-
this._frameExtents = new Vector2
|
|
29528
|
+
this._frameExtents = new Vector2(4, 2);
|
|
29529
29529
|
this._viewportCount = 6;
|
|
29530
29530
|
this._viewports = [
|
|
29531
29531
|
// These viewports map a cube-map onto a 2D texture with the
|
|
@@ -29554,20 +29554,20 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
29554
29554
|
new Vector4(1, 0, 1, 1)
|
|
29555
29555
|
];
|
|
29556
29556
|
this._cubeDirections = [
|
|
29557
|
-
new Vector3
|
|
29558
|
-
new Vector3
|
|
29559
|
-
new Vector3
|
|
29560
|
-
new Vector3
|
|
29561
|
-
new Vector3
|
|
29562
|
-
new Vector3
|
|
29557
|
+
new Vector3(1, 0, 0),
|
|
29558
|
+
new Vector3(-1, 0, 0),
|
|
29559
|
+
new Vector3(0, 0, 1),
|
|
29560
|
+
new Vector3(0, 0, -1),
|
|
29561
|
+
new Vector3(0, 1, 0),
|
|
29562
|
+
new Vector3(0, -1, 0)
|
|
29563
29563
|
];
|
|
29564
29564
|
this._cubeUps = [
|
|
29565
|
-
new Vector3
|
|
29566
|
-
new Vector3
|
|
29567
|
-
new Vector3
|
|
29568
|
-
new Vector3
|
|
29569
|
-
new Vector3
|
|
29570
|
-
new Vector3
|
|
29565
|
+
new Vector3(0, 1, 0),
|
|
29566
|
+
new Vector3(0, 1, 0),
|
|
29567
|
+
new Vector3(0, 1, 0),
|
|
29568
|
+
new Vector3(0, 1, 0),
|
|
29569
|
+
new Vector3(0, 0, 1),
|
|
29570
|
+
new Vector3(0, 0, -1)
|
|
29571
29571
|
];
|
|
29572
29572
|
}
|
|
29573
29573
|
updateMatrices(light, viewportIndex = 0) {
|
|
@@ -29768,7 +29768,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
29768
29768
|
this.isSphericalHarmonics3 = true;
|
|
29769
29769
|
this.coefficients = [];
|
|
29770
29770
|
for (let i2 = 0; i2 < 9; i2++) {
|
|
29771
|
-
this.coefficients.push(new Vector3
|
|
29771
|
+
this.coefficients.push(new Vector3());
|
|
29772
29772
|
}
|
|
29773
29773
|
}
|
|
29774
29774
|
set(coefficients) {
|
|
@@ -30031,10 +30031,10 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
30031
30031
|
material.uniforms[name].value = new Color().setHex(uniform.value);
|
|
30032
30032
|
break;
|
|
30033
30033
|
case "v2":
|
|
30034
|
-
material.uniforms[name].value = new Vector2
|
|
30034
|
+
material.uniforms[name].value = new Vector2().fromArray(uniform.value);
|
|
30035
30035
|
break;
|
|
30036
30036
|
case "v3":
|
|
30037
|
-
material.uniforms[name].value = new Vector3
|
|
30037
|
+
material.uniforms[name].value = new Vector3().fromArray(uniform.value);
|
|
30038
30038
|
break;
|
|
30039
30039
|
case "v4":
|
|
30040
30040
|
material.uniforms[name].value = new Vector4().fromArray(uniform.value);
|
|
@@ -30075,7 +30075,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
30075
30075
|
if (Array.isArray(normalScale) === false) {
|
|
30076
30076
|
normalScale = [normalScale, normalScale];
|
|
30077
30077
|
}
|
|
30078
|
-
material.normalScale = new Vector2
|
|
30078
|
+
material.normalScale = new Vector2().fromArray(normalScale);
|
|
30079
30079
|
}
|
|
30080
30080
|
if (json.displacementMap !== void 0) material.displacementMap = getTexture(json.displacementMap);
|
|
30081
30081
|
if (json.displacementScale !== void 0) material.displacementScale = json.displacementScale;
|
|
@@ -30100,7 +30100,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
30100
30100
|
if (json.clearcoatMap !== void 0) material.clearcoatMap = getTexture(json.clearcoatMap);
|
|
30101
30101
|
if (json.clearcoatRoughnessMap !== void 0) material.clearcoatRoughnessMap = getTexture(json.clearcoatRoughnessMap);
|
|
30102
30102
|
if (json.clearcoatNormalMap !== void 0) material.clearcoatNormalMap = getTexture(json.clearcoatNormalMap);
|
|
30103
|
-
if (json.clearcoatNormalScale !== void 0) material.clearcoatNormalScale = new Vector2
|
|
30103
|
+
if (json.clearcoatNormalScale !== void 0) material.clearcoatNormalScale = new Vector2().fromArray(json.clearcoatNormalScale);
|
|
30104
30104
|
if (json.iridescenceMap !== void 0) material.iridescenceMap = getTexture(json.iridescenceMap);
|
|
30105
30105
|
if (json.iridescenceThicknessMap !== void 0) material.iridescenceThicknessMap = getTexture(json.iridescenceThicknessMap);
|
|
30106
30106
|
if (json.transmissionMap !== void 0) material.transmissionMap = getTexture(json.transmissionMap);
|
|
@@ -30293,7 +30293,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
30293
30293
|
}
|
|
30294
30294
|
const boundingSphere = json.data.boundingSphere;
|
|
30295
30295
|
if (boundingSphere !== void 0) {
|
|
30296
|
-
const center = new Vector3
|
|
30296
|
+
const center = new Vector3();
|
|
30297
30297
|
if (boundingSphere.center !== void 0) {
|
|
30298
30298
|
center.fromArray(boundingSphere.center);
|
|
30299
30299
|
}
|
|
@@ -30768,7 +30768,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
30768
30768
|
object._visibility = data2.visibility;
|
|
30769
30769
|
object._active = data2.active;
|
|
30770
30770
|
object._bounds = data2.bounds.map((bound) => {
|
|
30771
|
-
const box = new Box3
|
|
30771
|
+
const box = new Box3();
|
|
30772
30772
|
box.min.fromArray(bound.boxMin);
|
|
30773
30773
|
box.max.fromArray(bound.boxMax);
|
|
30774
30774
|
const sphere = new Sphere();
|
|
@@ -31129,10 +31129,10 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
31129
31129
|
function now() {
|
|
31130
31130
|
return performance.now();
|
|
31131
31131
|
}
|
|
31132
|
-
const _position$1 = /* @__PURE__ */ new Vector3
|
|
31132
|
+
const _position$1 = /* @__PURE__ */ new Vector3();
|
|
31133
31133
|
const _quaternion$1 = /* @__PURE__ */ new Quaternion();
|
|
31134
|
-
const _scale$1 = /* @__PURE__ */ new Vector3
|
|
31135
|
-
const _orientation$1 = /* @__PURE__ */ new Vector3
|
|
31134
|
+
const _scale$1 = /* @__PURE__ */ new Vector3();
|
|
31135
|
+
const _orientation$1 = /* @__PURE__ */ new Vector3();
|
|
31136
31136
|
class AudioListener extends Object3D$1 {
|
|
31137
31137
|
constructor() {
|
|
31138
31138
|
super();
|
|
@@ -31444,10 +31444,10 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
31444
31444
|
return new this.constructor(this.listener).copy(this, recursive);
|
|
31445
31445
|
}
|
|
31446
31446
|
}
|
|
31447
|
-
const _position = /* @__PURE__ */ new Vector3
|
|
31447
|
+
const _position = /* @__PURE__ */ new Vector3();
|
|
31448
31448
|
const _quaternion = /* @__PURE__ */ new Quaternion();
|
|
31449
|
-
const _scale = /* @__PURE__ */ new Vector3
|
|
31450
|
-
const _orientation = /* @__PURE__ */ new Vector3
|
|
31449
|
+
const _scale = /* @__PURE__ */ new Vector3();
|
|
31450
|
+
const _orientation = /* @__PURE__ */ new Vector3();
|
|
31451
31451
|
class PositionalAudio extends Audio {
|
|
31452
31452
|
constructor(listener2) {
|
|
31453
31453
|
super(listener2);
|
|
@@ -33234,9 +33234,9 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
33234
33234
|
return this;
|
|
33235
33235
|
}
|
|
33236
33236
|
}
|
|
33237
|
-
const _vector$4 = /* @__PURE__ */ new Vector2
|
|
33237
|
+
const _vector$4 = /* @__PURE__ */ new Vector2();
|
|
33238
33238
|
class Box2 {
|
|
33239
|
-
constructor(min2 = new Vector2
|
|
33239
|
+
constructor(min2 = new Vector2(Infinity, Infinity), max2 = new Vector2(-Infinity, -Infinity)) {
|
|
33240
33240
|
this.isBox2 = true;
|
|
33241
33241
|
this.min = min2;
|
|
33242
33242
|
this.max = max2;
|
|
@@ -33337,10 +33337,10 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
33337
33337
|
return box.min.equals(this.min) && box.max.equals(this.max);
|
|
33338
33338
|
}
|
|
33339
33339
|
}
|
|
33340
|
-
const _startP = /* @__PURE__ */ new Vector3
|
|
33341
|
-
const _startEnd = /* @__PURE__ */ new Vector3
|
|
33340
|
+
const _startP = /* @__PURE__ */ new Vector3();
|
|
33341
|
+
const _startEnd = /* @__PURE__ */ new Vector3();
|
|
33342
33342
|
class Line3 {
|
|
33343
|
-
constructor(start = new Vector3
|
|
33343
|
+
constructor(start = new Vector3(), end = new Vector3()) {
|
|
33344
33344
|
this.start = start;
|
|
33345
33345
|
this.end = end;
|
|
33346
33346
|
}
|
|
@@ -33396,7 +33396,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
33396
33396
|
return new this.constructor().copy(this);
|
|
33397
33397
|
}
|
|
33398
33398
|
}
|
|
33399
|
-
const _vector$3 = /* @__PURE__ */ new Vector3
|
|
33399
|
+
const _vector$3 = /* @__PURE__ */ new Vector3();
|
|
33400
33400
|
class SpotLightHelper extends Object3D$1 {
|
|
33401
33401
|
constructor(light, color) {
|
|
33402
33402
|
super();
|
|
@@ -33481,7 +33481,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
33481
33481
|
}
|
|
33482
33482
|
}
|
|
33483
33483
|
}
|
|
33484
|
-
const _vector$2 = /* @__PURE__ */ new Vector3
|
|
33484
|
+
const _vector$2 = /* @__PURE__ */ new Vector3();
|
|
33485
33485
|
const _boneMatrix = /* @__PURE__ */ new Matrix4();
|
|
33486
33486
|
const _matrixWorldInv = /* @__PURE__ */ new Matrix4();
|
|
33487
33487
|
class SkeletonHelper extends LineSegments {
|
|
@@ -33572,7 +33572,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
33572
33572
|
}
|
|
33573
33573
|
}
|
|
33574
33574
|
}
|
|
33575
|
-
const _vector$1 = /* @__PURE__ */ new Vector3
|
|
33575
|
+
const _vector$1 = /* @__PURE__ */ new Vector3();
|
|
33576
33576
|
const _color1 = /* @__PURE__ */ new Color();
|
|
33577
33577
|
const _color2 = /* @__PURE__ */ new Color();
|
|
33578
33578
|
class HemisphereLightHelper extends Object3D$1 {
|
|
@@ -33694,9 +33694,9 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
33694
33694
|
this.material.dispose();
|
|
33695
33695
|
}
|
|
33696
33696
|
}
|
|
33697
|
-
const _v1 = /* @__PURE__ */ new Vector3
|
|
33698
|
-
const _v2 = /* @__PURE__ */ new Vector3
|
|
33699
|
-
const _v3 = /* @__PURE__ */ new Vector3
|
|
33697
|
+
const _v1 = /* @__PURE__ */ new Vector3();
|
|
33698
|
+
const _v2 = /* @__PURE__ */ new Vector3();
|
|
33699
|
+
const _v3 = /* @__PURE__ */ new Vector3();
|
|
33700
33700
|
class DirectionalLightHelper extends Object3D$1 {
|
|
33701
33701
|
constructor(light, size, color) {
|
|
33702
33702
|
super();
|
|
@@ -33757,7 +33757,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
33757
33757
|
this.targetLine.scale.z = _v3.length();
|
|
33758
33758
|
}
|
|
33759
33759
|
}
|
|
33760
|
-
const _vector$d = /* @__PURE__ */ new Vector3
|
|
33760
|
+
const _vector$d = /* @__PURE__ */ new Vector3();
|
|
33761
33761
|
const _camera$1 = /* @__PURE__ */ new Camera$2();
|
|
33762
33762
|
class CameraHelper extends LineSegments {
|
|
33763
33763
|
constructor(camera2) {
|
|
@@ -33918,7 +33918,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
33918
33918
|
}
|
|
33919
33919
|
}
|
|
33920
33920
|
}
|
|
33921
|
-
const _box = /* @__PURE__ */ new Box3
|
|
33921
|
+
const _box = /* @__PURE__ */ new Box3();
|
|
33922
33922
|
class BoxHelper extends LineSegments {
|
|
33923
33923
|
constructor(object, color = 16776960) {
|
|
33924
33924
|
const indices = new Uint16Array([0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 6, 6, 7, 7, 4, 0, 4, 1, 5, 2, 6, 3, 7]);
|
|
@@ -34042,11 +34042,11 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
34042
34042
|
this.children[0].material.dispose();
|
|
34043
34043
|
}
|
|
34044
34044
|
}
|
|
34045
|
-
const _axis = /* @__PURE__ */ new Vector3
|
|
34045
|
+
const _axis = /* @__PURE__ */ new Vector3();
|
|
34046
34046
|
let _lineGeometry, _coneGeometry;
|
|
34047
34047
|
class ArrowHelper extends Object3D$1 {
|
|
34048
34048
|
// dir is assumed to be normalized
|
|
34049
|
-
constructor(dir = new Vector3
|
|
34049
|
+
constructor(dir = new Vector3(0, 0, 1), origin = new Vector3(0, 0, 0), length = 1, color = 16776960, headLength = length * 0.2, headWidth = headLength * 0.2) {
|
|
34050
34050
|
super();
|
|
34051
34051
|
this.type = "ArrowHelper";
|
|
34052
34052
|
if (_lineGeometry === void 0) {
|
|
@@ -34999,7 +34999,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
34999
34999
|
normalmap: {
|
|
35000
35000
|
normalMap: { value: null },
|
|
35001
35001
|
normalMapTransform: { value: /* @__PURE__ */ new Matrix3() },
|
|
35002
|
-
normalScale: { value: /* @__PURE__ */ new Vector2
|
|
35002
|
+
normalScale: { value: /* @__PURE__ */ new Vector2(1, 1) }
|
|
35003
35003
|
},
|
|
35004
35004
|
displacementmap: {
|
|
35005
35005
|
displacementMap: { value: null },
|
|
@@ -35109,7 +35109,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
35109
35109
|
sprite: {
|
|
35110
35110
|
diffuse: { value: /* @__PURE__ */ new Color(16777215) },
|
|
35111
35111
|
opacity: { value: 1 },
|
|
35112
|
-
center: { value: /* @__PURE__ */ new Vector2
|
|
35112
|
+
center: { value: /* @__PURE__ */ new Vector2(0.5, 0.5) },
|
|
35113
35113
|
rotation: { value: 0 },
|
|
35114
35114
|
map: { value: null },
|
|
35115
35115
|
mapTransform: { value: /* @__PURE__ */ new Matrix3() },
|
|
@@ -35321,7 +35321,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
35321
35321
|
UniformsLib.common,
|
|
35322
35322
|
UniformsLib.displacementmap,
|
|
35323
35323
|
{
|
|
35324
|
-
referencePosition: { value: /* @__PURE__ */ new Vector3
|
|
35324
|
+
referencePosition: { value: /* @__PURE__ */ new Vector3() },
|
|
35325
35325
|
nearDistance: { value: 1 },
|
|
35326
35326
|
farDistance: { value: 1e3 }
|
|
35327
35327
|
}
|
|
@@ -35351,7 +35351,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
35351
35351
|
clearcoatMapTransform: { value: /* @__PURE__ */ new Matrix3() },
|
|
35352
35352
|
clearcoatNormalMap: { value: null },
|
|
35353
35353
|
clearcoatNormalMapTransform: { value: /* @__PURE__ */ new Matrix3() },
|
|
35354
|
-
clearcoatNormalScale: { value: /* @__PURE__ */ new Vector2
|
|
35354
|
+
clearcoatNormalScale: { value: /* @__PURE__ */ new Vector2(1, 1) },
|
|
35355
35355
|
clearcoatRoughness: { value: 0 },
|
|
35356
35356
|
clearcoatRoughnessMap: { value: null },
|
|
35357
35357
|
clearcoatRoughnessMapTransform: { value: /* @__PURE__ */ new Matrix3() },
|
|
@@ -35374,7 +35374,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
35374
35374
|
transmission: { value: 0 },
|
|
35375
35375
|
transmissionMap: { value: null },
|
|
35376
35376
|
transmissionMapTransform: { value: /* @__PURE__ */ new Matrix3() },
|
|
35377
|
-
transmissionSamplerSize: { value: /* @__PURE__ */ new Vector2
|
|
35377
|
+
transmissionSamplerSize: { value: /* @__PURE__ */ new Vector2() },
|
|
35378
35378
|
transmissionSamplerMap: { value: null },
|
|
35379
35379
|
thickness: { value: 0 },
|
|
35380
35380
|
thicknessMap: { value: null },
|
|
@@ -35387,7 +35387,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
35387
35387
|
specularIntensity: { value: 1 },
|
|
35388
35388
|
specularIntensityMap: { value: null },
|
|
35389
35389
|
specularIntensityMapTransform: { value: /* @__PURE__ */ new Matrix3() },
|
|
35390
|
-
anisotropyVector: { value: /* @__PURE__ */ new Vector2
|
|
35390
|
+
anisotropyVector: { value: /* @__PURE__ */ new Vector2() },
|
|
35391
35391
|
anisotropyMap: { value: null },
|
|
35392
35392
|
anisotropyMapTransform: { value: /* @__PURE__ */ new Matrix3() }
|
|
35393
35393
|
}
|
|
@@ -36158,16 +36158,16 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
36158
36158
|
const PHI = (1 + Math.sqrt(5)) / 2;
|
|
36159
36159
|
const INV_PHI = 1 / PHI;
|
|
36160
36160
|
const _axisDirections = [
|
|
36161
|
-
/* @__PURE__ */ new Vector3
|
|
36162
|
-
/* @__PURE__ */ new Vector3
|
|
36163
|
-
/* @__PURE__ */ new Vector3
|
|
36164
|
-
/* @__PURE__ */ new Vector3
|
|
36165
|
-
/* @__PURE__ */ new Vector3
|
|
36166
|
-
/* @__PURE__ */ new Vector3
|
|
36167
|
-
/* @__PURE__ */ new Vector3
|
|
36168
|
-
/* @__PURE__ */ new Vector3
|
|
36169
|
-
/* @__PURE__ */ new Vector3
|
|
36170
|
-
/* @__PURE__ */ new Vector3
|
|
36161
|
+
/* @__PURE__ */ new Vector3(-PHI, INV_PHI, 0),
|
|
36162
|
+
/* @__PURE__ */ new Vector3(PHI, INV_PHI, 0),
|
|
36163
|
+
/* @__PURE__ */ new Vector3(-INV_PHI, 0, PHI),
|
|
36164
|
+
/* @__PURE__ */ new Vector3(INV_PHI, 0, PHI),
|
|
36165
|
+
/* @__PURE__ */ new Vector3(0, PHI, -INV_PHI),
|
|
36166
|
+
/* @__PURE__ */ new Vector3(0, PHI, INV_PHI),
|
|
36167
|
+
/* @__PURE__ */ new Vector3(-1, 1, -1),
|
|
36168
|
+
/* @__PURE__ */ new Vector3(1, 1, -1),
|
|
36169
|
+
/* @__PURE__ */ new Vector3(-1, 1, 1),
|
|
36170
|
+
/* @__PURE__ */ new Vector3(1, 1, 1)
|
|
36171
36171
|
];
|
|
36172
36172
|
class PMREMGenerator {
|
|
36173
36173
|
constructor(renderer) {
|
|
@@ -36568,7 +36568,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
36568
36568
|
}
|
|
36569
36569
|
function _getBlurShader(lodMax, width, height) {
|
|
36570
36570
|
const weights = new Float32Array(MAX_SAMPLES);
|
|
36571
|
-
const poleAxis = new Vector3
|
|
36571
|
+
const poleAxis = new Vector3(0, 1, 0);
|
|
36572
36572
|
const shaderMaterial = new ShaderMaterial({
|
|
36573
36573
|
name: "SphericalGaussianBlur",
|
|
36574
36574
|
defines: {
|
|
@@ -37160,7 +37160,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
37160
37160
|
entry = {
|
|
37161
37161
|
count: morphTargetsCount,
|
|
37162
37162
|
texture,
|
|
37163
|
-
size: new Vector2
|
|
37163
|
+
size: new Vector2(width, height)
|
|
37164
37164
|
};
|
|
37165
37165
|
morphTextures.set(geometry, entry);
|
|
37166
37166
|
geometry.addEventListener("dispose", disposeTexture);
|
|
@@ -37971,7 +37971,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
37971
37971
|
}
|
|
37972
37972
|
return "vec3 " + functionName2 + "( vec3 color ) { return " + toneMappingName + "ToneMapping( color ); }";
|
|
37973
37973
|
}
|
|
37974
|
-
const _v0 = /* @__PURE__ */ new Vector3
|
|
37974
|
+
const _v0 = /* @__PURE__ */ new Vector3();
|
|
37975
37975
|
function getLuminanceFunction() {
|
|
37976
37976
|
ColorManagement.getLuminanceCoefficients(_v0);
|
|
37977
37977
|
const r = _v0.x.toFixed(4);
|
|
@@ -39227,14 +39227,14 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
39227
39227
|
switch (light.type) {
|
|
39228
39228
|
case "DirectionalLight":
|
|
39229
39229
|
uniforms = {
|
|
39230
|
-
direction: new Vector3
|
|
39230
|
+
direction: new Vector3(),
|
|
39231
39231
|
color: new Color()
|
|
39232
39232
|
};
|
|
39233
39233
|
break;
|
|
39234
39234
|
case "SpotLight":
|
|
39235
39235
|
uniforms = {
|
|
39236
|
-
position: new Vector3
|
|
39237
|
-
direction: new Vector3
|
|
39236
|
+
position: new Vector3(),
|
|
39237
|
+
direction: new Vector3(),
|
|
39238
39238
|
color: new Color(),
|
|
39239
39239
|
distance: 0,
|
|
39240
39240
|
coneCos: 0,
|
|
@@ -39244,7 +39244,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
39244
39244
|
break;
|
|
39245
39245
|
case "PointLight":
|
|
39246
39246
|
uniforms = {
|
|
39247
|
-
position: new Vector3
|
|
39247
|
+
position: new Vector3(),
|
|
39248
39248
|
color: new Color(),
|
|
39249
39249
|
distance: 0,
|
|
39250
39250
|
decay: 0
|
|
@@ -39252,7 +39252,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
39252
39252
|
break;
|
|
39253
39253
|
case "HemisphereLight":
|
|
39254
39254
|
uniforms = {
|
|
39255
|
-
direction: new Vector3
|
|
39255
|
+
direction: new Vector3(),
|
|
39256
39256
|
skyColor: new Color(),
|
|
39257
39257
|
groundColor: new Color()
|
|
39258
39258
|
};
|
|
@@ -39260,9 +39260,9 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
39260
39260
|
case "RectAreaLight":
|
|
39261
39261
|
uniforms = {
|
|
39262
39262
|
color: new Color(),
|
|
39263
|
-
position: new Vector3
|
|
39264
|
-
halfWidth: new Vector3
|
|
39265
|
-
halfHeight: new Vector3
|
|
39263
|
+
position: new Vector3(),
|
|
39264
|
+
halfWidth: new Vector3(),
|
|
39265
|
+
halfHeight: new Vector3()
|
|
39266
39266
|
};
|
|
39267
39267
|
break;
|
|
39268
39268
|
}
|
|
@@ -39286,7 +39286,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
39286
39286
|
shadowBias: 0,
|
|
39287
39287
|
shadowNormalBias: 0,
|
|
39288
39288
|
shadowRadius: 1,
|
|
39289
|
-
shadowMapSize: new Vector2
|
|
39289
|
+
shadowMapSize: new Vector2()
|
|
39290
39290
|
};
|
|
39291
39291
|
break;
|
|
39292
39292
|
case "SpotLight":
|
|
@@ -39295,7 +39295,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
39295
39295
|
shadowBias: 0,
|
|
39296
39296
|
shadowNormalBias: 0,
|
|
39297
39297
|
shadowRadius: 1,
|
|
39298
|
-
shadowMapSize: new Vector2
|
|
39298
|
+
shadowMapSize: new Vector2()
|
|
39299
39299
|
};
|
|
39300
39300
|
break;
|
|
39301
39301
|
case "PointLight":
|
|
@@ -39304,7 +39304,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
39304
39304
|
shadowBias: 0,
|
|
39305
39305
|
shadowNormalBias: 0,
|
|
39306
39306
|
shadowRadius: 1,
|
|
39307
|
-
shadowMapSize: new Vector2
|
|
39307
|
+
shadowMapSize: new Vector2(),
|
|
39308
39308
|
shadowCameraNear: 1,
|
|
39309
39309
|
shadowCameraFar: 1e3
|
|
39310
39310
|
};
|
|
@@ -39358,8 +39358,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
39358
39358
|
numSpotLightShadowsWithMaps: 0,
|
|
39359
39359
|
numLightProbes: 0
|
|
39360
39360
|
};
|
|
39361
|
-
for (let i2 = 0; i2 < 9; i2++) state.probe.push(new Vector3
|
|
39362
|
-
const vector3 = new Vector3
|
|
39361
|
+
for (let i2 = 0; i2 < 9; i2++) state.probe.push(new Vector3());
|
|
39362
|
+
const vector3 = new Vector3();
|
|
39363
39363
|
const matrix4 = new Matrix4();
|
|
39364
39364
|
const matrix42 = new Matrix4();
|
|
39365
39365
|
function setup(lights) {
|
|
@@ -39644,7 +39644,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
39644
39644
|
const fragment = "uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include <packing>\nvoid main() {\n const float samples = float( VSM_SAMPLES );\n float mean = 0.0;\n float squared_mean = 0.0;\n float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n float uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n for ( float i = 0.0; i < samples; i ++ ) {\n float uvOffset = uvStart + i * uvStride;\n #ifdef HORIZONTAL_PASS\n vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\n mean += distribution.x;\n squared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n #else\n float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\n mean += depth;\n squared_mean += depth * depth;\n #endif\n }\n mean = mean / samples;\n squared_mean = squared_mean / samples;\n float std_dev = sqrt( squared_mean - mean * mean );\n gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}";
|
|
39645
39645
|
function WebGLShadowMap(renderer, objects, capabilities) {
|
|
39646
39646
|
let _frustum2 = new Frustum();
|
|
39647
|
-
const _shadowMapSize = new Vector2
|
|
39647
|
+
const _shadowMapSize = new Vector2(), _viewportSize = new Vector2(), _viewport = new Vector4(), _depthMaterial = new MeshDepthMaterial({ depthPacking: RGBADepthPacking }), _distanceMaterial = new MeshDistanceMaterial(), _materialCache = {}, _maxTextureSize = capabilities.maxTextureSize;
|
|
39648
39648
|
const shadowSide = { [FrontSide]: BackSide, [BackSide]: FrontSide, [DoubleSide]: DoubleSide };
|
|
39649
39649
|
const shadowMaterialVertical = new ShaderMaterial({
|
|
39650
39650
|
defines: {
|
|
@@ -39652,7 +39652,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
39652
39652
|
},
|
|
39653
39653
|
uniforms: {
|
|
39654
39654
|
shadow_pass: { value: null },
|
|
39655
|
-
resolution: { value: new Vector2
|
|
39655
|
+
resolution: { value: new Vector2() },
|
|
39656
39656
|
radius: { value: 4 }
|
|
39657
39657
|
},
|
|
39658
39658
|
vertexShader: vertex,
|
|
@@ -40628,7 +40628,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
40628
40628
|
function WebGLTextures(_gl, extensions, state, properties, capabilities, utils, info) {
|
|
40629
40629
|
const multisampledRTTExt = extensions.has("WEBGL_multisampled_render_to_texture") ? extensions.get("WEBGL_multisampled_render_to_texture") : null;
|
|
40630
40630
|
const supportsInvalidateFramebuffer = typeof navigator === "undefined" ? false : /OculusBrowser/g.test(navigator.userAgent);
|
|
40631
|
-
const _imageDimensions = new Vector2
|
|
40631
|
+
const _imageDimensions = new Vector2();
|
|
40632
40632
|
const _videoTextures = /* @__PURE__ */ new WeakMap();
|
|
40633
40633
|
let _canvas2;
|
|
40634
40634
|
const _sources = /* @__PURE__ */ new WeakMap();
|
|
@@ -41902,9 +41902,9 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
41902
41902
|
this._targetRay.matrixAutoUpdate = false;
|
|
41903
41903
|
this._targetRay.visible = false;
|
|
41904
41904
|
this._targetRay.hasLinearVelocity = false;
|
|
41905
|
-
this._targetRay.linearVelocity = new Vector3
|
|
41905
|
+
this._targetRay.linearVelocity = new Vector3();
|
|
41906
41906
|
this._targetRay.hasAngularVelocity = false;
|
|
41907
|
-
this._targetRay.angularVelocity = new Vector3
|
|
41907
|
+
this._targetRay.angularVelocity = new Vector3();
|
|
41908
41908
|
}
|
|
41909
41909
|
return this._targetRay;
|
|
41910
41910
|
}
|
|
@@ -41914,9 +41914,9 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
41914
41914
|
this._grip.matrixAutoUpdate = false;
|
|
41915
41915
|
this._grip.visible = false;
|
|
41916
41916
|
this._grip.hasLinearVelocity = false;
|
|
41917
|
-
this._grip.linearVelocity = new Vector3
|
|
41917
|
+
this._grip.linearVelocity = new Vector3();
|
|
41918
41918
|
this._grip.hasAngularVelocity = false;
|
|
41919
|
-
this._grip.angularVelocity = new Vector3
|
|
41919
|
+
this._grip.angularVelocity = new Vector3();
|
|
41920
41920
|
}
|
|
41921
41921
|
return this._grip;
|
|
41922
41922
|
}
|
|
@@ -42160,7 +42160,7 @@ void main() {
|
|
|
42160
42160
|
let newRenderTarget = null;
|
|
42161
42161
|
const controllers = [];
|
|
42162
42162
|
const controllerInputSources = [];
|
|
42163
|
-
const currentSize = new Vector2
|
|
42163
|
+
const currentSize = new Vector2();
|
|
42164
42164
|
let currentPixelRatio = null;
|
|
42165
42165
|
const cameraL = new PerspectiveCamera();
|
|
42166
42166
|
cameraL.viewport = new Vector4();
|
|
@@ -42390,8 +42390,8 @@ void main() {
|
|
|
42390
42390
|
}
|
|
42391
42391
|
}
|
|
42392
42392
|
}
|
|
42393
|
-
const cameraLPos = new Vector3
|
|
42394
|
-
const cameraRPos = new Vector3
|
|
42393
|
+
const cameraLPos = new Vector3();
|
|
42394
|
+
const cameraRPos = new Vector3();
|
|
42395
42395
|
function setProjectionFromUnion(camera2, cameraL2, cameraR2) {
|
|
42396
42396
|
cameraLPos.setFromMatrixPosition(cameraL2.matrixWorld);
|
|
42397
42397
|
cameraRPos.setFromMatrixPosition(cameraR2.matrixWorld);
|
|
@@ -43184,7 +43184,7 @@ void main() {
|
|
|
43184
43184
|
let _localClippingEnabled = false;
|
|
43185
43185
|
const _currentProjectionMatrix = new Matrix4();
|
|
43186
43186
|
const _projScreenMatrix2 = new Matrix4();
|
|
43187
|
-
const _vector32 = new Vector3
|
|
43187
|
+
const _vector32 = new Vector3();
|
|
43188
43188
|
const _vector4 = new Vector4();
|
|
43189
43189
|
const _emptyScene = { background: null, fog: null, environment: null, overrideMaterial: null, isScene: true };
|
|
43190
43190
|
let _renderBackground = false;
|
|
@@ -44658,7 +44658,7 @@ void main() {
|
|
|
44658
44658
|
Bone,
|
|
44659
44659
|
BooleanKeyframeTrack,
|
|
44660
44660
|
Box2,
|
|
44661
|
-
Box3
|
|
44661
|
+
Box3,
|
|
44662
44662
|
Box3Helper,
|
|
44663
44663
|
BoxGeometry,
|
|
44664
44664
|
BoxHelper,
|
|
@@ -45018,8 +45018,8 @@ void main() {
|
|
|
45018
45018
|
UnsignedShort5551Type,
|
|
45019
45019
|
UnsignedShortType,
|
|
45020
45020
|
VSMShadowMap,
|
|
45021
|
-
Vector2
|
|
45022
|
-
Vector3
|
|
45021
|
+
Vector2,
|
|
45022
|
+
Vector3,
|
|
45023
45023
|
Vector4,
|
|
45024
45024
|
VectorKeyframeTrack,
|
|
45025
45025
|
VideoTexture,
|
|
@@ -45194,7 +45194,7 @@ void main() {
|
|
|
45194
45194
|
let vertex2 = 0;
|
|
45195
45195
|
let offset = 0;
|
|
45196
45196
|
const matrix = new Matrix4();
|
|
45197
|
-
const vector = new Vector3
|
|
45197
|
+
const vector = new Vector3();
|
|
45198
45198
|
for (let i2 = 0; i2 < info.instances.length; i2++) {
|
|
45199
45199
|
const instance = info.instances[i2];
|
|
45200
45200
|
const mesh = g3d2.getInstanceMesh(instance);
|
|
@@ -45225,7 +45225,7 @@ void main() {
|
|
|
45225
45225
|
vector.applyMatrix4(matrix);
|
|
45226
45226
|
vector.toArray(buffer.vertices, vertex2);
|
|
45227
45227
|
vertex2 += distExports$2.G3d.POSITION_SIZE;
|
|
45228
|
-
buffer.boxes[i2] = new Box3
|
|
45228
|
+
buffer.boxes[i2] = new Box3(vector.clone(), vector.clone());
|
|
45229
45229
|
}
|
|
45230
45230
|
for (let p = vertexStart + 1; p < vertexEnd; p++) {
|
|
45231
45231
|
vector.fromArray(g3d2.positions, p * distExports$2.G3d.POSITION_SIZE);
|
|
@@ -45297,8 +45297,8 @@ void main() {
|
|
|
45297
45297
|
Geometry2.MergeResult = MergeResult;
|
|
45298
45298
|
})(Geometry || (Geometry = {}));
|
|
45299
45299
|
const defaultConfig = {
|
|
45300
|
-
position: new Vector3
|
|
45301
|
-
rotation: new Vector3
|
|
45300
|
+
position: new Vector3(),
|
|
45301
|
+
rotation: new Vector3(),
|
|
45302
45302
|
scale: 1,
|
|
45303
45303
|
matrix: void 0,
|
|
45304
45304
|
transparency: "all",
|
|
@@ -45320,7 +45320,7 @@ void main() {
|
|
|
45320
45320
|
merge.rotation.z * Math.PI / 180
|
|
45321
45321
|
)
|
|
45322
45322
|
),
|
|
45323
|
-
new Vector3
|
|
45323
|
+
new Vector3(merge.scale, merge.scale, merge.scale)
|
|
45324
45324
|
);
|
|
45325
45325
|
return merge;
|
|
45326
45326
|
}
|
|
@@ -45781,7 +45781,7 @@ void main() {
|
|
|
45781
45781
|
* A new instance is created if none is provided.
|
|
45782
45782
|
* @returns {THREE.Vector3 | undefined} The center position of the object, or undefined if the object has no geometry.
|
|
45783
45783
|
*/
|
|
45784
|
-
getCenter(target = new Vector3
|
|
45784
|
+
getCenter(target = new Vector3()) {
|
|
45785
45785
|
var _a2;
|
|
45786
45786
|
return (_a2 = this.getBoundingBox()) == null ? void 0 : _a2.getCenter(target);
|
|
45787
45787
|
}
|
|
@@ -47324,12 +47324,12 @@ void main() {
|
|
|
47324
47324
|
}
|
|
47325
47325
|
function getAverageBoundingBox(positions, thresholdSpan = 1e3, framingDistanceMultiplier = 2) {
|
|
47326
47326
|
if (positions.length === 0) {
|
|
47327
|
-
return new Box3
|
|
47327
|
+
return new Box3();
|
|
47328
47328
|
}
|
|
47329
47329
|
const { centroid, aabb } = calculateCentroidAndBoundingBox(positions);
|
|
47330
|
-
const span = aabb.getSize(new Vector3
|
|
47331
|
-
const center = span > thresholdSpan ? centroid : aabb.getCenter(new Vector3
|
|
47332
|
-
const avgDist = new Vector3
|
|
47330
|
+
const span = aabb.getSize(new Vector3()).length();
|
|
47331
|
+
const center = span > thresholdSpan ? centroid : aabb.getCenter(new Vector3());
|
|
47332
|
+
const avgDist = new Vector3();
|
|
47333
47333
|
for (const pos of positions) {
|
|
47334
47334
|
avgDist.set(
|
|
47335
47335
|
avgDist.x + Math.abs(pos.x - center.x),
|
|
@@ -47338,14 +47338,14 @@ void main() {
|
|
|
47338
47338
|
);
|
|
47339
47339
|
}
|
|
47340
47340
|
const scaledDist = avgDist.multiplyScalar(framingDistanceMultiplier / positions.length);
|
|
47341
|
-
return new Box3
|
|
47341
|
+
return new Box3(
|
|
47342
47342
|
center.clone().sub(scaledDist),
|
|
47343
47343
|
center.clone().add(scaledDist)
|
|
47344
47344
|
);
|
|
47345
47345
|
}
|
|
47346
47346
|
function calculateCentroidAndBoundingBox(positions) {
|
|
47347
|
-
const sum = new Vector3
|
|
47348
|
-
const aabb = new Box3
|
|
47347
|
+
const sum = new Vector3();
|
|
47348
|
+
const aabb = new Box3();
|
|
47349
47349
|
for (const pos of positions) {
|
|
47350
47350
|
sum.add(pos);
|
|
47351
47351
|
aabb.expandByPoint(pos);
|
|
@@ -47390,7 +47390,7 @@ void main() {
|
|
|
47390
47390
|
/**
|
|
47391
47391
|
* Returns the scene bounding box. Returns undefined if scene is empty.
|
|
47392
47392
|
*/
|
|
47393
|
-
getBoundingBox(target = new Box3
|
|
47393
|
+
getBoundingBox(target = new Box3()) {
|
|
47394
47394
|
return this._boundingBox ? target.copy(this._boundingBox) : void 0;
|
|
47395
47395
|
}
|
|
47396
47396
|
/**
|
|
@@ -47405,7 +47405,7 @@ void main() {
|
|
|
47405
47405
|
this.meshes.forEach((m) => {
|
|
47406
47406
|
const subs = m.getSubmeshes();
|
|
47407
47407
|
subs.forEach((s) => {
|
|
47408
|
-
const p = s.boundingBox.getCenter(new Vector3
|
|
47408
|
+
const p = s.boundingBox.getCenter(new Vector3());
|
|
47409
47409
|
p.applyMatrix4(this._matrix);
|
|
47410
47410
|
points.push(p);
|
|
47411
47411
|
});
|
|
@@ -47581,11 +47581,11 @@ void main() {
|
|
|
47581
47581
|
__publicField(this, "instance");
|
|
47582
47582
|
__publicField(this, "start");
|
|
47583
47583
|
__publicField(this, "end");
|
|
47584
|
-
__publicField(this, "boundingBox", new Box3
|
|
47584
|
+
__publicField(this, "boundingBox", new Box3());
|
|
47585
47585
|
}
|
|
47586
47586
|
expandBox(point) {
|
|
47587
47587
|
var _a2;
|
|
47588
|
-
this.boundingBox = ((_a2 = this.boundingBox) == null ? void 0 : _a2.expandByPoint(point)) ?? new Box3
|
|
47588
|
+
this.boundingBox = ((_a2 = this.boundingBox) == null ? void 0 : _a2.expandByPoint(point)) ?? new Box3().set(point, point);
|
|
47589
47589
|
}
|
|
47590
47590
|
}
|
|
47591
47591
|
class InsertableGeometry {
|
|
@@ -47645,7 +47645,7 @@ void main() {
|
|
|
47645
47645
|
return added;
|
|
47646
47646
|
}
|
|
47647
47647
|
const matrix = new Matrix4();
|
|
47648
|
-
const vector = new Vector3
|
|
47648
|
+
const vector = new Vector3();
|
|
47649
47649
|
const vertexStart = mesh.getVertexStart(section);
|
|
47650
47650
|
const vertexEnd = mesh.getVertexEnd(section);
|
|
47651
47651
|
const vertexCount = vertexEnd - vertexStart;
|
|
@@ -47719,7 +47719,7 @@ void main() {
|
|
|
47719
47719
|
return added;
|
|
47720
47720
|
}
|
|
47721
47721
|
const matrix = new Matrix4();
|
|
47722
|
-
const vector = new Vector3
|
|
47722
|
+
const vector = new Vector3();
|
|
47723
47723
|
const indexOffset = this.offsets.getIndexOffset(mesh);
|
|
47724
47724
|
const vertexOffset = this.offsets.getVertexOffset(mesh);
|
|
47725
47725
|
const vertexStart = g3d2.getMeshVertexStart(meshG3dIndex);
|
|
@@ -48091,7 +48091,7 @@ void main() {
|
|
|
48091
48091
|
// Uniform controlling the overall transparency of the non-visible objects.
|
|
48092
48092
|
opacity: { value: 1e-3 },
|
|
48093
48093
|
// Uniform specifying the fill color for non-visible objects.
|
|
48094
|
-
fillColor: { value: new Vector3
|
|
48094
|
+
fillColor: { value: new Vector3(0, 0, 0) }
|
|
48095
48095
|
},
|
|
48096
48096
|
// Render only the front side of faces to prevent drawing internal geometry.
|
|
48097
48097
|
side: FrontSide,
|
|
@@ -48158,7 +48158,7 @@ void main() {
|
|
|
48158
48158
|
this.material = createOutlineMaterial();
|
|
48159
48159
|
this._antialias = (options == null ? void 0 : options.antialias) ?? false;
|
|
48160
48160
|
this._precision = (options == null ? void 0 : options.precision) ?? 1;
|
|
48161
|
-
this._resolution = (options == null ? void 0 : options.resolution) ?? new Vector2
|
|
48161
|
+
this._resolution = (options == null ? void 0 : options.resolution) ?? new Vector2(1, 1);
|
|
48162
48162
|
this.resolution = this._resolution;
|
|
48163
48163
|
if (options == null ? void 0 : options.sceneBuffer) {
|
|
48164
48164
|
this.sceneBuffer = options.sceneBuffer;
|
|
@@ -48599,7 +48599,7 @@ void main() {
|
|
|
48599
48599
|
|
|
48600
48600
|
void main() {
|
|
48601
48601
|
// Define the up vector
|
|
48602
|
-
vec3 up = vec3(0.0,
|
|
48602
|
+
vec3 up = vec3(0.0, 0.0, 1.0);
|
|
48603
48603
|
|
|
48604
48604
|
// Calculate the direction from the pixel to the camera
|
|
48605
48605
|
vec3 directionToCamera = normalize(vCameraPosition - vPosition);
|
|
@@ -49115,7 +49115,7 @@ void main() {
|
|
|
49115
49115
|
this.bimInstances = g3d2 instanceof distExports$2.G3dMesh ? instances.map((i2) => g3d2.scene.instanceNodes[i2]) : instances;
|
|
49116
49116
|
this.meshInstances = instances;
|
|
49117
49117
|
this.boxes = g3d2 instanceof distExports$2.G3dMesh ? this.importBoundingBoxes() : this.computeBoundingBoxes();
|
|
49118
|
-
this.size = ((_a2 = this.boxes[0]) == null ? void 0 : _a2.getSize(new Vector3
|
|
49118
|
+
this.size = ((_a2 = this.boxes[0]) == null ? void 0 : _a2.getSize(new Vector3()).length()) ?? 0;
|
|
49119
49119
|
this.boundingBox = this.computeBoundingBox(this.boxes);
|
|
49120
49120
|
this._material = this.mesh.material;
|
|
49121
49121
|
}
|
|
@@ -49163,7 +49163,7 @@ void main() {
|
|
|
49163
49163
|
if (this.g3dMesh instanceof distExports$2.G3d) throw new Error("Wrong type");
|
|
49164
49164
|
const boxes = new Array(this.meshInstances.length);
|
|
49165
49165
|
for (let i2 = 0; i2 < this.meshInstances.length; i2++) {
|
|
49166
|
-
const box = new Box3
|
|
49166
|
+
const box = new Box3();
|
|
49167
49167
|
const instance = this.meshInstances[i2];
|
|
49168
49168
|
box.min.fromArray(this.g3dMesh.scene.getInstanceMin(instance));
|
|
49169
49169
|
box.max.fromArray(this.g3dMesh.scene.getInstanceMax(instance));
|
|
@@ -49708,8 +49708,8 @@ void main() {
|
|
|
49708
49708
|
if (this._source instanceof distExports$2.G3d) {
|
|
49709
49709
|
throw new Error("Feature requires a vimx file");
|
|
49710
49710
|
}
|
|
49711
|
-
const min2 = new Vector3
|
|
49712
|
-
const max2 = new Vector3
|
|
49711
|
+
const min2 = new Vector3();
|
|
49712
|
+
const max2 = new Vector3();
|
|
49713
49713
|
const values = new Array(this._instances.length);
|
|
49714
49714
|
for (let i2 = 0; i2 < this._instances.length; i2++) {
|
|
49715
49715
|
const instance = this._instances[i2];
|
|
@@ -49824,7 +49824,7 @@ void main() {
|
|
|
49824
49824
|
getBoundingBox() {
|
|
49825
49825
|
if (this._instances.length === 0) return;
|
|
49826
49826
|
if (this._source instanceof distExports$2.G3dScene) {
|
|
49827
|
-
const box = new Box3
|
|
49827
|
+
const box = new Box3();
|
|
49828
49828
|
const first = this._instances[0];
|
|
49829
49829
|
box.min.fromArray(this._source.getInstanceMin(first));
|
|
49830
49830
|
box.max.fromArray(this._source.getInstanceMax(first));
|
|
@@ -50261,14 +50261,14 @@ void main() {
|
|
|
50261
50261
|
},
|
|
50262
50262
|
camera: {
|
|
50263
50263
|
orthographic: false,
|
|
50264
|
-
allowedMovement: new Vector3
|
|
50265
|
-
allowedRotation: new Vector2
|
|
50264
|
+
allowedMovement: new Vector3(1, 1, 1),
|
|
50265
|
+
allowedRotation: new Vector2(1, 1),
|
|
50266
50266
|
near: 1e-3,
|
|
50267
50267
|
far: 15e3,
|
|
50268
50268
|
fov: 50,
|
|
50269
50269
|
zoom: 1,
|
|
50270
50270
|
// 45 deg down looking down z.
|
|
50271
|
-
forward: new Vector3
|
|
50271
|
+
forward: new Vector3(1, -1, -1),
|
|
50272
50272
|
controls: {
|
|
50273
50273
|
orbit: true,
|
|
50274
50274
|
rotateSpeed: 1,
|
|
@@ -50301,13 +50301,13 @@ void main() {
|
|
|
50301
50301
|
sunlights: [
|
|
50302
50302
|
{
|
|
50303
50303
|
followCamera: true,
|
|
50304
|
-
position: new Vector3
|
|
50304
|
+
position: new Vector3(1e3, 1e3, 1e3),
|
|
50305
50305
|
color: new Color(16777215),
|
|
50306
50306
|
intensity: 0.8
|
|
50307
50307
|
},
|
|
50308
50308
|
{
|
|
50309
50309
|
followCamera: true,
|
|
50310
|
-
position: new Vector3
|
|
50310
|
+
position: new Vector3(-1e3, -1e3, -1e3),
|
|
50311
50311
|
color: new Color(16777215),
|
|
50312
50312
|
intensity: 0.2
|
|
50313
50313
|
}
|
|
@@ -50380,7 +50380,7 @@ void main() {
|
|
|
50380
50380
|
frustrumSizeAt(point) {
|
|
50381
50381
|
const dist2 = this.camera.position.distanceTo(point);
|
|
50382
50382
|
const size = 2 * dist2 * Math.tan(this.camera.fov / 2 * (Math.PI / 180));
|
|
50383
|
-
return new Vector2
|
|
50383
|
+
return new Vector2(size * this.camera.aspect, size);
|
|
50384
50384
|
}
|
|
50385
50385
|
}
|
|
50386
50386
|
class OrthographicWrapper {
|
|
@@ -50389,7 +50389,7 @@ void main() {
|
|
|
50389
50389
|
this.camera = camera2;
|
|
50390
50390
|
}
|
|
50391
50391
|
frustrumSizeAt(point) {
|
|
50392
|
-
return new Vector2
|
|
50392
|
+
return new Vector2(
|
|
50393
50393
|
this.camera.right - this.camera.left,
|
|
50394
50394
|
this.camera.top - this.camera.bottom
|
|
50395
50395
|
);
|
|
@@ -50478,14 +50478,14 @@ void main() {
|
|
|
50478
50478
|
/** Sets the position of the marker in the 3d scene */
|
|
50479
50479
|
set position(value) {
|
|
50480
50480
|
const m = new Matrix4();
|
|
50481
|
-
m.compose(value, new Quaternion(), new Vector3
|
|
50481
|
+
m.compose(value, new Quaternion(), new Vector3(1, 1, 1));
|
|
50482
50482
|
this._submesh.mesh.setMatrixAt(this._submesh.index, m);
|
|
50483
50483
|
this._submesh.mesh.instanceMatrix.needsUpdate = true;
|
|
50484
50484
|
}
|
|
50485
50485
|
get position() {
|
|
50486
50486
|
const m = new Matrix4();
|
|
50487
50487
|
this._submesh.mesh.getMatrixAt(0, m);
|
|
50488
|
-
return new Vector3
|
|
50488
|
+
return new Vector3().setFromMatrixPosition(m);
|
|
50489
50489
|
}
|
|
50490
50490
|
/**
|
|
50491
50491
|
* Always false
|
|
@@ -50555,7 +50555,7 @@ void main() {
|
|
|
50555
50555
|
* @returns {THREE.Box3 | undefined} The bounding box of the object.
|
|
50556
50556
|
*/
|
|
50557
50557
|
getBoundingBox() {
|
|
50558
|
-
return new Box3
|
|
50558
|
+
return new Box3().setFromCenterAndSize(this.position.clone(), new Vector3(1, 1, 1));
|
|
50559
50559
|
}
|
|
50560
50560
|
}
|
|
50561
50561
|
class CameraMovement {
|
|
@@ -50569,7 +50569,7 @@ void main() {
|
|
|
50569
50569
|
* @param {'XY' | 'XZ'} axes - The axes defining the plane of movement ('XY' or 'XZ').
|
|
50570
50570
|
*/
|
|
50571
50571
|
move2(vector, axes) {
|
|
50572
|
-
const direction = axes === "XY" ? new Vector3
|
|
50572
|
+
const direction = axes === "XY" ? new Vector3(-vector.x, vector.y, 0) : axes === "XZ" ? new Vector3(-vector.x, 0, vector.y) : void 0;
|
|
50573
50573
|
if (direction) this.move3(direction);
|
|
50574
50574
|
}
|
|
50575
50575
|
/**
|
|
@@ -50578,7 +50578,7 @@ void main() {
|
|
|
50578
50578
|
* @param {'X' | 'Y' | 'Z'} axis - The axis along which to move the camera ('X', 'Y', or 'Z').
|
|
50579
50579
|
*/
|
|
50580
50580
|
move1(amount, axis) {
|
|
50581
|
-
const direction = new Vector3
|
|
50581
|
+
const direction = new Vector3(
|
|
50582
50582
|
axis === "X" ? -amount : 0,
|
|
50583
50583
|
axis === "Y" ? amount : 0,
|
|
50584
50584
|
axis === "Z" ? amount : 0
|
|
@@ -50605,7 +50605,7 @@ void main() {
|
|
|
50605
50605
|
const angleForward = flatForward.angleTo(forward) * Math.sign(forward.z);
|
|
50606
50606
|
const angleDirection = flatDirection.angleTo(_direction) * Math.sign(_direction.z);
|
|
50607
50607
|
const declination = angleForward - angleDirection;
|
|
50608
|
-
const angle = new Vector2
|
|
50608
|
+
const angle = new Vector2(-declination, azimuth);
|
|
50609
50609
|
angle.multiplyScalar(180 / Math.PI);
|
|
50610
50610
|
this.orbit(angle);
|
|
50611
50611
|
}
|
|
@@ -50624,7 +50624,7 @@ void main() {
|
|
|
50624
50624
|
if (target === "all") {
|
|
50625
50625
|
target = this._camera._scene.getAverageBoundingBox();
|
|
50626
50626
|
}
|
|
50627
|
-
if (target instanceof Box3
|
|
50627
|
+
if (target instanceof Box3) {
|
|
50628
50628
|
target = target.getBoundingSphere(new Sphere());
|
|
50629
50629
|
}
|
|
50630
50630
|
if (target instanceof Sphere) {
|
|
@@ -50691,7 +50691,7 @@ void main() {
|
|
|
50691
50691
|
v.applyQuaternion(this._camera.quaternion);
|
|
50692
50692
|
const start = this._camera.position.clone();
|
|
50693
50693
|
const end = this._camera.position.clone().add(v);
|
|
50694
|
-
const pos = new Vector3
|
|
50694
|
+
const pos = new Vector3();
|
|
50695
50695
|
this.onProgress = (progress) => {
|
|
50696
50696
|
pos.copy(start);
|
|
50697
50697
|
pos.lerp(end, progress);
|
|
@@ -50730,7 +50730,7 @@ void main() {
|
|
|
50730
50730
|
orbit(angle) {
|
|
50731
50731
|
const startPos = this._camera.position.clone();
|
|
50732
50732
|
const startTarget = this._camera.target.clone();
|
|
50733
|
-
const a = new Vector2
|
|
50733
|
+
const a = new Vector2();
|
|
50734
50734
|
this.onProgress = (progress) => {
|
|
50735
50735
|
a.set(0, 0);
|
|
50736
50736
|
a.lerp(angle, progress);
|
|
@@ -50743,7 +50743,7 @@ void main() {
|
|
|
50743
50743
|
const next = pos.clone().sub(this._camera.position);
|
|
50744
50744
|
const start = this._camera.quaternion.clone();
|
|
50745
50745
|
const rot = new Quaternion().setFromUnitVectors(
|
|
50746
|
-
new Vector3
|
|
50746
|
+
new Vector3(0, 0, -1),
|
|
50747
50747
|
next.normalize()
|
|
50748
50748
|
);
|
|
50749
50749
|
this.onProgress = (progress) => {
|
|
@@ -50805,26 +50805,26 @@ void main() {
|
|
|
50805
50805
|
move3(vector) {
|
|
50806
50806
|
const v = vector.clone();
|
|
50807
50807
|
v.applyQuaternion(this._camera.quaternion);
|
|
50808
|
-
const locked = this.lockVector(v, new Vector3
|
|
50808
|
+
const locked = this.lockVector(v, new Vector3());
|
|
50809
50809
|
const pos = this._camera.position.clone().add(locked);
|
|
50810
50810
|
const target = this._camera.target.clone().add(locked);
|
|
50811
50811
|
this.set(pos, target);
|
|
50812
50812
|
}
|
|
50813
50813
|
set(position, target) {
|
|
50814
50814
|
target = target ?? this._camera.target;
|
|
50815
|
-
const direction = new Vector3
|
|
50815
|
+
const direction = new Vector3().subVectors(position, target);
|
|
50816
50816
|
const dist2 = direction.length();
|
|
50817
50817
|
if (dist2 > 1e-6) {
|
|
50818
|
-
const up = new Vector3
|
|
50818
|
+
const up = new Vector3(0, 0, 1);
|
|
50819
50819
|
const angle = direction.angleTo(up);
|
|
50820
50820
|
const minAngle = MathUtils.degToRad(5);
|
|
50821
50821
|
const maxAngle = MathUtils.degToRad(175);
|
|
50822
50822
|
if (angle < minAngle) {
|
|
50823
|
-
const axis = new Vector3
|
|
50823
|
+
const axis = new Vector3().crossVectors(up, direction).normalize();
|
|
50824
50824
|
const delta = minAngle - angle;
|
|
50825
50825
|
direction.applyQuaternion(new Quaternion().setFromAxisAngle(axis, delta));
|
|
50826
50826
|
} else if (angle > maxAngle) {
|
|
50827
|
-
const axis = new Vector3
|
|
50827
|
+
const axis = new Vector3().crossVectors(up, direction).normalize();
|
|
50828
50828
|
const delta = maxAngle - angle;
|
|
50829
50829
|
direction.applyQuaternion(new Quaternion().setFromAxisAngle(axis, delta));
|
|
50830
50830
|
}
|
|
@@ -50840,17 +50840,17 @@ void main() {
|
|
|
50840
50840
|
const x = this._camera.allowedMovement.x === 0 ? fallback.x : position.x;
|
|
50841
50841
|
const y = this._camera.allowedMovement.y === 0 ? fallback.y : position.y;
|
|
50842
50842
|
const z = this._camera.allowedMovement.z === 0 ? fallback.z : position.z;
|
|
50843
|
-
return new Vector3
|
|
50843
|
+
return new Vector3(x, y, z);
|
|
50844
50844
|
}
|
|
50845
50845
|
predictOrbit(angle) {
|
|
50846
50846
|
const rotation = this.predictRotate(angle);
|
|
50847
|
-
const delta = new Vector3
|
|
50847
|
+
const delta = new Vector3(0, 0, 1).applyQuaternion(rotation).multiplyScalar(this._camera.orbitDistance);
|
|
50848
50848
|
const pos = this._camera.target.clone().add(delta);
|
|
50849
50849
|
return pos;
|
|
50850
50850
|
}
|
|
50851
50851
|
predictRotate(angle) {
|
|
50852
|
-
const xQuat = new Quaternion().setFromAxisAngle(new Vector3
|
|
50853
|
-
const zQuat = new Quaternion().setFromAxisAngle(new Vector3
|
|
50852
|
+
const xQuat = new Quaternion().setFromAxisAngle(new Vector3(1, 0, 0), angle.x * Math.PI / 180);
|
|
50853
|
+
const zQuat = new Quaternion().setFromAxisAngle(new Vector3(0, 1, 0), angle.y * Math.PI / 180);
|
|
50854
50854
|
const rotation = this._camera.quaternion.clone();
|
|
50855
50855
|
rotation.multiply(xQuat).multiply(zQuat);
|
|
50856
50856
|
return rotation;
|
|
@@ -50866,22 +50866,22 @@ void main() {
|
|
|
50866
50866
|
__publicField(this, "_lerp");
|
|
50867
50867
|
__publicField(this, "_movement");
|
|
50868
50868
|
// movements
|
|
50869
|
-
__publicField(this, "_inputVelocity", new Vector3
|
|
50870
|
-
__publicField(this, "_velocity", new Vector3
|
|
50869
|
+
__publicField(this, "_inputVelocity", new Vector3());
|
|
50870
|
+
__publicField(this, "_velocity", new Vector3());
|
|
50871
50871
|
__publicField(this, "_speed", 0);
|
|
50872
50872
|
// orbit
|
|
50873
50873
|
__publicField(this, "_orthographic", false);
|
|
50874
|
-
__publicField(this, "_target", new Vector3
|
|
50874
|
+
__publicField(this, "_target", new Vector3());
|
|
50875
50875
|
// updates
|
|
50876
|
-
__publicField(this, "_lastPosition", new Vector3
|
|
50876
|
+
__publicField(this, "_lastPosition", new Vector3());
|
|
50877
50877
|
__publicField(this, "_lastQuaternion", new Quaternion());
|
|
50878
|
-
__publicField(this, "_lastTarget", new Vector3
|
|
50878
|
+
__publicField(this, "_lastTarget", new Vector3());
|
|
50879
50879
|
// Reuseable vectors for calculations
|
|
50880
|
-
__publicField(this, "_tmp1", new Vector3
|
|
50881
|
-
__publicField(this, "_tmp2", new Vector3
|
|
50880
|
+
__publicField(this, "_tmp1", new Vector3());
|
|
50881
|
+
__publicField(this, "_tmp2", new Vector3());
|
|
50882
50882
|
// saves
|
|
50883
|
-
__publicField(this, "_savedPosition", new Vector3
|
|
50884
|
-
__publicField(this, "_savedTarget", new Vector3
|
|
50883
|
+
__publicField(this, "_savedPosition", new Vector3(0, 0, -5));
|
|
50884
|
+
__publicField(this, "_savedTarget", new Vector3(0, 0, 0));
|
|
50885
50885
|
__publicField(this, "_onValueChanged", new distExports$1.SignalDispatcher());
|
|
50886
50886
|
__publicField(this, "_hasMoved");
|
|
50887
50887
|
__publicField(this, "_onMoved", new distExports$1.SignalDispatcher());
|
|
@@ -50891,18 +50891,18 @@ void main() {
|
|
|
50891
50891
|
* Represents allowed movement along each axis using a Vector3 object.
|
|
50892
50892
|
* Each component of the Vector3 should be either 0 or 1 to enable/disable movement along the corresponding axis.
|
|
50893
50893
|
*/
|
|
50894
|
-
__publicField(this, "_allowedMovement", new Vector3
|
|
50895
|
-
__publicField(this, "_allowedRotation", new Vector2
|
|
50894
|
+
__publicField(this, "_allowedMovement", new Vector3(1, 1, 1));
|
|
50895
|
+
__publicField(this, "_allowedRotation", new Vector2(1, 1));
|
|
50896
50896
|
/**
|
|
50897
50897
|
* The default forward direction that can be used to initialize the camera.
|
|
50898
50898
|
*/
|
|
50899
|
-
__publicField(this, "_defaultForward", new Vector3
|
|
50899
|
+
__publicField(this, "_defaultForward", new Vector3(1, -1, 1).normalize());
|
|
50900
50900
|
// Settings
|
|
50901
50901
|
__publicField(this, "_velocityBlendFactor", 1e-4);
|
|
50902
50902
|
__publicField(this, "_moveSpeed", 1);
|
|
50903
50903
|
this.camPerspective = new PerspectiveWrapper(new PerspectiveCamera());
|
|
50904
|
-
this.camPerspective.camera.up = new Vector3
|
|
50905
|
-
this.camPerspective.camera.lookAt(new Vector3
|
|
50904
|
+
this.camPerspective.camera.up = new Vector3(0, 0, 1);
|
|
50905
|
+
this.camPerspective.camera.lookAt(new Vector3(0, 1, 0));
|
|
50906
50906
|
this.camOrthographic = new OrthographicWrapper(
|
|
50907
50907
|
new OrthographicCamera()
|
|
50908
50908
|
);
|
|
@@ -50938,7 +50938,7 @@ void main() {
|
|
|
50938
50938
|
return this._onMoved.asEvent();
|
|
50939
50939
|
}
|
|
50940
50940
|
get allowedMovement() {
|
|
50941
|
-
return this._force ? new Vector3
|
|
50941
|
+
return this._force ? new Vector3(1, 1, 1) : this._allowedMovement;
|
|
50942
50942
|
}
|
|
50943
50943
|
set allowedMovement(axes) {
|
|
50944
50944
|
this._allowedMovement.copy(axes);
|
|
@@ -50951,7 +50951,7 @@ void main() {
|
|
|
50951
50951
|
* Each component of the Vector2 should be either 0 or 1 to enable/disable rotation around the corresponding axis.
|
|
50952
50952
|
*/
|
|
50953
50953
|
get allowedRotation() {
|
|
50954
|
-
return this._force ? new Vector2
|
|
50954
|
+
return this._force ? new Vector2(1, 1) : this._allowedRotation;
|
|
50955
50955
|
}
|
|
50956
50956
|
set allowedRotation(axes) {
|
|
50957
50957
|
this._allowedRotation.copy(axes);
|
|
@@ -51027,7 +51027,7 @@ void main() {
|
|
|
51027
51027
|
* The forward direction of the camera.
|
|
51028
51028
|
*/
|
|
51029
51029
|
get forward() {
|
|
51030
|
-
return this.camPerspective.camera.getWorldDirection(new Vector3
|
|
51030
|
+
return this.camPerspective.camera.getWorldDirection(new Vector3());
|
|
51031
51031
|
}
|
|
51032
51032
|
/**
|
|
51033
51033
|
* The camera speed factor.
|
|
@@ -51392,7 +51392,7 @@ void main() {
|
|
|
51392
51392
|
}
|
|
51393
51393
|
}
|
|
51394
51394
|
applyMove() {
|
|
51395
|
-
const move = new Vector3
|
|
51395
|
+
const move = new Vector3(
|
|
51396
51396
|
(this.isRightPressed ? 1 : 0) - (this.isLeftPressed ? 1 : 0),
|
|
51397
51397
|
(this.isEPressed ? 1 : 0) - (this.isQPressed ? 1 : 0),
|
|
51398
51398
|
(this.isUpPressed ? 1 : 0) - (this.isDownPressed ? 1 : 0)
|
|
@@ -51607,7 +51607,7 @@ void main() {
|
|
|
51607
51607
|
const size = this._viewport.getSize();
|
|
51608
51608
|
const x = position.x / size.x * 2 - 1;
|
|
51609
51609
|
const y = -(position.y / size.y) * 2 + 1;
|
|
51610
|
-
target.setFromCamera(new Vector2
|
|
51610
|
+
target.setFromCamera(new Vector2(x, y), this._camera.three);
|
|
51611
51611
|
return target;
|
|
51612
51612
|
}
|
|
51613
51613
|
/**
|
|
@@ -51735,7 +51735,7 @@ void main() {
|
|
|
51735
51735
|
if (event.touches.length === 1) {
|
|
51736
51736
|
const pos = this.touchToVector(event.touches[0]);
|
|
51737
51737
|
const size = this.viewport.getSize();
|
|
51738
|
-
const delta = pos.clone().sub(this._touch).multiply(new Vector2
|
|
51738
|
+
const delta = pos.clone().sub(this._touch).multiply(new Vector2(1 / size.x, 1 / size.y));
|
|
51739
51739
|
this._touch = pos;
|
|
51740
51740
|
this.onDrag(delta);
|
|
51741
51741
|
return;
|
|
@@ -51748,7 +51748,7 @@ void main() {
|
|
|
51748
51748
|
const size = this.viewport.getSize();
|
|
51749
51749
|
const moveDelta = this._touch.clone().sub(p).multiply(
|
|
51750
51750
|
// -1 to invert movement
|
|
51751
|
-
new Vector2
|
|
51751
|
+
new Vector2(-1 / size.x, -1 / size.y)
|
|
51752
51752
|
);
|
|
51753
51753
|
const zoom2 = p1.distanceTo(p2);
|
|
51754
51754
|
const prevZoom = this._touch1.distanceTo(this._touch2);
|
|
@@ -51790,7 +51790,7 @@ void main() {
|
|
|
51790
51790
|
this.reg(canvas, "touchmove", this.onTouchMove);
|
|
51791
51791
|
}
|
|
51792
51792
|
toRotation(delta, speed) {
|
|
51793
|
-
const rotation = new Vector2
|
|
51793
|
+
const rotation = new Vector2();
|
|
51794
51794
|
rotation.x = delta.y;
|
|
51795
51795
|
rotation.y = delta.x;
|
|
51796
51796
|
rotation.multiplyScalar(-180 * speed);
|
|
@@ -51800,7 +51800,7 @@ void main() {
|
|
|
51800
51800
|
return this._touch !== void 0 && this._touchStartTime !== void 0 && this._touch1 === void 0 && this._touch2 === void 0;
|
|
51801
51801
|
}
|
|
51802
51802
|
touchToVector(touch) {
|
|
51803
|
-
return new Vector2
|
|
51803
|
+
return new Vector2(touch.pageX, touch.pageY);
|
|
51804
51804
|
}
|
|
51805
51805
|
average(p1, p2) {
|
|
51806
51806
|
return p1.clone().lerp(p2, 0.5);
|
|
@@ -51853,7 +51853,7 @@ void main() {
|
|
|
51853
51853
|
this.gizmoRect.visible = false;
|
|
51854
51854
|
});
|
|
51855
51855
|
__publicField(this, "onMouseMove", (event) => {
|
|
51856
|
-
this._lastPosition = new Vector2
|
|
51856
|
+
this._lastPosition = new Vector2(event.offsetX, event.offsetY);
|
|
51857
51857
|
if (!this._idlePosition || this._lastPosition.distanceTo(this._idlePosition) > 5) {
|
|
51858
51858
|
this.resetIdle();
|
|
51859
51859
|
}
|
|
@@ -51866,7 +51866,7 @@ void main() {
|
|
|
51866
51866
|
if (this._buttonDown) return;
|
|
51867
51867
|
this.inputs.ContextMenu(void 0);
|
|
51868
51868
|
this._hasCameraMoved = false;
|
|
51869
|
-
this._downPosition = new Vector2
|
|
51869
|
+
this._downPosition = new Vector2(event.offsetX, event.offsetY);
|
|
51870
51870
|
this._hasMouseMoved = false;
|
|
51871
51871
|
this.viewport.canvas.focus();
|
|
51872
51872
|
this._buttonDown = this.getButton(event);
|
|
@@ -51895,12 +51895,12 @@ void main() {
|
|
|
51895
51895
|
this.onRectEnd();
|
|
51896
51896
|
} else if (event.button === 0 && !this._hasMouseMoved) {
|
|
51897
51897
|
this.onMouseClick(
|
|
51898
|
-
new Vector2
|
|
51898
|
+
new Vector2(event.offsetX, event.offsetY),
|
|
51899
51899
|
false,
|
|
51900
51900
|
this.getModifier(event)
|
|
51901
51901
|
);
|
|
51902
51902
|
} else if (event.button === 2 && !this._hasMouseMoved) {
|
|
51903
|
-
this.inputs.ContextMenu(new Vector2
|
|
51903
|
+
this.inputs.ContextMenu(new Vector2(event.clientX, event.clientY));
|
|
51904
51904
|
}
|
|
51905
51905
|
this._buttonDown = void 0;
|
|
51906
51906
|
this.inputs.pointerOverride = void 0;
|
|
@@ -51908,7 +51908,7 @@ void main() {
|
|
|
51908
51908
|
__publicField(this, "onDoubleClick", (event) => {
|
|
51909
51909
|
event.stopImmediatePropagation();
|
|
51910
51910
|
this.onMouseClick(
|
|
51911
|
-
new Vector2
|
|
51911
|
+
new Vector2(event.offsetX, event.offsetY),
|
|
51912
51912
|
true,
|
|
51913
51913
|
this.getModifier(event)
|
|
51914
51914
|
);
|
|
@@ -51983,8 +51983,8 @@ void main() {
|
|
|
51983
51983
|
const deltaX = event.movementX || event.mozMovementX || event.webkitMovementX || 0;
|
|
51984
51984
|
const deltaY = event.movementY || event.mozMovementY || event.webkitMovementY || 0;
|
|
51985
51985
|
const size = this.viewport.getSize();
|
|
51986
|
-
const delta = new Vector2
|
|
51987
|
-
const position = new Vector2
|
|
51986
|
+
const delta = new Vector2(deltaX / size.x, deltaY / size.y);
|
|
51987
|
+
const position = new Vector2(event.offsetX, event.offsetY);
|
|
51988
51988
|
this._hasMouseMoved = this._hasMouseMoved || this._downPosition && ((_a2 = this._downPosition) == null ? void 0 : _a2.distanceTo(position)) > 4;
|
|
51989
51989
|
switch (this._buttonDown) {
|
|
51990
51990
|
case "main":
|
|
@@ -52044,8 +52044,8 @@ void main() {
|
|
|
52044
52044
|
onRectEnd() {
|
|
52045
52045
|
const box = this.gizmoRect.getBoundingBox();
|
|
52046
52046
|
if (!box) return;
|
|
52047
|
-
const center = box.getCenter(new Vector3
|
|
52048
|
-
const size = box.getSize(new Vector3
|
|
52047
|
+
const center = box.getCenter(new Vector3());
|
|
52048
|
+
const size = box.getSize(new Vector3());
|
|
52049
52049
|
size.multiplyScalar(0.5);
|
|
52050
52050
|
box.setFromCenterAndSize(center, size);
|
|
52051
52051
|
this._viewer.camera.lerp(1).frame(box);
|
|
@@ -52253,7 +52253,7 @@ void main() {
|
|
|
52253
52253
|
}
|
|
52254
52254
|
}
|
|
52255
52255
|
onIdleAction(hit) {
|
|
52256
|
-
if (!this._viewer.gizmos.
|
|
52256
|
+
if (!this._viewer.gizmos.sectionBox.interactive) {
|
|
52257
52257
|
this._viewer.selection.focus(hit == null ? void 0 : hit.object);
|
|
52258
52258
|
}
|
|
52259
52259
|
}
|
|
@@ -52475,7 +52475,7 @@ void main() {
|
|
|
52475
52475
|
* @param {THREE.Box3} [target] Optional parameter to specify a box to use for the result.
|
|
52476
52476
|
* @returns {THREE.Box3 | undefined} The bounding box of the selection or `undefined` if no selection exists.
|
|
52477
52477
|
*/
|
|
52478
|
-
getBoundingBox(target = new Box3
|
|
52478
|
+
getBoundingBox(target = new Box3()) {
|
|
52479
52479
|
if (this._objects.size === 0) return;
|
|
52480
52480
|
let initialized = false;
|
|
52481
52481
|
for (const o of this._objects) {
|
|
@@ -52830,7 +52830,7 @@ void main() {
|
|
|
52830
52830
|
this.element.style.position = "absolute";
|
|
52831
52831
|
this.element.style.userSelect = "none";
|
|
52832
52832
|
this.element.setAttribute("draggable", false);
|
|
52833
|
-
this.center = new Vector2
|
|
52833
|
+
this.center = new Vector2(0.5, 0.5);
|
|
52834
52834
|
this.addEventListener("removed", function() {
|
|
52835
52835
|
this.traverse(function(object) {
|
|
52836
52836
|
if (object.element instanceof object.element.ownerDocument.defaultView.Element && object.element.parentNode !== null) {
|
|
@@ -52846,11 +52846,11 @@ void main() {
|
|
|
52846
52846
|
return this;
|
|
52847
52847
|
}
|
|
52848
52848
|
}
|
|
52849
|
-
const _vector = new Vector3
|
|
52849
|
+
const _vector = new Vector3();
|
|
52850
52850
|
const _viewMatrix = new Matrix4();
|
|
52851
52851
|
const _viewProjectionMatrix = new Matrix4();
|
|
52852
|
-
const _a = new Vector3
|
|
52853
|
-
const _b = new Vector3
|
|
52852
|
+
const _a = new Vector3();
|
|
52853
|
+
const _b = new Vector3();
|
|
52854
52854
|
class CSS2DRenderer {
|
|
52855
52855
|
constructor(parameters = {}) {
|
|
52856
52856
|
const _this = this;
|
|
@@ -52983,8 +52983,8 @@ void main() {
|
|
|
52983
52983
|
* Returns the bounding box encompasing all rendererd objects.
|
|
52984
52984
|
* @param target box in which to copy result, a new instance is created if undefined.
|
|
52985
52985
|
*/
|
|
52986
|
-
getBoundingBox(target = new Box3
|
|
52987
|
-
return this._boundingBox ? target.copy(this._boundingBox) : target.set(new Vector3
|
|
52986
|
+
getBoundingBox(target = new Box3()) {
|
|
52987
|
+
return this._boundingBox ? target.copy(this._boundingBox) : target.set(new Vector3(-1, -1, -1), new Vector3(1, 1, 1));
|
|
52988
52988
|
}
|
|
52989
52989
|
/**
|
|
52990
52990
|
* Returns the bounding box of the average center of all meshes.
|
|
@@ -52992,9 +52992,9 @@ void main() {
|
|
|
52992
52992
|
*/
|
|
52993
52993
|
getAverageBoundingBox() {
|
|
52994
52994
|
if (this._vimScenes.length === 0) {
|
|
52995
|
-
return new Box3
|
|
52995
|
+
return new Box3();
|
|
52996
52996
|
}
|
|
52997
|
-
const result = new Box3
|
|
52997
|
+
const result = new Box3();
|
|
52998
52998
|
result.copy(this._vimScenes[0].getAverageBoundingBox());
|
|
52999
52999
|
for (let i2 = 1; i2 < this._vimScenes.length; i2++) {
|
|
53000
53000
|
result.union(this._vimScenes[i2].getAverageBoundingBox());
|
|
@@ -53196,7 +53196,7 @@ void main() {
|
|
|
53196
53196
|
* @returns {THREE.Vector2} The pixel size of the parent element.
|
|
53197
53197
|
*/
|
|
53198
53198
|
getParentSize() {
|
|
53199
|
-
return new Vector2
|
|
53199
|
+
return new Vector2(
|
|
53200
53200
|
this.getParentWidth(),
|
|
53201
53201
|
this.getParentHeight()
|
|
53202
53202
|
);
|
|
@@ -53214,7 +53214,7 @@ void main() {
|
|
|
53214
53214
|
* @returns {THREE.Vector2} The pixel size of the canvas.
|
|
53215
53215
|
*/
|
|
53216
53216
|
getSize() {
|
|
53217
|
-
return new Vector2
|
|
53217
|
+
return new Vector2(this.canvas.clientWidth, this.canvas.clientHeight);
|
|
53218
53218
|
}
|
|
53219
53219
|
/**
|
|
53220
53220
|
* Calculates and returns the aspect ratio of the parent element.
|
|
@@ -53276,64 +53276,64 @@ void main() {
|
|
|
53276
53276
|
return [
|
|
53277
53277
|
new Axis({
|
|
53278
53278
|
axis: "x",
|
|
53279
|
-
direction: new Vector3
|
|
53279
|
+
direction: new Vector3(1, 0, 0),
|
|
53280
53280
|
size: settings2.bubbleSizePrimary,
|
|
53281
53281
|
color: settings2.colorX,
|
|
53282
53282
|
colorSub: settings2.colorXSub,
|
|
53283
53283
|
line: settings2.lineWidth,
|
|
53284
53284
|
label: "X",
|
|
53285
|
-
position: new Vector3
|
|
53285
|
+
position: new Vector3(0, 0, 0)
|
|
53286
53286
|
}),
|
|
53287
53287
|
new Axis({
|
|
53288
53288
|
axis: "y",
|
|
53289
|
-
direction: new Vector3
|
|
53289
|
+
direction: new Vector3(0, 1, 0),
|
|
53290
53290
|
size: settings2.bubbleSizePrimary,
|
|
53291
53291
|
color: settings2.colorY,
|
|
53292
53292
|
colorSub: settings2.colorYSub,
|
|
53293
53293
|
line: settings2.lineWidth,
|
|
53294
53294
|
label: "Y",
|
|
53295
|
-
position: new Vector3
|
|
53295
|
+
position: new Vector3(0, 0, 0)
|
|
53296
53296
|
}),
|
|
53297
53297
|
new Axis({
|
|
53298
53298
|
axis: "z",
|
|
53299
|
-
direction: new Vector3
|
|
53299
|
+
direction: new Vector3(0, 0, 1),
|
|
53300
53300
|
size: settings2.bubbleSizePrimary,
|
|
53301
53301
|
color: settings2.colorZ,
|
|
53302
53302
|
colorSub: settings2.colorZSub,
|
|
53303
53303
|
line: settings2.lineWidth,
|
|
53304
53304
|
label: "Z",
|
|
53305
|
-
position: new Vector3
|
|
53305
|
+
position: new Vector3(0, 0, 0)
|
|
53306
53306
|
}),
|
|
53307
53307
|
new Axis({
|
|
53308
53308
|
axis: "-x",
|
|
53309
|
-
direction: new Vector3
|
|
53309
|
+
direction: new Vector3(-1, 0, 0),
|
|
53310
53310
|
size: settings2.bubbleSizeSecondary,
|
|
53311
53311
|
color: settings2.colorX,
|
|
53312
53312
|
colorSub: settings2.colorXSub,
|
|
53313
53313
|
line: void 0,
|
|
53314
53314
|
label: void 0,
|
|
53315
|
-
position: new Vector3
|
|
53315
|
+
position: new Vector3(0, 0, 0)
|
|
53316
53316
|
}),
|
|
53317
53317
|
new Axis({
|
|
53318
53318
|
axis: "-y",
|
|
53319
|
-
direction: new Vector3
|
|
53319
|
+
direction: new Vector3(0, -1, 0),
|
|
53320
53320
|
size: settings2.bubbleSizeSecondary,
|
|
53321
53321
|
color: settings2.colorY,
|
|
53322
53322
|
colorSub: settings2.colorYSub,
|
|
53323
53323
|
line: void 0,
|
|
53324
53324
|
label: void 0,
|
|
53325
|
-
position: new Vector3
|
|
53325
|
+
position: new Vector3(0, 0, 0)
|
|
53326
53326
|
}),
|
|
53327
53327
|
new Axis({
|
|
53328
53328
|
axis: "-z",
|
|
53329
53329
|
// inverted Z
|
|
53330
|
-
direction: new Vector3
|
|
53330
|
+
direction: new Vector3(0, 0, -1),
|
|
53331
53331
|
size: settings2.bubbleSizeSecondary,
|
|
53332
53332
|
color: settings2.colorZ,
|
|
53333
53333
|
colorSub: settings2.colorZSub,
|
|
53334
53334
|
line: void 0,
|
|
53335
53335
|
label: void 0,
|
|
53336
|
-
position: new Vector3
|
|
53336
|
+
position: new Vector3(0, 0, 0)
|
|
53337
53337
|
})
|
|
53338
53338
|
];
|
|
53339
53339
|
}
|
|
@@ -53354,9 +53354,9 @@ void main() {
|
|
|
53354
53354
|
__publicField(this, "_pointerInside", false);
|
|
53355
53355
|
__publicField(this, "_isDragging", false);
|
|
53356
53356
|
__publicField(this, "_isDragSignificant", false);
|
|
53357
|
-
__publicField(this, "_dragStart", new Vector2
|
|
53358
|
-
__publicField(this, "_dragLast", new Vector2
|
|
53359
|
-
__publicField(this, "_pointer", new Vector3
|
|
53357
|
+
__publicField(this, "_dragStart", new Vector2());
|
|
53358
|
+
__publicField(this, "_dragLast", new Vector2());
|
|
53359
|
+
__publicField(this, "_pointer", new Vector3());
|
|
53360
53360
|
__publicField(this, "_center");
|
|
53361
53361
|
__publicField(this, "_invRotMat", new Matrix4());
|
|
53362
53362
|
__publicField(this, "_selectedAxis", null);
|
|
@@ -53454,7 +53454,7 @@ void main() {
|
|
|
53454
53454
|
const margin = 24 * ratio;
|
|
53455
53455
|
this._canvas.style.top = `${margin}px`;
|
|
53456
53456
|
this._canvas.style.right = `${margin}px`;
|
|
53457
|
-
this._center = new Vector3
|
|
53457
|
+
this._center = new Vector3(size / 2, size / 2, 0);
|
|
53458
53458
|
this._axes = createAxes(this._options);
|
|
53459
53459
|
}
|
|
53460
53460
|
createCanvas() {
|
|
@@ -53480,14 +53480,14 @@ void main() {
|
|
|
53480
53480
|
}
|
|
53481
53481
|
}
|
|
53482
53482
|
updateDrag(x, y) {
|
|
53483
|
-
if (new Vector2
|
|
53483
|
+
if (new Vector2(x, y).sub(this._dragStart).length() > 3) {
|
|
53484
53484
|
this._isDragSignificant = true;
|
|
53485
53485
|
}
|
|
53486
|
-
const drag = new Vector2
|
|
53486
|
+
const drag = new Vector2(x, y).sub(this._dragLast);
|
|
53487
53487
|
this._dragLast.set(x, y);
|
|
53488
53488
|
const rotX = drag.y / this._canvas.height;
|
|
53489
53489
|
const rotY = drag.x / this._canvas.width;
|
|
53490
|
-
this._camera.snap().orbit(new Vector2
|
|
53490
|
+
this._camera.snap().orbit(new Vector2(rotX * -180, rotY * -180));
|
|
53491
53491
|
}
|
|
53492
53492
|
endDrag() {
|
|
53493
53493
|
this._isDragging = false;
|
|
@@ -53505,8 +53505,8 @@ void main() {
|
|
|
53505
53505
|
const axis = this._axes[i2];
|
|
53506
53506
|
const highlight = this._selectedAxis === axis;
|
|
53507
53507
|
const color = axis.position.z >= -0.01 ? axis.color : axis.colorSub;
|
|
53508
|
-
const center2 = new Vector2
|
|
53509
|
-
const pos2 = new Vector2
|
|
53508
|
+
const center2 = new Vector2(this._center.x, this._center.y);
|
|
53509
|
+
const pos2 = new Vector2(axis.position.x, axis.position.y);
|
|
53510
53510
|
if (axis.line) this.drawLine(center2, pos2, axis.line, color);
|
|
53511
53511
|
const circleColor = new Color(color);
|
|
53512
53512
|
circleColor.multiplyScalar(highlight ? 1.5 : 1);
|
|
@@ -53870,14 +53870,14 @@ void main() {
|
|
|
53870
53870
|
const center = A.clone().add(B).multiplyScalar(0.5);
|
|
53871
53871
|
const [dx, dy] = this.getBoxSize(A, B);
|
|
53872
53872
|
this.updateRect(center, dx, dy);
|
|
53873
|
-
const AB = this.getIntersection(plane, new Vector2
|
|
53874
|
-
const BA = this.getIntersection(plane, new Vector2
|
|
53873
|
+
const AB = this.getIntersection(plane, new Vector2(posA.x, posB.y));
|
|
53874
|
+
const BA = this.getIntersection(plane, new Vector2(posB.x, posA.y));
|
|
53875
53875
|
if (!AB || !BA) return;
|
|
53876
53876
|
this.points = [A, B, AB, BA, center];
|
|
53877
53877
|
}
|
|
53878
53878
|
getIntersection(plane, position) {
|
|
53879
53879
|
const raycaster = this.viewer.raycaster.fromPoint2(position);
|
|
53880
|
-
return raycaster.ray.intersectPlane(plane, new Vector3
|
|
53880
|
+
return raycaster.ray.intersectPlane(plane, new Vector3()) ?? void 0;
|
|
53881
53881
|
}
|
|
53882
53882
|
updateRect(position, dx, dy) {
|
|
53883
53883
|
this.line.quaternion.copy(this.viewer.camera.quaternion);
|
|
@@ -53888,8 +53888,8 @@ void main() {
|
|
|
53888
53888
|
}
|
|
53889
53889
|
getBoxSize(A, B) {
|
|
53890
53890
|
const cam = this.viewer.camera;
|
|
53891
|
-
const up = new Vector3
|
|
53892
|
-
const right = new Vector3
|
|
53891
|
+
const up = new Vector3(0, 1, 0).applyQuaternion(cam.quaternion);
|
|
53892
|
+
const right = new Vector3(1, 0, 0).applyQuaternion(cam.quaternion);
|
|
53893
53893
|
const Ax = A.dot(right);
|
|
53894
53894
|
const Ay = A.dot(up);
|
|
53895
53895
|
const Bx = B.dot(right);
|
|
@@ -53907,7 +53907,7 @@ void main() {
|
|
|
53907
53907
|
* X-----X
|
|
53908
53908
|
* @returns {THREE.Box3} The bounding box of the selection.
|
|
53909
53909
|
*/
|
|
53910
|
-
getBoundingBox(target = new Box3
|
|
53910
|
+
getBoundingBox(target = new Box3()) {
|
|
53911
53911
|
const position = this.getClosestHit();
|
|
53912
53912
|
const projections = position ? this.projectPoints(position) : this.points;
|
|
53913
53913
|
if (!projections) return;
|
|
@@ -53939,7 +53939,7 @@ void main() {
|
|
|
53939
53939
|
this.viewer.camera.forward,
|
|
53940
53940
|
position
|
|
53941
53941
|
);
|
|
53942
|
-
return (_a2 = this.points) == null ? void 0 : _a2.map((p) => plane.projectPoint(p, new Vector3
|
|
53942
|
+
return (_a2 = this.points) == null ? void 0 : _a2.map((p) => plane.projectPoint(p, new Vector3()));
|
|
53943
53943
|
}
|
|
53944
53944
|
}
|
|
53945
53945
|
class MeasureFlow {
|
|
@@ -54073,7 +54073,7 @@ void main() {
|
|
|
54073
54073
|
this.widthCallback = wcb;
|
|
54074
54074
|
this.positions = [];
|
|
54075
54075
|
this.counters = [];
|
|
54076
|
-
if (points.length && points[0] instanceof Vector3
|
|
54076
|
+
if (points.length && points[0] instanceof Vector3) {
|
|
54077
54077
|
for (let j = 0; j < points.length; j++) {
|
|
54078
54078
|
const p = points[j];
|
|
54079
54079
|
const c = j / points.length;
|
|
@@ -54097,7 +54097,7 @@ void main() {
|
|
|
54097
54097
|
const inverseMatrix = new Matrix4();
|
|
54098
54098
|
const ray = new Ray();
|
|
54099
54099
|
const sphere = new Sphere();
|
|
54100
|
-
const interRay = new Vector3
|
|
54100
|
+
const interRay = new Vector3();
|
|
54101
54101
|
const geometry = this.geometry;
|
|
54102
54102
|
if (!geometry.boundingSphere) geometry.computeBoundingSphere();
|
|
54103
54103
|
sphere.copy(geometry.boundingSphere);
|
|
@@ -54107,9 +54107,9 @@ void main() {
|
|
|
54107
54107
|
}
|
|
54108
54108
|
inverseMatrix.copy(this.matrixWorld).invert();
|
|
54109
54109
|
ray.copy(raycaster.ray).applyMatrix4(inverseMatrix);
|
|
54110
|
-
const vStart = new Vector3
|
|
54111
|
-
const vEnd = new Vector3
|
|
54112
|
-
const interSegment = new Vector3
|
|
54110
|
+
const vStart = new Vector3();
|
|
54111
|
+
const vEnd = new Vector3();
|
|
54112
|
+
const interSegment = new Vector3();
|
|
54113
54113
|
const step = this instanceof LineSegments ? 2 : 1;
|
|
54114
54114
|
const index2 = geometry.index;
|
|
54115
54115
|
const attributes = geometry.attributes;
|
|
@@ -54412,7 +54412,7 @@ void main() {
|
|
|
54412
54412
|
useAlphaMap: { value: 0 },
|
|
54413
54413
|
color: { value: new Color(16777215) },
|
|
54414
54414
|
opacity: { value: 1 },
|
|
54415
|
-
resolution: { value: new Vector2
|
|
54415
|
+
resolution: { value: new Vector2(1, 1) },
|
|
54416
54416
|
sizeAttenuation: { value: 1 },
|
|
54417
54417
|
dashArray: { value: 0 },
|
|
54418
54418
|
dashOffset: { value: 0 },
|
|
@@ -54420,7 +54420,7 @@ void main() {
|
|
|
54420
54420
|
useDash: { value: 0 },
|
|
54421
54421
|
visibility: { value: 1 },
|
|
54422
54422
|
alphaTest: { value: 0 },
|
|
54423
|
-
repeat: { value: new Vector2
|
|
54423
|
+
repeat: { value: new Vector2(1, 1) }
|
|
54424
54424
|
}),
|
|
54425
54425
|
vertexShader: ShaderChunk.meshline_vert,
|
|
54426
54426
|
fragmentShader: ShaderChunk.meshline_frag
|
|
@@ -54811,12 +54811,12 @@ void main() {
|
|
|
54811
54811
|
const xz = this.screenDist(this._lineX.position, this._lineZ.position);
|
|
54812
54812
|
const yz = this.screenDist(this._lineY.position, this._lineZ.position);
|
|
54813
54813
|
let conflicts = 0;
|
|
54814
|
-
if (lx !== void 0 && lx < 0.
|
|
54815
|
-
if (ly !== void 0 && ly < 0.
|
|
54816
|
-
if (lz !== void 0 && lz < 0.
|
|
54817
|
-
if (xy !== void 0 && xy < 0.
|
|
54818
|
-
if (xz !== void 0 && xz < 0.
|
|
54819
|
-
if (yz !== void 0 && yz < 0.
|
|
54814
|
+
if (lx !== void 0 && lx < 0.3) conflicts++;
|
|
54815
|
+
if (ly !== void 0 && ly < 0.3) conflicts++;
|
|
54816
|
+
if (lz !== void 0 && lz < 0.3) conflicts++;
|
|
54817
|
+
if (xy !== void 0 && xy < 0.3) conflicts++;
|
|
54818
|
+
if (xz !== void 0 && xz < 0.3) conflicts++;
|
|
54819
|
+
if (yz !== void 0 && yz < 0.3) conflicts++;
|
|
54820
54820
|
const collapse2 = conflicts > 1;
|
|
54821
54821
|
this._label.visible = collapse2;
|
|
54822
54822
|
this._line.label.visible = !collapse2;
|
|
@@ -54846,6 +54846,7 @@ void main() {
|
|
|
54846
54846
|
this._line.mesh.visible = false;
|
|
54847
54847
|
this._line.label.visible = false;
|
|
54848
54848
|
}
|
|
54849
|
+
this._label.visible = false;
|
|
54849
54850
|
this._viewer.renderer.needsUpdate = true;
|
|
54850
54851
|
}
|
|
54851
54852
|
/**
|
|
@@ -54895,7 +54896,9 @@ void main() {
|
|
|
54895
54896
|
* Disposes all resources.
|
|
54896
54897
|
*/
|
|
54897
54898
|
dispose() {
|
|
54899
|
+
console.log("dispose");
|
|
54898
54900
|
if (this._animId !== void 0) cancelAnimationFrame(this._animId);
|
|
54901
|
+
this._html.div.remove();
|
|
54899
54902
|
this._viewer.renderer.remove(this._group);
|
|
54900
54903
|
this._startMarker.dispose();
|
|
54901
54904
|
this._endMarker.dispose();
|
|
@@ -55078,7 +55081,7 @@ void main() {
|
|
|
55078
55081
|
/** The currently hovered/dragged handle, if any. */
|
|
55079
55082
|
__publicField(this, "_handle");
|
|
55080
55083
|
/** The origin point for dragging, updated on pointer down. */
|
|
55081
|
-
__publicField(this, "_dragOrigin", new Vector3
|
|
55084
|
+
__publicField(this, "_dragOrigin", new Vector3());
|
|
55082
55085
|
/** The plane used for drag intersection (perpendicular to the camera direction). */
|
|
55083
55086
|
__publicField(this, "_dragPlane", new Plane());
|
|
55084
55087
|
/** Whether a pointer is currently down on a handle. */
|
|
@@ -55086,7 +55089,7 @@ void main() {
|
|
|
55086
55089
|
/** A reusable Raycaster for picking and plane intersection. */
|
|
55087
55090
|
__publicField(this, "_raycaster", new Raycaster$1());
|
|
55088
55091
|
/** The box state before the current drag. */
|
|
55089
|
-
__publicField(this, "_lastBox", new Box3
|
|
55092
|
+
__publicField(this, "_lastBox", new Box3());
|
|
55090
55093
|
/** A collection of unregister callbacks for event listeners. */
|
|
55091
55094
|
__publicField(this, "_unregisters", []);
|
|
55092
55095
|
/** The ID of the pointer that is captured, if any. */
|
|
@@ -55171,7 +55174,7 @@ void main() {
|
|
|
55171
55174
|
onPointerLeave(event) {
|
|
55172
55175
|
var _a2, _b2;
|
|
55173
55176
|
if (!this.pointerCaptured) {
|
|
55174
|
-
(_b2 = this.onFaceEnter) == null ? void 0 : _b2.call(this, ((_a2 = this._handle) == null ? void 0 : _a2.forward) ?? new Vector3
|
|
55177
|
+
(_b2 = this.onFaceEnter) == null ? void 0 : _b2.call(this, ((_a2 = this._handle) == null ? void 0 : _a2.forward) ?? new Vector3());
|
|
55175
55178
|
}
|
|
55176
55179
|
}
|
|
55177
55180
|
/**
|
|
@@ -55206,13 +55209,13 @@ void main() {
|
|
|
55206
55209
|
this.onDrag(event);
|
|
55207
55210
|
return;
|
|
55208
55211
|
}
|
|
55209
|
-
const hits = this.raycast(new Vector2
|
|
55212
|
+
const hits = this.raycast(new Vector2(event.offsetX, event.offsetY));
|
|
55210
55213
|
const handle = (_b2 = (_a2 = hits == null ? void 0 : hits[0]) == null ? void 0 : _a2.object) == null ? void 0 : _b2.userData.handle;
|
|
55211
55214
|
if (handle !== this._handle) {
|
|
55212
55215
|
(_c = this._handle) == null ? void 0 : _c.highlight(false);
|
|
55213
55216
|
handle == null ? void 0 : handle.highlight(true);
|
|
55214
55217
|
this._handle = handle;
|
|
55215
|
-
(_d = this.onFaceEnter) == null ? void 0 : _d.call(this, (handle == null ? void 0 : handle.forward) ?? new Vector3
|
|
55218
|
+
(_d = this.onFaceEnter) == null ? void 0 : _d.call(this, (handle == null ? void 0 : handle.forward) ?? new Vector3());
|
|
55216
55219
|
}
|
|
55217
55220
|
}
|
|
55218
55221
|
/**
|
|
@@ -55230,7 +55233,7 @@ void main() {
|
|
|
55230
55233
|
this.onMouseMove(event);
|
|
55231
55234
|
} else {
|
|
55232
55235
|
this._handle = void 0;
|
|
55233
|
-
(_a2 = this.onFaceEnter) == null ? void 0 : _a2.call(this, new Vector3
|
|
55236
|
+
(_a2 = this.onFaceEnter) == null ? void 0 : _a2.call(this, new Vector3());
|
|
55234
55237
|
}
|
|
55235
55238
|
(_b2 = this.onBoxConfirm) == null ? void 0 : _b2.call(this, this._sharedBox);
|
|
55236
55239
|
}
|
|
@@ -55242,7 +55245,7 @@ void main() {
|
|
|
55242
55245
|
*/
|
|
55243
55246
|
onMouseDown(event) {
|
|
55244
55247
|
var _a2, _b2, _c, _d;
|
|
55245
|
-
const hits = this.raycast(new Vector2
|
|
55248
|
+
const hits = this.raycast(new Vector2(event.offsetX, event.offsetY));
|
|
55246
55249
|
const handle = (_c = (_b2 = (_a2 = hits == null ? void 0 : hits[0]) == null ? void 0 : _a2.object) == null ? void 0 : _b2.userData) == null ? void 0 : _c.handle;
|
|
55247
55250
|
if (!handle) return;
|
|
55248
55251
|
this._handle = handle;
|
|
@@ -55264,7 +55267,7 @@ void main() {
|
|
|
55264
55267
|
onDrag(event) {
|
|
55265
55268
|
var _a2;
|
|
55266
55269
|
if (!this._handle) return;
|
|
55267
|
-
const point = this.raycastPlane(new Vector2
|
|
55270
|
+
const point = this.raycastPlane(new Vector2(event.offsetX, event.offsetY)) ?? this._dragOrigin.clone();
|
|
55268
55271
|
const delta = point.sub(this._dragOrigin);
|
|
55269
55272
|
const amount = delta.dot(this._handle.forward);
|
|
55270
55273
|
const box = this.stretch(this._handle.axis, this._handle.sign, amount);
|
|
@@ -55318,7 +55321,7 @@ void main() {
|
|
|
55318
55321
|
raycastPlane(position) {
|
|
55319
55322
|
return this.getRaycaster(position).ray.intersectPlane(
|
|
55320
55323
|
this._dragPlane,
|
|
55321
|
-
new Vector3
|
|
55324
|
+
new Vector3()
|
|
55322
55325
|
);
|
|
55323
55326
|
}
|
|
55324
55327
|
}
|
|
@@ -55466,15 +55469,24 @@ void main() {
|
|
|
55466
55469
|
__publicField(this, "_color");
|
|
55467
55470
|
__publicField(this, "_highlightColor");
|
|
55468
55471
|
__publicField(this, "_materials");
|
|
55472
|
+
__publicField(this, "_camSub");
|
|
55469
55473
|
this._materials = [matAlways, matBehind];
|
|
55470
|
-
this._forward = new Vector3
|
|
55474
|
+
this._forward = new Vector3();
|
|
55471
55475
|
this.forward[axes] = sign2;
|
|
55472
55476
|
this.axis = axes;
|
|
55473
55477
|
this.sign = sign2;
|
|
55474
55478
|
this._color = color ?? new Color(0);
|
|
55475
55479
|
this._highlightColor = this._color.clone().lerp(new Color(13421772), 0.8);
|
|
55476
55480
|
this.userData.handle = this;
|
|
55477
|
-
this.quaternion.setFromUnitVectors(new Vector3
|
|
55481
|
+
this.quaternion.setFromUnitVectors(new Vector3(0, -1, 0), this._forward);
|
|
55482
|
+
}
|
|
55483
|
+
trackCamera(camera2) {
|
|
55484
|
+
const rescale = () => {
|
|
55485
|
+
const size = camera2.frustrumSizeAt(this.position);
|
|
55486
|
+
this.scale.set(size.x * 3e-3, size.x * 3e-3, size.x * 3e-3);
|
|
55487
|
+
};
|
|
55488
|
+
this._camSub = camera2.onMoved.subscribe(() => rescale());
|
|
55489
|
+
rescale();
|
|
55478
55490
|
}
|
|
55479
55491
|
setPosition(position) {
|
|
55480
55492
|
this.position.copy(position);
|
|
@@ -55487,8 +55499,10 @@ void main() {
|
|
|
55487
55499
|
this.material[1].color.set(value ? this._highlightColor : this._color);
|
|
55488
55500
|
}
|
|
55489
55501
|
dispose() {
|
|
55502
|
+
var _a2;
|
|
55490
55503
|
this.geometry.dispose();
|
|
55491
55504
|
this._materials.forEach((m) => m.dispose());
|
|
55505
|
+
(_a2 = this._camSub) == null ? void 0 : _a2.call(this);
|
|
55492
55506
|
}
|
|
55493
55507
|
}
|
|
55494
55508
|
function createDoubleCone(size) {
|
|
@@ -55504,7 +55518,7 @@ void main() {
|
|
|
55504
55518
|
return mergedGeo;
|
|
55505
55519
|
}
|
|
55506
55520
|
class SectionBoxHandles {
|
|
55507
|
-
constructor() {
|
|
55521
|
+
constructor(camera2) {
|
|
55508
55522
|
__publicField(this, "up");
|
|
55509
55523
|
__publicField(this, "down");
|
|
55510
55524
|
__publicField(this, "left");
|
|
@@ -55519,6 +55533,12 @@ void main() {
|
|
|
55519
55533
|
this.right = new SectionBoxHandle("x", 1, size, new Color(16711680));
|
|
55520
55534
|
this.front = new SectionBoxHandle("z", 1, size, new Color(255));
|
|
55521
55535
|
this.back = new SectionBoxHandle("z", -1, size, new Color(255));
|
|
55536
|
+
this.up.trackCamera(camera2);
|
|
55537
|
+
this.down.trackCamera(camera2);
|
|
55538
|
+
this.left.trackCamera(camera2);
|
|
55539
|
+
this.right.trackCamera(camera2);
|
|
55540
|
+
this.front.trackCamera(camera2);
|
|
55541
|
+
this.back.trackCamera(camera2);
|
|
55522
55542
|
this.meshes = new Group();
|
|
55523
55543
|
this.meshes.add(this.up);
|
|
55524
55544
|
this.meshes.add(this.down);
|
|
@@ -55534,13 +55554,13 @@ void main() {
|
|
|
55534
55554
|
this.meshes.visible = value;
|
|
55535
55555
|
}
|
|
55536
55556
|
fitBox(box) {
|
|
55537
|
-
const center = box.getCenter(new Vector3
|
|
55538
|
-
this.up.setPosition(new Vector3
|
|
55539
|
-
this.down.setPosition(new Vector3
|
|
55540
|
-
this.left.setPosition(new Vector3
|
|
55541
|
-
this.right.setPosition(new Vector3
|
|
55542
|
-
this.front.setPosition(new Vector3
|
|
55543
|
-
this.back.setPosition(new Vector3
|
|
55557
|
+
const center = box.getCenter(new Vector3());
|
|
55558
|
+
this.up.setPosition(new Vector3(center.x, box.max.y, center.z));
|
|
55559
|
+
this.down.setPosition(new Vector3(center.x, box.min.y, center.z));
|
|
55560
|
+
this.left.setPosition(new Vector3(box.min.x, center.y, center.z));
|
|
55561
|
+
this.right.setPosition(new Vector3(box.max.x, center.y, center.z));
|
|
55562
|
+
this.front.setPosition(new Vector3(center.x, center.y, box.max.z));
|
|
55563
|
+
this.back.setPosition(new Vector3(center.x, center.y, box.min.z));
|
|
55544
55564
|
}
|
|
55545
55565
|
dispose() {
|
|
55546
55566
|
this.up.dispose();
|
|
@@ -55552,7 +55572,7 @@ void main() {
|
|
|
55552
55572
|
}
|
|
55553
55573
|
}
|
|
55554
55574
|
class SectionBoxGizmo {
|
|
55555
|
-
constructor(renderer) {
|
|
55575
|
+
constructor(renderer, camera2) {
|
|
55556
55576
|
__publicField(this, "_renderer");
|
|
55557
55577
|
__publicField(this, "cube");
|
|
55558
55578
|
__publicField(this, "outline");
|
|
@@ -55561,7 +55581,7 @@ void main() {
|
|
|
55561
55581
|
this._renderer = renderer;
|
|
55562
55582
|
this.cube = new SectionBoxMesh();
|
|
55563
55583
|
this.outline = new SectionBoxOutline(new Color(8882833));
|
|
55564
|
-
this.handles = new SectionBoxHandles();
|
|
55584
|
+
this.handles = new SectionBoxHandles(camera2);
|
|
55565
55585
|
this._renderer.add(this.outline);
|
|
55566
55586
|
this._renderer.add(this.handles.meshes);
|
|
55567
55587
|
this.visible = false;
|
|
@@ -55612,7 +55632,7 @@ void main() {
|
|
|
55612
55632
|
__publicField(this, "_onBoxConfirm", new distExports.SimpleEventDispatcher());
|
|
55613
55633
|
__publicField(this, "_onHover", new distExports.SimpleEventDispatcher());
|
|
55614
55634
|
this._viewer = viewer;
|
|
55615
|
-
this._gizmos = new SectionBoxGizmo(viewer.renderer);
|
|
55635
|
+
this._gizmos = new SectionBoxGizmo(viewer.renderer, viewer.camera);
|
|
55616
55636
|
this._inputs = new BoxInputs(
|
|
55617
55637
|
viewer,
|
|
55618
55638
|
this._gizmos.handles,
|
|
@@ -55627,6 +55647,9 @@ void main() {
|
|
|
55627
55647
|
this.update();
|
|
55628
55648
|
};
|
|
55629
55649
|
this._inputs.onBoxConfirm = (box) => this._onBoxConfirm.dispatch(box);
|
|
55650
|
+
viewer.renderer.onBoxUpdated.subscribe(() => {
|
|
55651
|
+
this.fitBox(viewer.renderer.getBoundingBox());
|
|
55652
|
+
});
|
|
55630
55653
|
this.clip = false;
|
|
55631
55654
|
this.visible = false;
|
|
55632
55655
|
this.interactive = false;
|
|
@@ -55727,6 +55750,7 @@ void main() {
|
|
|
55727
55750
|
set visible(value) {
|
|
55728
55751
|
if (value === this._visible) return;
|
|
55729
55752
|
this._gizmos.visible = value;
|
|
55753
|
+
this._visible = value;
|
|
55730
55754
|
if (value) {
|
|
55731
55755
|
this.update();
|
|
55732
55756
|
}
|
|
@@ -55743,11 +55767,10 @@ void main() {
|
|
|
55743
55767
|
* @param box - The bounding box to match (required).
|
|
55744
55768
|
* @param padding - The scalar amount by which to expand the bounding box. Default is `1`.
|
|
55745
55769
|
*/
|
|
55746
|
-
fitBox(box
|
|
55770
|
+
fitBox(box) {
|
|
55747
55771
|
if (!box) return;
|
|
55748
|
-
|
|
55749
|
-
this.
|
|
55750
|
-
this.renderer.section.fitBox(b);
|
|
55772
|
+
this._gizmos.fitBox(box);
|
|
55773
|
+
this.renderer.section.fitBox(box);
|
|
55751
55774
|
this._onBoxConfirm.dispatch(this.box);
|
|
55752
55775
|
this.renderer.needsUpdate = true;
|
|
55753
55776
|
}
|
|
@@ -55757,7 +55780,7 @@ void main() {
|
|
|
55757
55780
|
* Call this if the renderer's section box is changed by code outside this class.
|
|
55758
55781
|
*/
|
|
55759
55782
|
update() {
|
|
55760
|
-
this.fitBox(this.section.box
|
|
55783
|
+
this.fitBox(this.section.box);
|
|
55761
55784
|
this.renderer.needsUpdate = true;
|
|
55762
55785
|
}
|
|
55763
55786
|
/**
|
|
@@ -55779,7 +55802,7 @@ void main() {
|
|
|
55779
55802
|
/**
|
|
55780
55803
|
* The section box gizmo.
|
|
55781
55804
|
*/
|
|
55782
|
-
__publicField(this, "
|
|
55805
|
+
__publicField(this, "sectionBox");
|
|
55783
55806
|
/**
|
|
55784
55807
|
* The loading indicator gizmo.
|
|
55785
55808
|
*/
|
|
@@ -55803,7 +55826,7 @@ void main() {
|
|
|
55803
55826
|
var _a2;
|
|
55804
55827
|
this.viewer = viewer;
|
|
55805
55828
|
this._measure = new Measure(viewer);
|
|
55806
|
-
this.
|
|
55829
|
+
this.sectionBox = new SectionBox$1(viewer);
|
|
55807
55830
|
this.loading = new GizmoLoading(viewer);
|
|
55808
55831
|
this.orbit = new GizmoOrbit(
|
|
55809
55832
|
viewer.renderer,
|
|
@@ -55832,7 +55855,7 @@ void main() {
|
|
|
55832
55855
|
var _a2;
|
|
55833
55856
|
(_a2 = this.viewer.viewport.canvas.parentElement) == null ? void 0 : _a2.removeChild(this.axes.canvas);
|
|
55834
55857
|
this._measure.clear();
|
|
55835
|
-
this.
|
|
55858
|
+
this.sectionBox.dispose();
|
|
55836
55859
|
this.loading.dispose();
|
|
55837
55860
|
this.orbit.dispose();
|
|
55838
55861
|
this.rectangle.dispose();
|
|
@@ -55847,16 +55870,16 @@ void main() {
|
|
|
55847
55870
|
/**
|
|
55848
55871
|
* Current section box. To update the box use fitbox.
|
|
55849
55872
|
*/
|
|
55850
|
-
__publicField(this, "box", new Box3
|
|
55851
|
-
new Vector3
|
|
55852
|
-
new Vector3
|
|
55873
|
+
__publicField(this, "box", new Box3(
|
|
55874
|
+
new Vector3(-100, -100, -100),
|
|
55875
|
+
new Vector3(100, 100, 100)
|
|
55853
55876
|
));
|
|
55854
|
-
__publicField(this, "maxX", new Plane(new Vector3
|
|
55855
|
-
__publicField(this, "minX", new Plane(new Vector3
|
|
55856
|
-
__publicField(this, "maxY", new Plane(new Vector3
|
|
55857
|
-
__publicField(this, "minY", new Plane(new Vector3
|
|
55858
|
-
__publicField(this, "maxZ", new Plane(new Vector3
|
|
55859
|
-
__publicField(this, "minZ", new Plane(new Vector3
|
|
55877
|
+
__publicField(this, "maxX", new Plane(new Vector3(-1, 0, 0)));
|
|
55878
|
+
__publicField(this, "minX", new Plane(new Vector3(1, 0, 0)));
|
|
55879
|
+
__publicField(this, "maxY", new Plane(new Vector3(0, -1, 0)));
|
|
55880
|
+
__publicField(this, "minY", new Plane(new Vector3(0, 1, 0)));
|
|
55881
|
+
__publicField(this, "maxZ", new Plane(new Vector3(0, 0, -1)));
|
|
55882
|
+
__publicField(this, "minZ", new Plane(new Vector3(0, 0, 1)));
|
|
55860
55883
|
__publicField(this, "planes", [
|
|
55861
55884
|
this.maxX,
|
|
55862
55885
|
this.minX,
|
|
@@ -56073,7 +56096,7 @@ void main() {
|
|
|
56073
56096
|
this.renderer = renderer;
|
|
56074
56097
|
this._pixelRatio = renderer.getPixelRatio();
|
|
56075
56098
|
if (renderTarget === void 0) {
|
|
56076
|
-
const size = renderer.getSize(new Vector2
|
|
56099
|
+
const size = renderer.getSize(new Vector2());
|
|
56077
56100
|
this._width = size.width;
|
|
56078
56101
|
this._height = size.height;
|
|
56079
56102
|
renderTarget = new WebGLRenderTarget(this._width * this._pixelRatio, this._height * this._pixelRatio, { type: HalfFloatType });
|
|
@@ -56153,7 +56176,7 @@ void main() {
|
|
|
56153
56176
|
}
|
|
56154
56177
|
reset(renderTarget) {
|
|
56155
56178
|
if (renderTarget === void 0) {
|
|
56156
|
-
const size = this.renderer.getSize(new Vector2
|
|
56179
|
+
const size = this.renderer.getSize(new Vector2());
|
|
56157
56180
|
this._pixelRatio = this.renderer.getPixelRatio();
|
|
56158
56181
|
this._width = size.width;
|
|
56159
56182
|
this._height = size.height;
|
|
@@ -56241,7 +56264,7 @@ void main() {
|
|
|
56241
56264
|
name: "FXAAShader",
|
|
56242
56265
|
uniforms: {
|
|
56243
56266
|
"tDiffuse": { value: null },
|
|
56244
|
-
"resolution": { value: new Vector2
|
|
56267
|
+
"resolution": { value: new Vector2(1 / 1024, 1 / 512) }
|
|
56245
56268
|
},
|
|
56246
56269
|
vertexShader: (
|
|
56247
56270
|
/* glsl */
|
|
@@ -56528,7 +56551,7 @@ void main() {
|
|
|
56528
56551
|
this.needsSwap = true;
|
|
56529
56552
|
}
|
|
56530
56553
|
setSize(width, height) {
|
|
56531
|
-
this.material.resolution = new Vector2
|
|
56554
|
+
this.material.resolution = new Vector2(width, height);
|
|
56532
56555
|
}
|
|
56533
56556
|
get camera() {
|
|
56534
56557
|
return this.material.camera;
|
|
@@ -56768,7 +56791,7 @@ void main() {
|
|
|
56768
56791
|
* @param height - New height in pixels
|
|
56769
56792
|
*/
|
|
56770
56793
|
setSize(width, height) {
|
|
56771
|
-
this._size = new Vector2
|
|
56794
|
+
this._size = new Vector2(width, height);
|
|
56772
56795
|
this._sceneTarget.setSize(width, height);
|
|
56773
56796
|
this._renderPass.setSize(width, height);
|
|
56774
56797
|
this._composer.setSize(width, height);
|
|
@@ -56961,7 +56984,7 @@ void main() {
|
|
|
56961
56984
|
* @param target - Box in which to copy the result. A new instance is created if undefined.
|
|
56962
56985
|
* @returns The bounding box encompassing all rendered objects.
|
|
56963
56986
|
*/
|
|
56964
|
-
getBoundingBox(target = new Box3
|
|
56987
|
+
getBoundingBox(target = new Box3()) {
|
|
56965
56988
|
return this._scene.getBoundingBox(target);
|
|
56966
56989
|
}
|
|
56967
56990
|
/**
|
|
@@ -57324,7 +57347,7 @@ void main() {
|
|
|
57324
57347
|
const x = Number.parseFloat(split2[0]);
|
|
57325
57348
|
const y = Number.parseFloat(split2[1]);
|
|
57326
57349
|
const z = Number.parseFloat(split2[2]);
|
|
57327
|
-
return new Vector3
|
|
57350
|
+
return new Vector3(x, y, z);
|
|
57328
57351
|
} catch {
|
|
57329
57352
|
}
|
|
57330
57353
|
}
|
|
@@ -57336,7 +57359,7 @@ void main() {
|
|
|
57336
57359
|
try {
|
|
57337
57360
|
const x = Number.parseFloat(split2[0]);
|
|
57338
57361
|
const y = Number.parseFloat(split2[1]);
|
|
57339
|
-
return new Vector2
|
|
57362
|
+
return new Vector2(x, y);
|
|
57340
57363
|
} catch {
|
|
57341
57364
|
}
|
|
57342
57365
|
}
|
|
@@ -57369,8 +57392,8 @@ void main() {
|
|
|
57369
57392
|
return result;
|
|
57370
57393
|
}
|
|
57371
57394
|
function createBoxes(boxes) {
|
|
57372
|
-
const center = new Vector3
|
|
57373
|
-
const size = new Vector3
|
|
57395
|
+
const center = new Vector3();
|
|
57396
|
+
const size = new Vector3();
|
|
57374
57397
|
const quaternion = new Quaternion();
|
|
57375
57398
|
const matrices = boxes.map((b) => {
|
|
57376
57399
|
b.getCenter(center);
|
|
@@ -57446,131 +57469,8 @@ void main() {
|
|
|
57446
57469
|
});
|
|
57447
57470
|
}
|
|
57448
57471
|
}
|
|
57449
|
-
|
|
57450
|
-
|
|
57451
|
-
__publicField(this, "x");
|
|
57452
|
-
__publicField(this, "y");
|
|
57453
|
-
__publicField(this, "z");
|
|
57454
|
-
this.x = x;
|
|
57455
|
-
this.y = y;
|
|
57456
|
-
this.z = z;
|
|
57457
|
-
}
|
|
57458
|
-
set(x, y, z) {
|
|
57459
|
-
this.x = x;
|
|
57460
|
-
this.y = y;
|
|
57461
|
-
this.z = z;
|
|
57462
|
-
return this;
|
|
57463
|
-
}
|
|
57464
|
-
copy(v) {
|
|
57465
|
-
this.x = v.x;
|
|
57466
|
-
this.y = v.y;
|
|
57467
|
-
this.z = v.z;
|
|
57468
|
-
return this;
|
|
57469
|
-
}
|
|
57470
|
-
add(v) {
|
|
57471
|
-
this.x += v.x;
|
|
57472
|
-
this.y += v.y;
|
|
57473
|
-
this.z += v.z;
|
|
57474
|
-
return this;
|
|
57475
|
-
}
|
|
57476
|
-
sub(v) {
|
|
57477
|
-
this.x -= v.x;
|
|
57478
|
-
this.y -= v.y;
|
|
57479
|
-
this.z -= v.z;
|
|
57480
|
-
return this;
|
|
57481
|
-
}
|
|
57482
|
-
multiplyScalar(scalar) {
|
|
57483
|
-
this.x *= scalar;
|
|
57484
|
-
this.y *= scalar;
|
|
57485
|
-
this.z *= scalar;
|
|
57486
|
-
return this;
|
|
57487
|
-
}
|
|
57488
|
-
min(v) {
|
|
57489
|
-
this.x = Math.min(this.x, v.x);
|
|
57490
|
-
this.y = Math.min(this.y, v.y);
|
|
57491
|
-
this.z = Math.min(this.z, v.z);
|
|
57492
|
-
return this;
|
|
57493
|
-
}
|
|
57494
|
-
max(v) {
|
|
57495
|
-
this.x = Math.max(this.x, v.x);
|
|
57496
|
-
this.y = Math.max(this.y, v.y);
|
|
57497
|
-
this.z = Math.max(this.z, v.z);
|
|
57498
|
-
return this;
|
|
57499
|
-
}
|
|
57500
|
-
isValid() {
|
|
57501
|
-
return Number.isFinite(this.x) && Number.isFinite(this.y) && Number.isFinite(this.z);
|
|
57502
|
-
}
|
|
57503
|
-
equals(v) {
|
|
57504
|
-
return this.x === v.x && this.y === v.y && this.z === v.z;
|
|
57505
|
-
}
|
|
57506
|
-
toArray() {
|
|
57507
|
-
return [this.x, this.y, this.z];
|
|
57508
|
-
}
|
|
57509
|
-
}
|
|
57510
|
-
class Vector2 {
|
|
57511
|
-
constructor(x = 0, y = 0) {
|
|
57512
|
-
__publicField(this, "x");
|
|
57513
|
-
__publicField(this, "y");
|
|
57514
|
-
this.x = x;
|
|
57515
|
-
this.y = y;
|
|
57516
|
-
}
|
|
57517
|
-
set(x, y) {
|
|
57518
|
-
this.x = x;
|
|
57519
|
-
this.y = y;
|
|
57520
|
-
return this;
|
|
57521
|
-
}
|
|
57522
|
-
copy(v) {
|
|
57523
|
-
this.x = v.x;
|
|
57524
|
-
this.y = v.y;
|
|
57525
|
-
return this;
|
|
57526
|
-
}
|
|
57527
|
-
add(v) {
|
|
57528
|
-
this.x += v.x;
|
|
57529
|
-
this.y += v.y;
|
|
57530
|
-
return this;
|
|
57531
|
-
}
|
|
57532
|
-
sub(v) {
|
|
57533
|
-
this.x -= v.x;
|
|
57534
|
-
this.y -= v.y;
|
|
57535
|
-
return this;
|
|
57536
|
-
}
|
|
57537
|
-
multiplyScalar(scalar) {
|
|
57538
|
-
this.x *= scalar;
|
|
57539
|
-
this.y *= scalar;
|
|
57540
|
-
return this;
|
|
57541
|
-
}
|
|
57542
|
-
min(v) {
|
|
57543
|
-
this.x = Math.min(this.x, v.x);
|
|
57544
|
-
this.y = Math.min(this.y, v.y);
|
|
57545
|
-
return this;
|
|
57546
|
-
}
|
|
57547
|
-
max(v) {
|
|
57548
|
-
this.x = Math.max(this.x, v.x);
|
|
57549
|
-
this.y = Math.max(this.y, v.y);
|
|
57550
|
-
return this;
|
|
57551
|
-
}
|
|
57552
|
-
equals(v) {
|
|
57553
|
-
return this.x === v.x && this.y === v.y;
|
|
57554
|
-
}
|
|
57555
|
-
isValid() {
|
|
57556
|
-
return Number.isFinite(this.x) && Number.isFinite(this.y);
|
|
57557
|
-
}
|
|
57558
|
-
almostEquals(v, tolerance = Number.EPSILON) {
|
|
57559
|
-
return Math.abs(this.x - v.x) < tolerance && Math.abs(this.y - v.y) < tolerance;
|
|
57560
|
-
}
|
|
57561
|
-
toArray() {
|
|
57562
|
-
return [this.x, this.y];
|
|
57563
|
-
}
|
|
57564
|
-
distanceTo(v) {
|
|
57565
|
-
const dx = this.x - v.x;
|
|
57566
|
-
const dy = this.y - v.y;
|
|
57567
|
-
return Math.sqrt(dx * dx + dy * dy);
|
|
57568
|
-
}
|
|
57569
|
-
clamp01() {
|
|
57570
|
-
this.x = clamp$1(this.x, 0, 1);
|
|
57571
|
-
this.y = clamp$1(this.y, 0, 1);
|
|
57572
|
-
return this;
|
|
57573
|
-
}
|
|
57472
|
+
function almostEqual(v1, v2, epsilon = 1e-6) {
|
|
57473
|
+
return Math.abs(v1.x - v2.x) < epsilon && Math.abs(v1.y - v2.y) < epsilon;
|
|
57574
57474
|
}
|
|
57575
57475
|
class Segment {
|
|
57576
57476
|
constructor(origin = new Vector3(), target = new Vector3()) {
|
|
@@ -57595,62 +57495,6 @@ void main() {
|
|
|
57595
57495
|
return this.origin.equals(segment.origin) && this.target.equals(segment.target);
|
|
57596
57496
|
}
|
|
57597
57497
|
}
|
|
57598
|
-
class Box3 {
|
|
57599
|
-
constructor(min2 = new Vector3(Infinity, Infinity, Infinity), max2 = new Vector3(-Infinity, -Infinity, -Infinity)) {
|
|
57600
|
-
__publicField(this, "min");
|
|
57601
|
-
__publicField(this, "max");
|
|
57602
|
-
this.min = min2;
|
|
57603
|
-
this.max = max2;
|
|
57604
|
-
}
|
|
57605
|
-
static fromArray(array) {
|
|
57606
|
-
return new Box3().set(
|
|
57607
|
-
new Vector3(array[0], array[1], array[2]),
|
|
57608
|
-
new Vector3(array[3], array[4], array[5])
|
|
57609
|
-
);
|
|
57610
|
-
}
|
|
57611
|
-
isValid() {
|
|
57612
|
-
return this.min.x <= this.max.x && this.min.y <= this.max.y && this.min.z <= this.max.z;
|
|
57613
|
-
}
|
|
57614
|
-
set(min2, max2) {
|
|
57615
|
-
this.min.copy(min2);
|
|
57616
|
-
this.max.copy(max2);
|
|
57617
|
-
return this;
|
|
57618
|
-
}
|
|
57619
|
-
setFromPoints(points) {
|
|
57620
|
-
this.min.set(Infinity, Infinity, Infinity);
|
|
57621
|
-
this.max.set(-Infinity, -Infinity, -Infinity);
|
|
57622
|
-
points.forEach((point) => {
|
|
57623
|
-
this.min.min(point);
|
|
57624
|
-
this.max.max(point);
|
|
57625
|
-
});
|
|
57626
|
-
return this;
|
|
57627
|
-
}
|
|
57628
|
-
getCenter(target = new Vector3()) {
|
|
57629
|
-
return target.copy(this.min).add(this.max).multiplyScalar(0.5);
|
|
57630
|
-
}
|
|
57631
|
-
getSize(target = new Vector3()) {
|
|
57632
|
-
return target.copy(this.max).sub(this.min);
|
|
57633
|
-
}
|
|
57634
|
-
containsPoint(point) {
|
|
57635
|
-
return point.x >= this.min.x && point.x <= this.max.x && point.y >= this.min.y && point.y <= this.max.y && point.z >= this.min.z && point.z <= this.max.z;
|
|
57636
|
-
}
|
|
57637
|
-
intersectsBox(box) {
|
|
57638
|
-
return !(box.max.x < this.min.x || box.min.x > this.max.x || box.max.y < this.min.y || box.min.y > this.max.y || box.max.z < this.min.z || box.min.z > this.max.z);
|
|
57639
|
-
}
|
|
57640
|
-
expandByPoint(point) {
|
|
57641
|
-
this.min.min(point);
|
|
57642
|
-
this.max.max(point);
|
|
57643
|
-
return this;
|
|
57644
|
-
}
|
|
57645
|
-
union(box) {
|
|
57646
|
-
this.min.min(box.min);
|
|
57647
|
-
this.max.max(box.max);
|
|
57648
|
-
return this;
|
|
57649
|
-
}
|
|
57650
|
-
toArray() {
|
|
57651
|
-
return [this.min.x, this.min.y, this.min.z, this.max.x, this.max.y, this.max.z];
|
|
57652
|
-
}
|
|
57653
|
-
}
|
|
57654
57498
|
class RGBA {
|
|
57655
57499
|
constructor(r, g, b, a = 1) {
|
|
57656
57500
|
__publicField(this, "r");
|
|
@@ -57835,7 +57679,7 @@ void main() {
|
|
|
57835
57679
|
async handleMouseClick(event) {
|
|
57836
57680
|
if (event.pointerType !== "mouse") return;
|
|
57837
57681
|
const pos = this.relativePosition(event);
|
|
57838
|
-
if (!this._lastMouseDownPosition
|
|
57682
|
+
if (!almostEqual(this._lastMouseDownPosition, pos, 0.01)) {
|
|
57839
57683
|
return;
|
|
57840
57684
|
}
|
|
57841
57685
|
const hit = await this._selection.hitTest(pos);
|
|
@@ -58171,7 +58015,6 @@ void main() {
|
|
|
58171
58015
|
}
|
|
58172
58016
|
// -------------------- SectionBox -------------------
|
|
58173
58017
|
writeSectionBoxState(data2) {
|
|
58174
|
-
this.writeBoolean(data2.enabled);
|
|
58175
58018
|
this.writeBoolean(data2.visible);
|
|
58176
58019
|
this.writeBoolean(data2.interactible);
|
|
58177
58020
|
this.writeBoolean(data2.clip);
|
|
@@ -58327,13 +58170,11 @@ void main() {
|
|
|
58327
58170
|
return new Segment(position, target);
|
|
58328
58171
|
}
|
|
58329
58172
|
readSectionBoxState() {
|
|
58330
|
-
const enabled = this.readBoolean();
|
|
58331
58173
|
const visible2 = this.readBoolean();
|
|
58332
58174
|
const interactible = this.readBoolean();
|
|
58333
58175
|
const clip = this.readBoolean();
|
|
58334
58176
|
const box = this.readBox3();
|
|
58335
58177
|
return {
|
|
58336
|
-
enabled,
|
|
58337
58178
|
visible: visible2,
|
|
58338
58179
|
interactible,
|
|
58339
58180
|
clip,
|
|
@@ -58452,6 +58293,12 @@ void main() {
|
|
|
58452
58293
|
marshal.writeUInt(componentHandle);
|
|
58453
58294
|
this._socket.sendRPC(marshal);
|
|
58454
58295
|
}
|
|
58296
|
+
RPCEnableSectionBox(value) {
|
|
58297
|
+
const marshal = new Marshal();
|
|
58298
|
+
marshal.writeString("RPCEnableSectionBox");
|
|
58299
|
+
marshal.writeBoolean(value);
|
|
58300
|
+
this._socket.sendRPC(marshal);
|
|
58301
|
+
}
|
|
58455
58302
|
async RPCFrameAll(blendTime) {
|
|
58456
58303
|
const marshal = new Marshal();
|
|
58457
58304
|
marshal.writeString("RPCFrameAll");
|
|
@@ -58885,17 +58732,14 @@ void main() {
|
|
|
58885
58732
|
// VECTOR AND GEOMETRY VALIDATIONS
|
|
58886
58733
|
//= ===========================================================================
|
|
58887
58734
|
static isValidVector2(value) {
|
|
58888
|
-
if (!value.
|
|
58735
|
+
if (!Number.isFinite(value.x) || !Number.isFinite(value.y)) {
|
|
58889
58736
|
console.warn("Invalid value: must be a valid Vector2. Aborting operation.");
|
|
58890
58737
|
return false;
|
|
58891
58738
|
}
|
|
58892
58739
|
return true;
|
|
58893
58740
|
}
|
|
58894
58741
|
static isRelativeVector2(value) {
|
|
58895
|
-
if (!
|
|
58896
|
-
console.warn("Invalid value: must be a valid Vector2. Aborting operation.");
|
|
58897
|
-
return false;
|
|
58898
|
-
}
|
|
58742
|
+
if (!this.isValidVector2(value)) return false;
|
|
58899
58743
|
if (value.x < 0 || value.x > 1 || value.y < 0 || value.y > 1) {
|
|
58900
58744
|
console.warn("Invalid value: must be a relative Vector2 (0-1, 0-1). Aborting operation.");
|
|
58901
58745
|
return false;
|
|
@@ -58903,14 +58747,14 @@ void main() {
|
|
|
58903
58747
|
return true;
|
|
58904
58748
|
}
|
|
58905
58749
|
static isValidVector3(value) {
|
|
58906
|
-
if (!value.
|
|
58750
|
+
if (!Number.isFinite(value.x) || !Number.isFinite(value.y) || !Number.isFinite(value.z)) {
|
|
58907
58751
|
console.warn("Invalid Vector3. Aborting operation.");
|
|
58908
58752
|
return false;
|
|
58909
58753
|
}
|
|
58910
58754
|
return true;
|
|
58911
58755
|
}
|
|
58912
58756
|
static isValidBox(box) {
|
|
58913
|
-
if (
|
|
58757
|
+
if (box.isEmpty()) {
|
|
58914
58758
|
console.warn("Box is invalid. Min values must be less than max values");
|
|
58915
58759
|
return false;
|
|
58916
58760
|
}
|
|
@@ -59298,6 +59142,9 @@ void main() {
|
|
|
59298
59142
|
* SECTION BOX METHODS
|
|
59299
59143
|
* Methods for controlling section box visibility and position.
|
|
59300
59144
|
******************************************************************************/
|
|
59145
|
+
RPCEnableSectionBox(enable) {
|
|
59146
|
+
this.rpc.RPCEnableSectionBox(enable);
|
|
59147
|
+
}
|
|
59301
59148
|
RPCSetSectionBox(state) {
|
|
59302
59149
|
this.rpc.RPCSetSectionBox(state);
|
|
59303
59150
|
}
|
|
@@ -61448,10 +61295,14 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
61448
61295
|
__publicField(this, "_rpc");
|
|
61449
61296
|
__publicField(this, "_vims");
|
|
61450
61297
|
__publicField(this, "_selectedNodes");
|
|
61298
|
+
__publicField(this, "_onValueChanged", new distExports$1.SignalDispatcher());
|
|
61451
61299
|
this._rpc = rpc;
|
|
61452
61300
|
this._vims = vims;
|
|
61453
61301
|
this._selectedNodes = /* @__PURE__ */ new Map();
|
|
61454
61302
|
}
|
|
61303
|
+
get onValueChanged() {
|
|
61304
|
+
return this._onValueChanged.asEvent();
|
|
61305
|
+
}
|
|
61455
61306
|
/**
|
|
61456
61307
|
* Gets the total number of selected nodes across all VIMs.
|
|
61457
61308
|
* @returns The total count of selected nodes.
|
|
@@ -61520,12 +61371,17 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
61520
61371
|
nodeSet = /* @__PURE__ */ new Set();
|
|
61521
61372
|
this._selectedNodes.set(vim, nodeSet);
|
|
61522
61373
|
}
|
|
61374
|
+
let changed = false;
|
|
61523
61375
|
nodes.forEach((n) => {
|
|
61524
61376
|
if (!nodeSet.has(n)) {
|
|
61525
61377
|
nodeSet.add(n);
|
|
61526
61378
|
vim.highlight([n]);
|
|
61379
|
+
changed = true;
|
|
61527
61380
|
}
|
|
61528
61381
|
});
|
|
61382
|
+
if (changed) {
|
|
61383
|
+
this._onValueChanged.dispatch();
|
|
61384
|
+
}
|
|
61529
61385
|
}
|
|
61530
61386
|
/**
|
|
61531
61387
|
* Removes the specified node(s) from the current selection.
|
|
@@ -61537,27 +61393,37 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
61537
61393
|
const nodeSet = this._selectedNodes.get(vim);
|
|
61538
61394
|
if (!nodeSet) return;
|
|
61539
61395
|
const nodes = Array.isArray(node) ? node : [node];
|
|
61396
|
+
let changed = false;
|
|
61540
61397
|
nodes.forEach((n) => {
|
|
61541
61398
|
if (nodeSet.has(n)) {
|
|
61542
61399
|
nodeSet.delete(n);
|
|
61543
61400
|
vim.removeHighlight([n], "visible");
|
|
61401
|
+
changed = true;
|
|
61544
61402
|
}
|
|
61545
61403
|
});
|
|
61546
61404
|
if (nodeSet.size === 0) {
|
|
61547
61405
|
this._selectedNodes.delete(vim);
|
|
61548
61406
|
}
|
|
61407
|
+
if (changed) {
|
|
61408
|
+
this._onValueChanged.dispatch();
|
|
61409
|
+
}
|
|
61549
61410
|
}
|
|
61550
61411
|
/**
|
|
61551
61412
|
* Clears all selections across all VIMs or for a specific VIM.
|
|
61552
61413
|
* @param vim - Optional. If provided, only clears selections for the specified VIM.
|
|
61553
61414
|
*/
|
|
61554
61415
|
clear(vim) {
|
|
61416
|
+
let changed = false;
|
|
61555
61417
|
this._selectedNodes.forEach((nodes, v) => {
|
|
61556
61418
|
if (vim === void 0 || v === vim) {
|
|
61557
61419
|
v.removeHighlight(Array.from(nodes), "visible");
|
|
61420
|
+
changed = true;
|
|
61558
61421
|
}
|
|
61559
61422
|
});
|
|
61560
61423
|
this._selectedNodes.clear();
|
|
61424
|
+
if (changed) {
|
|
61425
|
+
this._onValueChanged.dispatch();
|
|
61426
|
+
}
|
|
61561
61427
|
}
|
|
61562
61428
|
/**
|
|
61563
61429
|
* Calculates the bounding box encompassing all selected nodes.
|
|
@@ -61586,8 +61452,12 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
61586
61452
|
class VimCollection {
|
|
61587
61453
|
constructor() {
|
|
61588
61454
|
__publicField(this, "_vims");
|
|
61455
|
+
__publicField(this, "_onChanged", new distExports$1.SignalDispatcher());
|
|
61589
61456
|
this._vims = [];
|
|
61590
61457
|
}
|
|
61458
|
+
get onChanged() {
|
|
61459
|
+
return this._onChanged.asEvent();
|
|
61460
|
+
}
|
|
61591
61461
|
get count() {
|
|
61592
61462
|
return this._vims.length;
|
|
61593
61463
|
}
|
|
@@ -61598,6 +61468,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
61598
61468
|
add(vim) {
|
|
61599
61469
|
if (!this._vims.some((v) => v.handle === vim.handle)) {
|
|
61600
61470
|
this._vims.push(vim);
|
|
61471
|
+
this._onChanged.dispatch();
|
|
61601
61472
|
}
|
|
61602
61473
|
}
|
|
61603
61474
|
/**
|
|
@@ -61605,7 +61476,11 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
61605
61476
|
* @param vim - The Vim instance to remove.
|
|
61606
61477
|
*/
|
|
61607
61478
|
remove(vim) {
|
|
61479
|
+
const count = this._vims.length;
|
|
61608
61480
|
this._vims = this._vims.filter((v) => v.handle !== vim.handle);
|
|
61481
|
+
if (this._vims.length !== count) {
|
|
61482
|
+
this._onChanged.dispatch();
|
|
61483
|
+
}
|
|
61609
61484
|
}
|
|
61610
61485
|
/**
|
|
61611
61486
|
* Gets a Vim instance by its handle.
|
|
@@ -61868,7 +61743,6 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
61868
61743
|
}
|
|
61869
61744
|
class SectionBox {
|
|
61870
61745
|
constructor(rpc) {
|
|
61871
|
-
__publicField(this, "_enabled", false);
|
|
61872
61746
|
__publicField(this, "_visible", true);
|
|
61873
61747
|
__publicField(this, "_interactible", true);
|
|
61874
61748
|
__publicField(this, "_clip", true);
|
|
@@ -61887,6 +61761,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
61887
61761
|
return this._animationFrame > 0;
|
|
61888
61762
|
}
|
|
61889
61763
|
async onConnect() {
|
|
61764
|
+
this._rpc.RPCEnableSectionBox(true);
|
|
61890
61765
|
this.push();
|
|
61891
61766
|
this._interval = setInterval(() => this.pull(), 1e3);
|
|
61892
61767
|
}
|
|
@@ -61901,10 +61776,9 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
61901
61776
|
if (this.needUpdate) return;
|
|
61902
61777
|
const state = await this._rpc.RPCGetSectionBox();
|
|
61903
61778
|
let changed = false;
|
|
61904
|
-
if (state.
|
|
61779
|
+
if (state.visible !== this._visible || state.interactible !== this._interactible || state.clip !== this._clip || state.box !== this._box) {
|
|
61905
61780
|
changed = true;
|
|
61906
61781
|
}
|
|
61907
|
-
this._enabled = state.enabled;
|
|
61908
61782
|
this._visible = state.visible;
|
|
61909
61783
|
this._interactible = state.interactible;
|
|
61910
61784
|
this._clip = state.clip;
|
|
@@ -61915,20 +61789,12 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
61915
61789
|
}
|
|
61916
61790
|
async push() {
|
|
61917
61791
|
await this._rpc.RPCSetSectionBox({
|
|
61918
|
-
enabled: this._enabled,
|
|
61919
61792
|
visible: this._visible,
|
|
61920
61793
|
interactible: this._interactible,
|
|
61921
61794
|
clip: this._clip,
|
|
61922
61795
|
box: this._box
|
|
61923
61796
|
});
|
|
61924
61797
|
}
|
|
61925
|
-
get enabled() {
|
|
61926
|
-
return this._enabled;
|
|
61927
|
-
}
|
|
61928
|
-
set enabled(value) {
|
|
61929
|
-
this._enabled = value;
|
|
61930
|
-
this.scheduleUpdate();
|
|
61931
|
-
}
|
|
61932
61798
|
get visible() {
|
|
61933
61799
|
return this._visible;
|
|
61934
61800
|
}
|
|
@@ -61936,10 +61802,10 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
61936
61802
|
this._visible = value;
|
|
61937
61803
|
this.scheduleUpdate();
|
|
61938
61804
|
}
|
|
61939
|
-
get
|
|
61805
|
+
get interactive() {
|
|
61940
61806
|
return this._interactible;
|
|
61941
61807
|
}
|
|
61942
|
-
set
|
|
61808
|
+
set interactive(value) {
|
|
61943
61809
|
this._interactible = value;
|
|
61944
61810
|
this.scheduleUpdate();
|
|
61945
61811
|
}
|
|
@@ -62049,6 +61915,9 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
62049
61915
|
get decoder() {
|
|
62050
61916
|
return this._decoder;
|
|
62051
61917
|
}
|
|
61918
|
+
get selection() {
|
|
61919
|
+
return this._selection;
|
|
61920
|
+
}
|
|
62052
61921
|
/**
|
|
62053
61922
|
* Gets the current URL to which the viewer is connected.
|
|
62054
61923
|
* @returns The URL as a string, or undefined if not connected.
|
|
@@ -62216,6 +62085,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
62216
62085
|
Vector3,
|
|
62217
62086
|
Viewer,
|
|
62218
62087
|
Vim,
|
|
62088
|
+
almostEqual,
|
|
62219
62089
|
clamp: clamp$1,
|
|
62220
62090
|
remap,
|
|
62221
62091
|
utils: promise
|
|
@@ -66678,6 +66548,31 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
66678
66548
|
wrapper: "div",
|
|
66679
66549
|
clickable: false
|
|
66680
66550
|
}), _defineProperty(_class2, "supportedWrappers", ["div", "span"]), _defineProperty(_class2, "displayName", "ReactTooltip"), _class2)) || _class) || _class) || _class) || _class) || _class) || _class) || _class;
|
|
66551
|
+
function slidersHoriz({ height, width, fill: fill2, className }) {
|
|
66552
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { className, height, width, viewBox: "0 0 256 256", children: [
|
|
66553
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
66554
|
+
"path",
|
|
66555
|
+
{
|
|
66556
|
+
fill: fill2,
|
|
66557
|
+
d: "M24,74h111.163c6.293,15.258,21.308,26,38.837,26s32.543-10.742,38.837-26h19.163c8.836,0,16-7.164,16-16s-7.164-16-16-16h-19.163c-6.293-15.258-21.308-26-38.837-26s-32.543,10.742-38.837,26H24c-8.836,0-16,7.164-16,16s7.164,16,16,16Zm132.083-17.637c.014-.151,.031-.301,.048-.451,.05-.435,.116-.864,.197-1.289,.021-.11,.037-.222,.06-.331,.106-.503,.236-.998,.383-1.484,.046-.153,.1-.303,.15-.455,.116-.35,.242-.694,.379-1.033,.067-.167,.132-.336,.204-.5,.189-.433,.393-.859,.615-1.273,.092-.173,.196-.339,.294-.508,.15-.26,.305-.517,.467-.768,.133-.205,.268-.409,.409-.608,.147-.208,.302-.41,.458-.611,.28-.362,.572-.713,.878-1.053,.13-.146,.259-.293,.395-.435,.212-.221,.432-.435,.656-.645,.116-.109,.234-.215,.354-.321,.787-.703,1.634-1.338,2.535-1.896,.1-.062,.199-.123,.3-.182,.304-.181,.612-.356,.928-.519,2.464-1.27,5.25-2,8.208-2s5.744,.73,8.208,2c.315,.163,.624,.338,.928,.519,.101,.06,.201,.121,.3,.182,.901,.558,1.749,1.193,2.535,1.896,.119,.106,.238,.212,.354,.321,.224,.21,.443,.424,.656,.645,.135,.142,.264,.289,.395,.435,.306,.34,.599,.691,.878,1.053,.155,.202,.311,.403,.458,.611,.141,.199,.276,.403,.409,.608,.163,.251,.317,.508,.467,.768,.098,.169,.202,.335,.294,.508,.222,.415,.425,.84,.615,1.273,.072,.165,.137,.333,.204,.5,.137,.339,.263,.684,.379,1.033,.05,.151,.104,.301,.15,.455,.147,.487,.277,.981,.383,1.484,.023,.109,.039,.221,.06,.331,.081,.425,.147,.854,.197,1.289,.018,.15,.035,.3,.048,.451,.049,.54,.083,1.084,.083,1.637s-.034,1.097-.083,1.637c-.014,.151-.031,.301-.048,.451-.05,.435-.116,.864-.197,1.289-.021,.11-.037,.222-.06,.331-.106,.503-.236,.998-.383,1.484-.046,.153-.1,.303-.15,.455-.116,.35-.242,.694-.379,1.033-.067,.167-.132,.336-.204,.5-.189,.433-.393,.859-.615,1.273-.092,.173-.196,.339-.294,.508-.15,.26-.305,.517-.467,.768-.133,.205-.268,.409-.409,.608-.147,.208-.302,.41-.458,.611-.28,.362-.572,.713-.878,1.053-.13,.146-.259,.293-.395,.435-.212,.221-.432,.435-.656,.645-.116,.109-.234,.215-.354,.321-.787,.703-1.634,1.338-2.535,1.896-.1,.062-.199,.123-.3,.182-.304,.181-.612,.356-.928,.519-2.464,1.27-5.25,2-8.208,2s-5.744-.73-8.208-2c-.315-.163-.624-.338-.928-.519-.101-.06-.201-.121-.3-.182-.901-.558-1.749-1.193-2.535-1.896-.119-.106-.238-.212-.354-.321-.224-.21-.443-.424-.656-.645-.135-.142-.264-.289-.395-.435-.306-.34-.599-.691-.878-1.053-.155-.202-.311-.403-.458-.611-.141-.199-.276-.403-.409-.608-.163-.251-.317-.508-.467-.768-.098-.169-.202-.335-.294-.508-.222-.415-.425-.84-.615-1.273-.072-.165-.137-.333-.204-.5-.137-.339-.263-.684-.379-1.033-.05-.151-.104-.301-.15-.455-.147-.487-.277-.981-.383-1.484-.023-.109-.039-.221-.06-.331-.081-.425-.147-.854-.197-1.289-.018-.15-.035-.3-.048-.451-.049-.54-.083-1.084-.083-1.637s.034-1.097,.083-1.637Z"
|
|
66558
|
+
}
|
|
66559
|
+
),
|
|
66560
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
66561
|
+
"path",
|
|
66562
|
+
{
|
|
66563
|
+
fill: fill2,
|
|
66564
|
+
d: "M232,112H120.837c-6.293-15.258-21.308-26-38.837-26s-32.543,10.742-38.837,26H24c-8.836,0-16,7.164-16,16s7.164,16,16,16h19.163c6.293,15.258,21.308,26,38.837,26s32.543-10.742,38.837-26h111.163c8.836,0,16-7.164,16-16s-7.164-16-16-16Zm-132.083,17.637c-.014,.151-.031,.301-.048,.451-.05,.435-.116,.864-.197,1.289-.021,.11-.037,.222-.06,.331-.106,.503-.236,.998-.383,1.484-.046,.153-.1,.303-.15,.455-.116,.35-.242,.694-.379,1.033-.067,.167-.132,.336-.204,.5-.189,.433-.393,.859-.615,1.273-.092,.173-.196,.339-.294,.508-.15,.26-.305,.517-.467,.768-.133,.205-.268,.409-.409,.608-.147,.208-.302,.41-.458,.611-.28,.362-.572,.713-.878,1.053-.13,.146-.259,.293-.395,.435-.212,.221-.432,.435-.656,.645-.116,.109-.234,.215-.354,.321-.787,.703-1.634,1.338-2.535,1.896-.1,.062-.199,.123-.3,.182-.304,.181-.612,.356-.928,.519-2.464,1.27-5.25,2-8.208,2s-5.744-.73-8.208-2c-.315-.163-.624-.338-.928-.519-.101-.06-.201-.121-.3-.182-.901-.558-1.749-1.193-2.535-1.896-.119-.106-.238-.212-.354-.321-.224-.21-.443-.424-.656-.645-.135-.142-.264-.289-.395-.435-.306-.34-.599-.691-.878-1.053-.155-.202-.311-.403-.458-.611-.141-.199-.276-.403-.409-.608-.163-.251-.317-.508-.467-.768-.098-.169-.202-.335-.294-.508-.222-.415-.425-.84-.615-1.273-.072-.165-.137-.333-.204-.5-.137-.339-.263-.684-.379-1.033-.05-.151-.104-.301-.15-.455-.147-.487-.277-.981-.383-1.484-.023-.109-.039-.221-.06-.331-.081-.425-.147-.854-.197-1.289-.018-.15-.035-.3-.048-.451-.049-.54-.083-1.084-.083-1.637s.034-1.097,.083-1.637c.014-.151,.031-.301,.048-.451,.05-.435,.116-.864,.197-1.289,.021-.11,.037-.222,.06-.331,.106-.503,.236-.998,.383-1.484,.046-.153,.1-.303,.15-.455,.116-.35,.242-.694,.379-1.033,.067-.167,.132-.336,.204-.5,.189-.433,.393-.859,.615-1.273,.092-.173,.196-.339,.294-.508,.15-.26,.305-.517,.467-.768,.133-.205,.268-.409,.409-.608,.147-.208,.302-.41,.458-.611,.28-.362,.572-.713,.878-1.053,.13-.146,.259-.293,.395-.435,.212-.221,.432-.435,.656-.645,.116-.109,.234-.215,.354-.321,.787-.703,1.634-1.338,2.535-1.896,.1-.062,.199-.123,.3-.182,.304-.181,.612-.356,.928-.519,2.464-1.27,5.25-2,8.208-2s5.744,.73,8.208,2c.315,.163,.624,.338,.928,.519,.101,.06,.201,.121,.3,.182,.901,.558,1.749,1.193,2.535,1.896,.119,.106,.238,.212,.354,.321,.224,.21,.443,.424,.656,.645,.135,.142,.264,.289,.395,.435,.306,.34,.599,.691,.878,1.053,.155,.202,.311,.403,.458,.611,.141,.199,.276,.403,.409,.608,.163,.251,.317,.508,.467,.768,.098,.169,.202,.335,.294,.508,.222,.415,.425,.84,.615,1.273,.072,.165,.137,.333,.204,.5,.137,.339,.263,.684,.379,1.033,.05,.151,.104,.301,.15,.455,.147,.487,.277,.981,.383,1.484,.023,.109,.039,.221,.06,.331,.081,.425,.147,.854,.197,1.289,.018,.15,.035,.3,.048,.451,.049,.54,.083,1.084,.083,1.637s-.034,1.097-.083,1.637Z"
|
|
66565
|
+
}
|
|
66566
|
+
),
|
|
66567
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
66568
|
+
"path",
|
|
66569
|
+
{
|
|
66570
|
+
fill: fill2,
|
|
66571
|
+
d: "M232,182h-19.163c-6.293-15.258-21.308-26-38.837-26s-32.543,10.742-38.837,26H24c-8.836,0-16,7.164-16,16s7.164,16,16,16h111.163c6.293,15.258,21.308,26,38.837,26s32.543-10.742,38.837-26h19.163c8.836,0,16-7.164,16-16s-7.164-16-16-16Zm-40.083,17.637c-.014,.151-.031,.301-.048,.451-.05,.435-.116,.864-.197,1.289-.021,.11-.037,.222-.06,.331-.106,.503-.236,.998-.383,1.484-.046,.153-.1,.303-.15,.455-.116,.35-.242,.694-.379,1.033-.067,.167-.132,.336-.204,.5-.189,.433-.393,.859-.615,1.273-.092,.173-.196,.339-.294,.508-.15,.26-.305,.517-.467,.768-.133,.205-.268,.409-.409,.608-.147,.208-.302,.41-.458,.611-.28,.362-.572,.713-.878,1.053-.13,.146-.259,.293-.395,.435-.212,.221-.432,.435-.656,.645-.116,.109-.234,.215-.354,.321-.787,.703-1.634,1.338-2.535,1.896-.1,.062-.199,.123-.3,.182-.304,.181-.612,.356-.928,.519-2.464,1.27-5.25,2-8.208,2s-5.744-.73-8.208-2c-.315-.163-.624-.338-.928-.519-.101-.06-.201-.121-.3-.182-.901-.558-1.749-1.193-2.535-1.896-.119-.106-.238-.212-.354-.321-.224-.21-.443-.424-.656-.645-.135-.142-.264-.289-.395-.435-.306-.34-.599-.691-.878-1.053-.155-.202-.311-.403-.458-.611-.141-.199-.276-.403-.409-.608-.163-.251-.317-.508-.467-.768-.098-.169-.202-.335-.294-.508-.222-.415-.425-.84-.615-1.273-.072-.165-.137-.333-.204-.5-.137-.339-.263-.684-.379-1.033-.05-.151-.104-.301-.15-.455-.147-.487-.277-.981-.383-1.484-.023-.109-.039-.221-.06-.331-.081-.425-.147-.854-.197-1.289-.018-.15-.035-.3-.048-.451-.049-.54-.083-1.084-.083-1.637s.034-1.097,.083-1.637c.014-.151,.031-.301,.048-.451,.05-.435,.116-.864,.197-1.289,.021-.11,.037-.222,.06-.331,.106-.503,.236-.998,.383-1.484,.046-.153,.1-.303,.15-.455,.116-.35,.242-.694,.379-1.033,.067-.167,.132-.336,.204-.5,.189-.433,.393-.859,.615-1.273,.092-.173,.196-.339,.294-.508,.15-.26,.305-.517,.467-.768,.133-.205,.268-.409,.409-.608,.147-.208,.302-.41,.458-.611,.28-.362,.572-.713,.878-1.053,.13-.146,.259-.293,.395-.435,.212-.221,.432-.435,.656-.645,.116-.109,.234-.215,.354-.321,.787-.703,1.634-1.338,2.535-1.896,.1-.062,.199-.123,.3-.182,.304-.181,.612-.356,.928-.519,2.464-1.27,5.25-2,8.208-2s5.744,.73,8.208,2c.315,.163,.624,.338,.928,.519,.101,.06,.201,.121,.3,.182,.901,.558,1.749,1.193,2.535,1.896,.119,.106,.238,.212,.354,.321,.224,.21,.443,.424,.656,.645,.135,.142,.264,.289,.395,.435,.306,.34,.599,.691,.878,1.053,.155,.202,.311,.403,.458,.611,.141,.199,.276,.403,.409,.608,.163,.251,.317,.508,.467,.768,.098,.169,.202,.335,.294,.508,.222,.415,.425,.84,.615,1.273,.072,.165,.137,.333,.204,.5,.137,.339,.263,.684,.379,1.033,.05,.151,.104,.301,.15,.455,.147,.487,.277,.981,.383,1.484,.023,.109,.039,.221,.06,.331,.081,.425,.147,.854,.197,1.289,.018,.15,.035,.3,.048,.451,.049,.54,.083,1.084,.083,1.637s-.034,1.097-.083,1.637Z"
|
|
66572
|
+
}
|
|
66573
|
+
)
|
|
66574
|
+
] });
|
|
66575
|
+
}
|
|
66681
66576
|
function settings({ height, width, fill: fill2, className }) {
|
|
66682
66577
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { className, height, width, viewBox: "0 0 256 256", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
66683
66578
|
"path",
|
|
@@ -67212,6 +67107,60 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
67212
67107
|
)
|
|
67213
67108
|
] });
|
|
67214
67109
|
}
|
|
67110
|
+
function sectionBoxSettings({ height, width, fill: fill2, className }) {
|
|
67111
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { className, height, width, viewBox: "0 0 256 256", children: [
|
|
67112
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
67113
|
+
"path",
|
|
67114
|
+
{
|
|
67115
|
+
fill: fill2,
|
|
67116
|
+
d: "M 109.70368,2.190587 17.447731,55.710016 A 16.213,16.213 0 0 0 9.3632977,69.780402 L 9.6706253,176.28696 a 16.215,16.215 0 0 0 8.1654987,14.0235 l 95.269706,54.51732 c 1.35625,0.77609 3.04643,-0.20379 3.04192,-1.76478 L 115.79652,121.3395 221.23346,60.173007 c 1.35174,-0.783903 1.34611,-2.734895 -0.0101,-3.511985 L 125.95362,2.1436974 a 16.278,16.278 0 0 0 -16.24994,0.04689 z M 95.74464,211.51674 29.976783,173.88635 29.714025,82.825734 l 65.768857,37.630376 0.262761,91.06162 z m 9.95507,-107.77018 -65.766855,-37.629382 77.949835,-45.221114 65.76886,37.62938 -77.95084,45.221116 z"
|
|
67117
|
+
}
|
|
67118
|
+
),
|
|
67119
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
67120
|
+
"path",
|
|
67121
|
+
{
|
|
67122
|
+
fill: fill2,
|
|
67123
|
+
d: "m 175.57713,226.38215 c -1.28316,3.98514 -5.40414,6.14971 -9.13315,4.86244 l -3.60809,-1.24739 c -3.76004,-1.29737 -5.86799,-5.60846 -4.70379,-9.64145 l 0.42438,-1.46966 c 0.96925,-3.3572 -0.3989,-7.74539 -3.07521,-9.81798 l -0.73032,-0.56682 c -2.66882,-2.0641 -7.02118,-2.10184 -9.7235,-0.0863 l -1.1842,0.8837 c -3.23919,2.42089 -7.76901,1.59565 -10.07644,-1.77642 l -2.23242,-3.26259 c -2.3254,-3.40131 -1.6226,-8.22657 1.51812,-10.73784 l 1.15669,-0.92571 c 2.63933,-2.1082 3.9555,-6.51288 2.93126,-9.86426 l -0.27844,-0.91558 c -1.01877,-3.33861 -4.52035,-6.09072 -7.821,-6.14815 l -1.44661,-0.0253 c -3.95551,-0.0693 -7.1652,-3.56724 -7.1652,-7.7374 v -4.03725 c 0,-4.20531 3.2372,-7.66991 7.1652,-7.73745 l 1.44661,-0.0251 c 3.30016,-0.0568 6.79826,-2.79894 7.821,-6.14974 l 0.27844,-0.91348 c 1.02023,-3.33859 -0.29193,-7.75605 -2.93126,-9.86586 l -1.15669,-0.9241 c -3.16419,-2.52987 -3.82354,-7.3652 -1.51812,-10.73784 l 2.23242,-3.2647 c 2.32739,-3.39921 6.86326,-4.17603 10.07644,-1.77645 l 1.1842,0.88372 c 2.70232,2.01782 7.04471,1.98645 9.7235,-0.086 l 0.73032,-0.56467 c 2.66683,-2.06414 4.04446,-6.46083 3.07521,-9.81803 l -0.42438,-1.47176 c -1.1627,-4.02504 0.97525,-8.35208 4.70379,-9.63935 l 3.60809,-1.24738 c 3.76004,-1.299493 7.84798,0.87146 9.13315,4.86086 l 0.46987,1.4569 c 1.07175,3.32157 4.60331,6.0152 7.91546,6.0152 h 0.90232 c 3.30011,0 6.84321,-2.69363 7.91345,-6.0152 l 0.46988,-1.4569 c 1.28517,-3.98301 5.40663,-6.148123 9.13516,-4.86033 l 3.60808,1.24739 c 3.76006,1.29738 5.86803,5.60632 4.70383,9.63932 l -0.42441,1.47179 c -0.96925,3.35722 0.39893,7.7454 3.07522,9.81798 l 0.73029,0.56467 c 2.66883,2.06622 7.02122,2.10401 9.72154,0.0862 l 1.1842,-0.88369 c 3.23916,-2.41874 7.77099,-1.59353 10.0764,1.77644 l 2.23444,3.26469 c 2.32542,3.40132 1.62261,8.22656 -1.51812,10.73784 l -1.15667,0.92409 c -2.63936,2.11036 -3.95552,6.51504 -2.93328,9.86586 l 0.28043,0.91346 c 1.01873,3.34022 4.52035,6.09284 7.82101,6.14975 l 1.44514,0.0251 c 3.95749,0.0671 7.16516,3.56725 7.16516,7.73741 v 4.03729 c 0,4.20314 -3.23717,7.66987 -7.16516,7.73739 l -1.44514,0.0254 c -3.30016,0.0568 -6.79828,2.79678 -7.82101,6.14812 l -0.28043,0.91562 c -1.01872,3.33856 0.29392,7.75601 2.93328,9.86424 l 1.15667,0.92571 c 3.16422,2.52985 3.82355,7.36522 1.51812,10.73786 l -2.23444,3.26254 c -2.32537,3.40135 -6.86123,4.17815 -10.0764,1.77645 l -1.1842,-0.88373 c -2.70032,-2.01569 -7.04322,-1.98646 -9.72154,0.086 l -0.73029,0.56681 c -2.66683,2.06412 -4.04447,6.46079 -3.07522,9.81801 l 0.42441,1.46964 c 1.1627,4.02717 -0.97526,8.3542 -4.70383,9.64146 l -3.60808,1.24739 c -3.76002,1.29736 -7.84798,-0.87146 -9.13516,-4.86248 l -0.46988,-1.45474 c -1.06973,-3.32157 -4.60133,-6.01523 -7.91345,-6.01523 h -0.90232 c -3.30013,0 -6.84323,2.69366 -7.91546,6.01523 l -0.46987,1.45474 z m 8.83473,-24.33631 c 18.77473,0 33.99232,-16.18681 33.99232,-36.15723 0,-19.97043 -15.21759,-36.1551 -33.99232,-36.1551 -18.77467,0 -33.9903,16.18681 -33.9903,36.1551 0,19.96828 15.21761,36.15723 33.9903,36.15723 z"
|
|
67124
|
+
}
|
|
67125
|
+
)
|
|
67126
|
+
] });
|
|
67127
|
+
}
|
|
67128
|
+
function sectionBoxAuto({ height, width, fill: fill2, className }) {
|
|
67129
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { className, height, width, viewBox: "0 0 256 256", children: [
|
|
67130
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
67131
|
+
"path",
|
|
67132
|
+
{
|
|
67133
|
+
fill: fill2,
|
|
67134
|
+
d: "M 109.70368,2.190587 17.447731,55.710016 A 16.213,16.213 0 0 0 9.3632977,69.780402 L 9.6706253,176.28696 a 16.215,16.215 0 0 0 8.1654987,14.0235 l 95.269706,54.51732 c 1.35625,0.77609 3.04643,-0.20379 3.04192,-1.76478 L 115.79652,121.3395 221.23346,60.173007 c 1.35174,-0.783903 1.34611,-2.734895 -0.0101,-3.511985 L 125.95362,2.1436974 a 16.278,16.278 0 0 0 -16.24994,0.04689 z M 95.74464,211.51674 29.976783,173.88635 29.714025,82.825734 l 65.768857,37.630376 0.262761,91.06162 z m 9.95507,-107.77018 -65.766855,-37.629382 77.949835,-45.221114 65.76886,37.62938 -77.95084,45.221116 z"
|
|
67135
|
+
}
|
|
67136
|
+
),
|
|
67137
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
67138
|
+
"path",
|
|
67139
|
+
{
|
|
67140
|
+
fill: fill2,
|
|
67141
|
+
d: "M 221.207314 217.240532 L 214.827314 200.469532 L 160.504314 200.469532 L 154.124314 217.604532 C 151.632314 224.288532 149.506314 228.815532 147.744314 231.186532 C 145.981314 233.494532 143.095314 234.649532 139.085314 234.649532 C 135.682314 234.649532 132.674314 233.403532 130.061314 230.912532 C 127.448314 228.420532 126.142314 225.595532 126.142314 222.435532 C 126.142314 220.612532 126.446314 218.729532 127.053314 216.784532 C 127.661314 214.840532 128.664314 212.137532 130.061314 208.672532 L 164.241314 121.901532 C 165.213314 119.410532 166.368314 116.432532 167.704314 112.969532 C 169.102314 109.444532 170.560314 106.528532 172.079314 104.219532 C 173.659314 101.911532 175.695314 100.057532 178.186314 98.660532 C 180.738314 97.201532 183.868314 96.471532 187.574314 96.471532 C 191.342314 96.471532 194.471314 97.201532 196.962314 98.660532 C 199.514314 100.057532 201.550314 101.879532 203.069314 104.128532 C 204.649314 106.376532 205.955314 108.807532 206.988314 111.419532 C 208.082314 113.971532 209.449314 117.405532 211.090314 121.719532 L 245.999314 207.943532 C 248.733314 214.505532 250.100314 219.275532 250.100314 222.253532 C 250.100314 225.352532 248.794314 228.209532 246.181314 230.822532 C 243.629314 233.373532 240.530314 234.649532 236.884314 234.649532 C 234.758314 234.649532 232.935314 234.254532 231.416314 233.464532 C 229.896314 232.735532 228.620314 231.732532 227.587314 230.456532 C 226.554314 229.119532 225.430314 227.115532 224.215314 224.440532 C 223.060314 221.706532 222.058314 219.306532 221.207314 217.240532 Z M 167.613314 180.143532 L 207.535314 180.143532 L 187.392314 125.000532 Z"
|
|
67142
|
+
}
|
|
67143
|
+
)
|
|
67144
|
+
] });
|
|
67145
|
+
}
|
|
67146
|
+
function sectionBoxVisible({ height, width, fill: fill2, className }) {
|
|
67147
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { className, height, width, viewBox: "0 0 256 256", children: [
|
|
67148
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
67149
|
+
"path",
|
|
67150
|
+
{
|
|
67151
|
+
fill: fill2,
|
|
67152
|
+
d: "M 109.70368,2.190587 17.447731,55.710016 A 16.213,16.213 0 0 0 9.3632977,69.780402 L 9.6706253,176.28696 a 16.215,16.215 0 0 0 8.1654987,14.0235 l 95.269706,54.51732 c 1.35625,0.77609 3.04643,-0.20379 3.04192,-1.76478 L 115.79652,121.3395 221.23346,60.173007 c 1.35174,-0.783903 1.34611,-2.734895 -0.0101,-3.511985 L 125.95362,2.1436974 a 16.278,16.278 0 0 0 -16.24994,0.04689 z M 95.74464,211.51674 29.976783,173.88635 29.714025,82.825734 l 65.768857,37.630376 0.262761,91.06162 z m 9.95507,-107.77018 -65.766855,-37.629382 77.949835,-45.221114 65.76886,37.62938 -77.95084,45.221116 z"
|
|
67153
|
+
}
|
|
67154
|
+
),
|
|
67155
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
67156
|
+
"path",
|
|
67157
|
+
{
|
|
67158
|
+
fill: fill2,
|
|
67159
|
+
d: "m 186.05204,115.30607 c -37.93016,0 -68.67906,39.581 -68.67906,59.64313 0,21.35677 30.7489,59.64312 68.67906,59.64312 37.93016,0 68.67906,-38.28635 68.67906,-59.64312 0,-20.06213 -30.7489,-59.64313 -68.67906,-59.64313 z m 40.42729,85.41349 c -6.9441,6.83951 -21.43002,18.31368 -40.42729,18.31368 -18.99727,0 -33.48265,-11.47417 -40.42728,-18.31368 -11.61642,-11.4411 -15.37445,-22.30263 -15.37445,-25.77036 0,-0.0305 0.0381,-3.14164 3.35186,-9.36916 2.8652,-5.38603 7.15818,-11.06056 12.08697,-15.97917 3.66628,-3.65833 9.40099,-8.61065 16.72067,-12.50626 -6.58514,7.55977 -10.6973,18.2333 -10.6973,30.07505 0,22.91463 15.37445,41.49087 34.33953,41.49087 18.96508,0 34.33953,-18.57624 34.33953,-41.49087 0,-5.71277 -0.95614,-11.15521 -2.68492,-16.10818 -0.0445,9.9792 -6.75148,18.05306 -15.0214,18.05306 -8.26992,0 -15.02354,-8.12702 -15.02354,-18.15225 0,-8.97953 5.39774,-16.43168 12.48617,-17.88905 11.9346,3.73548 21.13062,11.40091 26.2676,16.52763 4.92879,4.91861 9.22177,10.59379 12.08697,15.97917 3.31377,6.22752 3.35186,9.33869 3.35186,9.36916 0,3.46773 -3.75803,14.32926 -15.37445,25.77036 z"
|
|
67160
|
+
}
|
|
67161
|
+
)
|
|
67162
|
+
] });
|
|
67163
|
+
}
|
|
67215
67164
|
function sectionBox({ height, width, fill: fill2, className }) {
|
|
67216
67165
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { className, height, width, viewBox: "0 0 256 256", children: [
|
|
67217
67166
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -67230,6 +67179,31 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
67230
67179
|
)
|
|
67231
67180
|
] });
|
|
67232
67181
|
}
|
|
67182
|
+
function sectionBoxDisable({ height, width, fill: fill2, className }) {
|
|
67183
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { className, height, width, viewBox: "0 0 256 256", children: [
|
|
67184
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
67185
|
+
"path",
|
|
67186
|
+
{
|
|
67187
|
+
fill: fill2,
|
|
67188
|
+
d: "M 109.70368,2.190587 17.447731,55.710016 A 16.213,16.213 0 0 0 9.3632977,69.780402 L 9.6706253,176.28696 a 16.215,16.215 0 0 0 8.1654987,14.0235 l 95.269706,54.51732 c 1.35625,0.77609 3.04643,-0.20379 3.04192,-1.76478 L 115.79652,121.3395 221.23346,60.173007 c 1.35174,-0.783903 1.34611,-2.734895 -0.0101,-3.511985 L 125.95362,2.1436974 a 16.278,16.278 0 0 0 -16.24994,0.04689 z M 95.74464,211.51674 29.976783,173.88635 29.714025,82.825734 l 65.768857,37.630376 0.262761,91.06162 z m 9.95507,-107.77018 -65.766855,-37.629382 77.949835,-45.221114 65.76886,37.62938 -77.95084,45.221116 z"
|
|
67189
|
+
}
|
|
67190
|
+
),
|
|
67191
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
67192
|
+
"path",
|
|
67193
|
+
{
|
|
67194
|
+
fill: fill2,
|
|
67195
|
+
d: "m 185.61601,192.28388 v -44.0883 c 0,-2.52838 -1.97182,-4.91709 -4.84542,-5.26996 -3.49833,-0.42965 -6.4956,1.9253 -6.4956,4.89027 v 44.08783 c 0,2.52885 1.97182,4.91756 4.84542,5.27043 3.49833,0.42965 6.4956,-1.92531 6.4956,-4.89027 z m 22.68149,0 v -44.0883 c 0,-2.52838 -1.97182,-4.91709 -4.84542,-5.26996 -3.49832,-0.42965 -6.49559,1.9253 -6.49559,4.89027 v 44.08783 c 0,2.52885 1.97182,4.91756 4.84542,5.27043 3.49832,0.42965 6.49559,-1.92531 6.49559,-4.89027 z m 38.18908,-71.6429 H 225.42553 V 105.9623 c 0,-2.80818 -2.61299,-5.08498 -5.83584,-5.08498 h -56.43703 c -3.22285,0 -5.83585,2.2768 -5.83585,5.08498 v 14.67868 h -21.23089 c -4.69044,0 -8.49236,3.31275 -8.49236,7.39969 v 0.0231 c 0,4.08694 3.80192,7.39969 8.49236,7.39969 h 110.40066 c 4.69044,0 8.49236,-3.31275 8.49236,-7.39969 v -0.0231 c 0,-4.08694 -3.80192,-7.39969 -8.49236,-7.39969 z m -35.23745,-6.4863 v 6.4863 h -39.75592 v -6.4863 a 1.0615448,0.92496161 0 0 1 1.06155,-0.92496 h 37.63282 a 1.0615448,0.92496161 0 0 1 1.06155,0.92496 z"
|
|
67196
|
+
}
|
|
67197
|
+
),
|
|
67198
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
67199
|
+
"path",
|
|
67200
|
+
{
|
|
67201
|
+
fill: fill2,
|
|
67202
|
+
d: "m 227.42894,215.76405 c 0,5.6549 -4.47215,10.23953 -9.98832,10.23953 h -49.76957 c -5.51617,0 -9.98832,-4.58463 -9.98832,-10.23953 v -69.72083 a 4.9863693,5.1117785 0 0 0 -4.98637,-5.11178 h -10.00391 a 4.9863693,5.1117785 0 0 0 -4.98637,5.11178 v 73.13422 c 0,15.08038 11.92553,27.30584 26.63594,27.30584 h 56.42825 c 14.71041,0 26.63594,-12.22546 26.63594,-27.30584 v -73.13422 a 4.9863693,5.1117785 0 0 0 -4.98637,-5.11178 h -10.0039 a 4.9863693,5.1117785 0 0 0 -4.98637,5.11178 v 69.72147 z"
|
|
67203
|
+
}
|
|
67204
|
+
)
|
|
67205
|
+
] });
|
|
67206
|
+
}
|
|
67233
67207
|
function sectionBoxClip({ height, width, fill: fill2, className }) {
|
|
67234
67208
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { className, height, width, viewBox: "0 0 256 256", children: [
|
|
67235
67209
|
/* @__PURE__ */ jsxRuntimeExports.jsx("path", { fill: "none", d: "M0 0h256v256H0z" }),
|
|
@@ -67311,6 +67285,24 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
67311
67285
|
) })
|
|
67312
67286
|
] });
|
|
67313
67287
|
}
|
|
67288
|
+
function sectionBoxShrink2({ height, width, fill: fill2, className }) {
|
|
67289
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { className, height, width, viewBox: "0 0 256 256", children: [
|
|
67290
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
67291
|
+
"path",
|
|
67292
|
+
{
|
|
67293
|
+
fill: fill2,
|
|
67294
|
+
d: "M 109.70368,2.190587 17.447731,55.710016 A 16.213,16.213 0 0 0 9.3632977,69.780402 L 9.6706253,176.28696 a 16.215,16.215 0 0 0 8.1654987,14.0235 l 95.269706,54.51732 c 1.35625,0.77609 3.04643,-0.20379 3.04192,-1.76478 L 115.79652,121.3395 221.23346,60.173007 c 1.35174,-0.783903 1.34611,-2.734895 -0.0101,-3.511985 L 125.95362,2.1436974 a 16.278,16.278 0 0 0 -16.24994,0.04689 z M 95.74464,211.51674 29.976783,173.88635 29.714025,82.825734 l 65.768857,37.630376 0.262761,91.06162 z m 9.95507,-107.77018 -65.766855,-37.629382 77.949835,-45.221114 65.76886,37.62938 -77.95084,45.221116 z"
|
|
67295
|
+
}
|
|
67296
|
+
),
|
|
67297
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
67298
|
+
"path",
|
|
67299
|
+
{
|
|
67300
|
+
fill: fill2,
|
|
67301
|
+
d: "m 223.41166,231.92815 -50.05,-51.82677 -21.39562,22.15515 -21.52251,-81.36695 78.57748,22.28655 -21.39561,22.15516 50.05002,51.82676 z"
|
|
67302
|
+
}
|
|
67303
|
+
)
|
|
67304
|
+
] });
|
|
67305
|
+
}
|
|
67314
67306
|
function ghost({ height, width, fill: fill2, className }) {
|
|
67315
67307
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { className, width: height, height: width, viewBox: "0 0 20 20", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("g", { "data-name": "ICONS", children: [
|
|
67316
67308
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -67370,11 +67362,17 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
67370
67362
|
pan,
|
|
67371
67363
|
perspective,
|
|
67372
67364
|
sectionBox,
|
|
67365
|
+
sectionBoxAuto,
|
|
67373
67366
|
sectionBoxClip,
|
|
67367
|
+
sectionBoxDisable,
|
|
67374
67368
|
sectionBoxIgnore,
|
|
67375
67369
|
sectionBoxReset,
|
|
67370
|
+
sectionBoxSettings,
|
|
67376
67371
|
sectionBoxShrink,
|
|
67372
|
+
sectionBoxShrink2,
|
|
67373
|
+
sectionBoxVisible,
|
|
67377
67374
|
settings,
|
|
67375
|
+
slidersHoriz,
|
|
67378
67376
|
toggleIsolation,
|
|
67379
67377
|
trash,
|
|
67380
67378
|
treeView,
|
|
@@ -67394,9 +67392,6 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
67394
67392
|
function anyUiCursorButton(settings2) {
|
|
67395
67393
|
return isTrue(settings2.ui.orbit) || isTrue(settings2.ui.lookAround) || isTrue(settings2.ui.pan) || isTrue(settings2.ui.zoom) || isTrue(settings2.ui.zoomWindow) || isTrue(settings2.ui.zoomToFit);
|
|
67396
67394
|
}
|
|
67397
|
-
function anyUiToolButton(settings2) {
|
|
67398
|
-
return isTrue(settings2.ui.sectioningMode) || isTrue(settings2.ui.measuringMode) || isTrue(settings2.ui.toggleIsolation);
|
|
67399
|
-
}
|
|
67400
67395
|
function anyUiSettingButton(settings2) {
|
|
67401
67396
|
return isTrue(settings2.ui.projectInspector) || isTrue(settings2.ui.settings) || isTrue(settings2.ui.help) || isTrue(settings2.ui.maximise);
|
|
67402
67397
|
}
|
|
@@ -67528,7 +67523,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
67528
67523
|
}
|
|
67529
67524
|
);
|
|
67530
67525
|
const hidden2 = isTrue(props.settings.value.ui.axesPanel) ? "" : " vc-hidden";
|
|
67531
|
-
const
|
|
67526
|
+
const createBar = () => {
|
|
67532
67527
|
if (!anyUiAxesButton(props.settings.value)) {
|
|
67533
67528
|
return (
|
|
67534
67529
|
// Keeps layout when all buttons are disabled.
|
|
@@ -67550,7 +67545,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
67550
67545
|
className: "vim-axes-panel vc-pointer-events-none vc-absolute vc-overflow-hidden vc-z-20 vc-flex vc-flex-col vc-border vc-border-white vc-opacity-50 vc-shadow-lg vc-saturate-0 vc-transition-all hover:vc-opacity-100 hover:vc-saturate-100" + hidden2,
|
|
67551
67546
|
children: [
|
|
67552
67547
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: gizmoDiv, className: "vim-axes-panel-gizmo vc-absolute vc-pointer-events-auto" }),
|
|
67553
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vim-axes-panel-bar vc-absolute vc-top-[75%] vc-bottom-0 vc-right-0 vc-left-0", children:
|
|
67548
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vim-axes-panel-bar vc-absolute vc-top-[75%] vc-bottom-0 vc-right-0 vc-left-0", children: createBar() })
|
|
67554
67549
|
]
|
|
67555
67550
|
}
|
|
67556
67551
|
);
|
|
@@ -67559,22 +67554,96 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
67559
67554
|
function buttonDefaultStyle(on) {
|
|
67560
67555
|
return on ? btnStyle + " vc-text-primary" : btnStyle + " vc-text-gray-medium";
|
|
67561
67556
|
}
|
|
67557
|
+
function buttonExpandStyle(on) {
|
|
67558
|
+
return on ? btnStyle + " vc-text-white vc-bg-primary" : btnStyle + " vc-text-gray-medium";
|
|
67559
|
+
}
|
|
67560
|
+
function buttonDisableStyle(on) {
|
|
67561
|
+
return on ? btnStyle + " vc-text-gray-medium" : btnStyle + " vc-text-gray vc-pointer-events-none";
|
|
67562
|
+
}
|
|
67562
67563
|
function buttonBlueStyle(on) {
|
|
67563
67564
|
return btnStyle + " vc-text-white";
|
|
67564
67565
|
}
|
|
67565
67566
|
function createButton(button) {
|
|
67566
67567
|
var _a2;
|
|
67567
67568
|
if (button.enabled !== void 0 && !button.enabled()) return null;
|
|
67568
|
-
const style = button.style((_a2 = button.isOn) == null ? void 0 : _a2.call(button));
|
|
67569
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("button", { "data-tip": button.tip, onClick: button.action, className: style, type: "button", children: button.icon({ height: "20", width: "20", fill: "currentColor", className: "vc-max-h-[80%]" }) }, button.id);
|
|
67569
|
+
const style = (button.style ?? buttonDefaultStyle)((_a2 = button.isOn) == null ? void 0 : _a2.call(button));
|
|
67570
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("button", { id: button.id, "data-tip": button.tip, onClick: button.action, className: style, type: "button", children: button.icon({ height: "20", width: "20", fill: "currentColor", className: "vc-max-h-[80%]" }) }, button.id);
|
|
67570
67571
|
}
|
|
67571
|
-
const sectionStyle = "vc-flex vc-items-center vc-rounded-full vc-mb-2 vc-
|
|
67572
|
+
const sectionStyle = "vc-flex vc-items-center vc-rounded-full vc-mb-2 vc-shadow-md";
|
|
67572
67573
|
const sectionDefaultStyle = sectionStyle + " vc-bg-white";
|
|
67573
67574
|
const sectionBlueStyle = sectionStyle + " vc-bg-primary";
|
|
67575
|
+
const sectionNoPadStyle = sectionStyle.replace("vc-px-2", "") + " vc-bg-white";
|
|
67574
67576
|
function createSection$1(section) {
|
|
67575
67577
|
if (section.enable !== void 0 && !section.enable()) return null;
|
|
67576
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `vim-control-bar-section ${section.style}`, children: section.buttons.map((b) => createButton(b)) }, section.id);
|
|
67578
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `vim-control-bar-section ${section.style ?? sectionDefaultStyle}`, children: section.buttons.map((b) => createButton(b)) }, section.id);
|
|
67577
67579
|
}
|
|
67580
|
+
const elementIds = {
|
|
67581
|
+
// Sections
|
|
67582
|
+
sectionCamera: "controlBar.sectionCamera",
|
|
67583
|
+
sectionActions: "controlBar.sectionActions",
|
|
67584
|
+
sectionTools: "controlBar.sectionTools",
|
|
67585
|
+
sectionSettings: "controlBar.sectionSettings",
|
|
67586
|
+
sectionMeasure: "controlBar.sectionMeasure",
|
|
67587
|
+
sectionSectionBox: "controlBar.sectionSectionBox",
|
|
67588
|
+
// Camera buttons
|
|
67589
|
+
buttonCameraOrbit: "controlBar.camera.orbit",
|
|
67590
|
+
buttonCameraLook: "controlBarcamera.look",
|
|
67591
|
+
buttonCameraPan: "controlBar.camera.pan",
|
|
67592
|
+
buttonCameraZoom: "controlBar.camera.zoom",
|
|
67593
|
+
buttonCameraZoomWindow: "controlBar.camera.zoomWindow",
|
|
67594
|
+
// Settings buttons
|
|
67595
|
+
buttonProjectInspector: "controlBar.projectInspector",
|
|
67596
|
+
buttonSettings: "controlBar.settings",
|
|
67597
|
+
buttonHelp: "controlBar.help",
|
|
67598
|
+
buttonMaximize: "controlBar.maximize",
|
|
67599
|
+
// Action Buttons
|
|
67600
|
+
buttonToggleIsolation: "controlBar.action.toggleIsolation",
|
|
67601
|
+
buttonZoomToFit: "controlBar.action.zoomToFit",
|
|
67602
|
+
// Tools buttons
|
|
67603
|
+
buttonSectionBox: "controlBar.sectionBox",
|
|
67604
|
+
buttonMeasure: "controlBar.measure",
|
|
67605
|
+
// Section box buttons
|
|
67606
|
+
buttonSectionBoxEnable: "controlBar.sectionBox.enable",
|
|
67607
|
+
buttonSectionBoxVisible: "controlBar.sectionBox.visible",
|
|
67608
|
+
buttonSectionBoxShrinkToSelection: "controlBar.sectionBox.shrinkToSelection",
|
|
67609
|
+
buttonSectionBoxAuto: "controlBar.sectionBox.auto",
|
|
67610
|
+
buttonSectionBoxClip: "controlBar.sectionBox.clip",
|
|
67611
|
+
buttonSectionBoxSettings: "controlBar.sectionBox.settings"
|
|
67612
|
+
};
|
|
67613
|
+
function ControlBar(props) {
|
|
67614
|
+
React2.useEffect(() => {
|
|
67615
|
+
ReactTooltip.rebuild();
|
|
67616
|
+
});
|
|
67617
|
+
if (!props.show) {
|
|
67618
|
+
return null;
|
|
67619
|
+
}
|
|
67620
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
67621
|
+
"div",
|
|
67622
|
+
{
|
|
67623
|
+
style: {
|
|
67624
|
+
gap: "min(10px, 2%)",
|
|
67625
|
+
bottom: "min(36px, 10%)"
|
|
67626
|
+
},
|
|
67627
|
+
id: "vim-control-bar",
|
|
67628
|
+
className: "vim-control-bar vc-pointer-events-auto vc-flex-wrap vc-mx-2 vc-min-w-0 vc-absolute vc-left-0 vc-right-0 vc-z-20 vc-flex vc-items-center vc-justify-center transition-all",
|
|
67629
|
+
children: props.content.map(createSection$1)
|
|
67630
|
+
}
|
|
67631
|
+
);
|
|
67632
|
+
}
|
|
67633
|
+
const controlBar = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
67634
|
+
__proto__: null,
|
|
67635
|
+
ControlBar,
|
|
67636
|
+
buttonBlueStyle,
|
|
67637
|
+
buttonDefaultStyle,
|
|
67638
|
+
buttonDisableStyle,
|
|
67639
|
+
buttonExpandStyle,
|
|
67640
|
+
createButton,
|
|
67641
|
+
createSection: createSection$1,
|
|
67642
|
+
elementIds,
|
|
67643
|
+
sectionBlueStyle,
|
|
67644
|
+
sectionDefaultStyle,
|
|
67645
|
+
sectionNoPadStyle
|
|
67646
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
67578
67647
|
function getPointerState(viewer) {
|
|
67579
67648
|
const [mode, setMode] = React2.useState(viewer.inputs.pointerActive);
|
|
67580
67649
|
React2.useEffect(() => {
|
|
@@ -67636,52 +67705,6 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
67636
67705
|
}
|
|
67637
67706
|
};
|
|
67638
67707
|
}
|
|
67639
|
-
function getSectionBoxState(viewer) {
|
|
67640
|
-
const sectionGizmo = viewer.gizmos.section;
|
|
67641
|
-
const first = React2.useRef(true);
|
|
67642
|
-
const [section, setSection] = React2.useState({
|
|
67643
|
-
clip: sectionGizmo.clip,
|
|
67644
|
-
active: sectionGizmo.visible && sectionGizmo.interactive
|
|
67645
|
-
});
|
|
67646
|
-
React2.useEffect(() => {
|
|
67647
|
-
const subSection = sectionGizmo.onStateChanged.subscribe(
|
|
67648
|
-
() => setSection({
|
|
67649
|
-
clip: sectionGizmo.clip,
|
|
67650
|
-
active: sectionGizmo.visible && sectionGizmo.interactive
|
|
67651
|
-
})
|
|
67652
|
-
);
|
|
67653
|
-
return () => subSection();
|
|
67654
|
-
}, []);
|
|
67655
|
-
const toggle = () => {
|
|
67656
|
-
ReactTooltip.hide();
|
|
67657
|
-
if (viewer.inputs.pointerActive === "rect") {
|
|
67658
|
-
viewer.inputs.pointerActive = viewer.inputs.pointerFallback;
|
|
67659
|
-
}
|
|
67660
|
-
const next = !(sectionGizmo.visible && sectionGizmo.interactive);
|
|
67661
|
-
sectionGizmo.interactive = next;
|
|
67662
|
-
sectionGizmo.visible = next;
|
|
67663
|
-
if (next && first.current) {
|
|
67664
|
-
sectionGizmo.clip = true;
|
|
67665
|
-
sectionGizmo.fitBox(viewer.renderer.getBoundingBox());
|
|
67666
|
-
first.current = false;
|
|
67667
|
-
}
|
|
67668
|
-
};
|
|
67669
|
-
return {
|
|
67670
|
-
clip: section.clip,
|
|
67671
|
-
active: section.active,
|
|
67672
|
-
set: setSection,
|
|
67673
|
-
toggle,
|
|
67674
|
-
hide: () => {
|
|
67675
|
-
sectionGizmo.visible = false;
|
|
67676
|
-
sectionGizmo.interactive = false;
|
|
67677
|
-
},
|
|
67678
|
-
reset: () => sectionGizmo.fitBox(viewer.renderer.getBoundingBox()),
|
|
67679
|
-
shrinkToSelection: () => sectionGizmo.fitBox(viewer.selection.getBoundingBox()),
|
|
67680
|
-
toggleClip: () => {
|
|
67681
|
-
sectionGizmo.clip = !section.clip;
|
|
67682
|
-
}
|
|
67683
|
-
};
|
|
67684
|
-
}
|
|
67685
67708
|
function pointerToCursor(pointer) {
|
|
67686
67709
|
switch (pointer) {
|
|
67687
67710
|
case "orbit":
|
|
@@ -67733,13 +67756,13 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
67733
67756
|
const sub2 = this._viewer.inputs.onPointerOverrideChanged.subscribe(
|
|
67734
67757
|
() => this._updateCursor()
|
|
67735
67758
|
);
|
|
67736
|
-
const sub3 = this._viewer.gizmos.
|
|
67737
|
-
if (!this._viewer.gizmos.
|
|
67759
|
+
const sub3 = this._viewer.gizmos.sectionBox.onStateChanged.subscribe(() => {
|
|
67760
|
+
if (!this._viewer.gizmos.sectionBox.visible) {
|
|
67738
67761
|
this._boxHover = false;
|
|
67739
67762
|
this._updateCursor();
|
|
67740
67763
|
}
|
|
67741
67764
|
});
|
|
67742
|
-
const sub4 = this._viewer.gizmos.
|
|
67765
|
+
const sub4 = this._viewer.gizmos.sectionBox.onHover.subscribe((hover) => {
|
|
67743
67766
|
this._boxHover = hover;
|
|
67744
67767
|
this._updateCursor();
|
|
67745
67768
|
});
|
|
@@ -67802,59 +67825,77 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
67802
67825
|
clear
|
|
67803
67826
|
};
|
|
67804
67827
|
}
|
|
67805
|
-
|
|
67806
|
-
|
|
67807
|
-
|
|
67808
|
-
|
|
67809
|
-
|
|
67810
|
-
|
|
67811
|
-
|
|
67812
|
-
|
|
67813
|
-
|
|
67814
|
-
|
|
67815
|
-
|
|
67816
|
-
|
|
67817
|
-
|
|
67818
|
-
|
|
67819
|
-
|
|
67820
|
-
|
|
67821
|
-
|
|
67822
|
-
|
|
67823
|
-
|
|
67824
|
-
|
|
67825
|
-
|
|
67826
|
-
|
|
67827
|
-
|
|
67828
|
-
|
|
67829
|
-
|
|
67830
|
-
|
|
67831
|
-
|
|
67832
|
-
|
|
67833
|
-
|
|
67834
|
-
|
|
67835
|
-
|
|
67836
|
-
|
|
67837
|
-
|
|
67838
|
-
|
|
67839
|
-
|
|
67840
|
-
|
|
67841
|
-
|
|
67842
|
-
|
|
67843
|
-
|
|
67844
|
-
|
|
67845
|
-
|
|
67846
|
-
|
|
67847
|
-
|
|
67848
|
-
|
|
67849
|
-
|
|
67850
|
-
|
|
67828
|
+
function controlBarSectionBox(section, hasSelection) {
|
|
67829
|
+
return {
|
|
67830
|
+
id: elementIds.sectionSectionBox,
|
|
67831
|
+
style: section.enable.get() ? sectionNoPadStyle : sectionDefaultStyle,
|
|
67832
|
+
//enable: () => section.getEnable(),
|
|
67833
|
+
buttons: [
|
|
67834
|
+
{
|
|
67835
|
+
id: elementIds.buttonSectionBoxEnable,
|
|
67836
|
+
tip: "Enable Section Box",
|
|
67837
|
+
isOn: () => section.enable.get(),
|
|
67838
|
+
style: (on) => buttonExpandStyle(on),
|
|
67839
|
+
action: () => section.enable.set(!section.enable.get()),
|
|
67840
|
+
icon: sectionBox
|
|
67841
|
+
},
|
|
67842
|
+
{
|
|
67843
|
+
id: elementIds.buttonSectionBoxShrinkToSelection,
|
|
67844
|
+
tip: "Fit Section",
|
|
67845
|
+
enabled: () => section.enable.get(),
|
|
67846
|
+
isOn: () => hasSelection,
|
|
67847
|
+
style: (on) => buttonDisableStyle(on),
|
|
67848
|
+
action: () => section.sectionSelection(),
|
|
67849
|
+
icon: sectionBoxShrink
|
|
67850
|
+
},
|
|
67851
|
+
{
|
|
67852
|
+
id: elementIds.buttonSectionBoxClip,
|
|
67853
|
+
tip: "Reset Section",
|
|
67854
|
+
enabled: () => section.enable.get(),
|
|
67855
|
+
style: (on) => buttonDefaultStyle(on),
|
|
67856
|
+
action: () => section.sectionReset(),
|
|
67857
|
+
icon: sectionBoxReset
|
|
67858
|
+
},
|
|
67859
|
+
{
|
|
67860
|
+
id: elementIds.buttonSectionBoxVisible,
|
|
67861
|
+
tip: "Show Section Box",
|
|
67862
|
+
enabled: () => section.enable.get(),
|
|
67863
|
+
isOn: () => section.visible.get(),
|
|
67864
|
+
style: (on) => buttonDefaultStyle(on),
|
|
67865
|
+
action: () => section.visible.set(!section.visible.get()),
|
|
67866
|
+
icon: visible
|
|
67867
|
+
},
|
|
67868
|
+
{
|
|
67869
|
+
id: elementIds.buttonSectionBoxAuto,
|
|
67870
|
+
tip: "Auto Section",
|
|
67871
|
+
enabled: () => section.enable.get(),
|
|
67872
|
+
isOn: () => section.auto.get(),
|
|
67873
|
+
style: (on) => buttonDefaultStyle(on),
|
|
67874
|
+
action: () => section.auto.set(!section.auto.get()),
|
|
67875
|
+
icon: sectionBoxAuto
|
|
67876
|
+
},
|
|
67877
|
+
{
|
|
67878
|
+
id: elementIds.buttonSectionBoxSettings,
|
|
67879
|
+
tip: "Section Settings",
|
|
67880
|
+
enabled: () => section.enable.get(),
|
|
67881
|
+
isOn: () => section.showOffsetPanel.get(),
|
|
67882
|
+
style: (on) => buttonDefaultStyle(on),
|
|
67883
|
+
action: () => section.showOffsetPanel.set(!section.showOffsetPanel.get()),
|
|
67884
|
+
icon: slidersHoriz
|
|
67885
|
+
}
|
|
67886
|
+
]
|
|
67887
|
+
};
|
|
67888
|
+
}
|
|
67889
|
+
function controlBarPointer(viewer, camera2, settings2, section) {
|
|
67890
|
+
const pointer = getPointerState(viewer);
|
|
67891
|
+
return {
|
|
67851
67892
|
id: elementIds.sectionCamera,
|
|
67852
|
-
enable: () => anyUiCursorButton(
|
|
67893
|
+
enable: () => anyUiCursorButton(settings2),
|
|
67853
67894
|
style: sectionDefaultStyle,
|
|
67854
67895
|
buttons: [
|
|
67855
67896
|
{
|
|
67856
67897
|
id: elementIds.buttonCameraOrbit,
|
|
67857
|
-
enabled: () => isTrue(
|
|
67898
|
+
enabled: () => isTrue(settings2.ui.orbit),
|
|
67858
67899
|
tip: "Orbit",
|
|
67859
67900
|
action: () => pointer.onButton("orbit"),
|
|
67860
67901
|
icon: orbit,
|
|
@@ -67863,7 +67904,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
67863
67904
|
},
|
|
67864
67905
|
{
|
|
67865
67906
|
id: elementIds.buttonCameraLook,
|
|
67866
|
-
enabled: () => isTrue(
|
|
67907
|
+
enabled: () => isTrue(settings2.ui.lookAround),
|
|
67867
67908
|
tip: "Look Around",
|
|
67868
67909
|
action: () => pointer.onButton("look"),
|
|
67869
67910
|
icon: look,
|
|
@@ -67872,7 +67913,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
67872
67913
|
},
|
|
67873
67914
|
{
|
|
67874
67915
|
id: elementIds.buttonCameraPan,
|
|
67875
|
-
enabled: () => isTrue(
|
|
67916
|
+
enabled: () => isTrue(settings2.ui.pan),
|
|
67876
67917
|
tip: "Pan",
|
|
67877
67918
|
action: () => pointer.onButton("pan"),
|
|
67878
67919
|
icon: pan,
|
|
@@ -67881,7 +67922,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
67881
67922
|
},
|
|
67882
67923
|
{
|
|
67883
67924
|
id: elementIds.buttonCameraZoom,
|
|
67884
|
-
enabled: () => isTrue(
|
|
67925
|
+
enabled: () => isTrue(settings2.ui.zoom),
|
|
67885
67926
|
tip: "Zoom",
|
|
67886
67927
|
action: () => pointer.onButton("zoom"),
|
|
67887
67928
|
icon: zoom,
|
|
@@ -67890,59 +67931,87 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
67890
67931
|
},
|
|
67891
67932
|
{
|
|
67892
67933
|
id: elementIds.buttonCameraZoomWindow,
|
|
67893
|
-
enabled: () => isTrue(
|
|
67934
|
+
enabled: () => isTrue(settings2.ui.zoomWindow),
|
|
67894
67935
|
tip: "Zoom Window",
|
|
67895
67936
|
action: () => {
|
|
67896
67937
|
pointer.onButton("rect");
|
|
67897
|
-
section.hide();
|
|
67898
67938
|
},
|
|
67899
67939
|
icon: frameRect,
|
|
67900
67940
|
isOn: () => pointer.mode === "rect",
|
|
67901
67941
|
style: buttonDefaultStyle
|
|
67902
|
-
}
|
|
67942
|
+
}
|
|
67943
|
+
]
|
|
67944
|
+
};
|
|
67945
|
+
}
|
|
67946
|
+
function controlBarActions(camera2, settings2, isolation, measure$1) {
|
|
67947
|
+
return {
|
|
67948
|
+
id: elementIds.sectionActions,
|
|
67949
|
+
enable: () => true,
|
|
67950
|
+
style: sectionDefaultStyle,
|
|
67951
|
+
buttons: [
|
|
67903
67952
|
{
|
|
67904
|
-
id: elementIds.
|
|
67905
|
-
enabled: () => isTrue(
|
|
67953
|
+
id: elementIds.buttonZoomToFit,
|
|
67954
|
+
enabled: () => isTrue(settings2.ui.zoomToFit),
|
|
67906
67955
|
tip: "Zoom to Fit",
|
|
67907
|
-
action: () =>
|
|
67956
|
+
action: () => camera2.frameContext(),
|
|
67908
67957
|
icon: frameSelection,
|
|
67909
67958
|
isOn: () => false,
|
|
67910
67959
|
style: buttonDefaultStyle
|
|
67960
|
+
},
|
|
67961
|
+
{
|
|
67962
|
+
id: elementIds.buttonToggleIsolation,
|
|
67963
|
+
enabled: () => isTrue(settings2.ui.toggleIsolation),
|
|
67964
|
+
tip: "Toggle Isolation",
|
|
67965
|
+
action: () => isolation.toggle("controlBar"),
|
|
67966
|
+
icon: toggleIsolation,
|
|
67967
|
+
style: buttonDefaultStyle
|
|
67968
|
+
},
|
|
67969
|
+
{
|
|
67970
|
+
id: elementIds.buttonMeasure,
|
|
67971
|
+
enabled: () => isTrue(settings2.ui.measuringMode),
|
|
67972
|
+
isOn: () => measure$1.active,
|
|
67973
|
+
tip: "Measuring Mode",
|
|
67974
|
+
action: () => measure$1.toggle(),
|
|
67975
|
+
icon: measure,
|
|
67976
|
+
style: buttonDefaultStyle
|
|
67911
67977
|
}
|
|
67912
67978
|
]
|
|
67913
67979
|
};
|
|
67914
|
-
|
|
67980
|
+
}
|
|
67981
|
+
function controlBarSettings(modal, side, settings$1) {
|
|
67982
|
+
const fullScreen = getFullScreenState();
|
|
67983
|
+
return {
|
|
67915
67984
|
id: elementIds.sectionSettings,
|
|
67916
|
-
enable: () => anyUiSettingButton(
|
|
67985
|
+
enable: () => anyUiSettingButton(settings$1),
|
|
67917
67986
|
style: sectionDefaultStyle,
|
|
67918
67987
|
buttons: [
|
|
67919
67988
|
{
|
|
67920
67989
|
id: elementIds.buttonProjectInspector,
|
|
67921
|
-
enabled: () => isTrue(
|
|
67990
|
+
enabled: () => isTrue(settings$1.ui.projectInspector) && (isTrue(settings$1.ui.bimTreePanel) || isTrue(settings$1.ui.bimInfoPanel)),
|
|
67922
67991
|
tip: "Project Inspector",
|
|
67923
|
-
action: () =>
|
|
67992
|
+
action: () => side.toggleContent("bim"),
|
|
67924
67993
|
icon: treeView,
|
|
67925
67994
|
style: buttonDefaultStyle
|
|
67926
67995
|
},
|
|
67927
67996
|
{
|
|
67928
67997
|
id: elementIds.buttonSettings,
|
|
67929
|
-
enabled: () => isTrue(
|
|
67998
|
+
enabled: () => isTrue(settings$1.ui.settings),
|
|
67930
67999
|
tip: "Settings",
|
|
67931
|
-
action: () =>
|
|
68000
|
+
action: () => side.toggleContent("settings"),
|
|
67932
68001
|
icon: settings,
|
|
67933
68002
|
style: buttonDefaultStyle
|
|
67934
68003
|
},
|
|
67935
68004
|
{
|
|
67936
68005
|
id: elementIds.buttonHelp,
|
|
67937
|
-
enabled: () => isTrue(
|
|
68006
|
+
enabled: () => isTrue(settings$1.ui.help),
|
|
67938
68007
|
tip: "Help",
|
|
67939
|
-
action: () =>
|
|
68008
|
+
action: () => modal.help(true),
|
|
67940
68009
|
icon: help,
|
|
67941
68010
|
style: buttonDefaultStyle
|
|
67942
68011
|
},
|
|
67943
68012
|
{
|
|
67944
68013
|
id: elementIds.buttonMaximize,
|
|
67945
|
-
enabled: () => isTrue(
|
|
68014
|
+
enabled: () => isTrue(settings$1.ui.maximise) && settings$1.capacity.canGoFullScreen,
|
|
67946
68015
|
tip: fullScreen.get() ? "Minimize" : "Fullscreen",
|
|
67947
68016
|
action: () => fullScreen.toggle(),
|
|
67948
68017
|
icon: fullScreen.get() ? minimize : fullsScreen,
|
|
@@ -67950,112 +68019,23 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
67950
68019
|
}
|
|
67951
68020
|
]
|
|
67952
68021
|
};
|
|
67953
|
-
const sectionBoxSection = {
|
|
67954
|
-
id: elementIds.sectionSectionBox,
|
|
67955
|
-
enable: () => !measure$1.active && section.active,
|
|
67956
|
-
style: sectionBlueStyle,
|
|
67957
|
-
buttons: [
|
|
67958
|
-
{
|
|
67959
|
-
id: elementIds.buttonSectionBoxReset,
|
|
67960
|
-
tip: "Reset Section Box",
|
|
67961
|
-
action: () => section.reset(),
|
|
67962
|
-
icon: sectionBoxReset,
|
|
67963
|
-
style: buttonBlueStyle
|
|
67964
|
-
},
|
|
67965
|
-
{
|
|
67966
|
-
id: elementIds.buttonSectionBoxShrinkToSelection,
|
|
67967
|
-
tip: "Shrink to Selection",
|
|
67968
|
-
action: () => section.shrinkToSelection(),
|
|
67969
|
-
icon: sectionBoxShrink,
|
|
67970
|
-
style: buttonBlueStyle
|
|
67971
|
-
},
|
|
67972
|
-
{
|
|
67973
|
-
id: elementIds.buttonSectionBoxClip,
|
|
67974
|
-
tip: section.clip ? "Ignore Section Box" : "Clip Section Box",
|
|
67975
|
-
action: () => section.toggleClip(),
|
|
67976
|
-
icon: section.clip ? sectionBoxIgnore : sectionBoxClip,
|
|
67977
|
-
style: buttonBlueStyle
|
|
67978
|
-
},
|
|
67979
|
-
{
|
|
67980
|
-
id: elementIds.buttonSectionBoxDone,
|
|
67981
|
-
tip: "Done",
|
|
67982
|
-
action: () => section.toggle(),
|
|
67983
|
-
icon: checkmark,
|
|
67984
|
-
style: buttonBlueStyle
|
|
67985
|
-
}
|
|
67986
|
-
]
|
|
67987
|
-
};
|
|
67988
|
-
const measureSection = {
|
|
67989
|
-
id: elementIds.sectionMeasure,
|
|
67990
|
-
enable: () => measure$1.active && !section.active,
|
|
67991
|
-
style: sectionBlueStyle,
|
|
67992
|
-
buttons: [
|
|
67993
|
-
{
|
|
67994
|
-
id: elementIds.buttonMeasureDelete,
|
|
67995
|
-
tip: "Delete",
|
|
67996
|
-
action: () => measure$1.clear(),
|
|
67997
|
-
icon: trash,
|
|
67998
|
-
style: buttonBlueStyle
|
|
67999
|
-
},
|
|
68000
|
-
{
|
|
68001
|
-
id: elementIds.buttonMeasureDone,
|
|
68002
|
-
tip: "Done",
|
|
68003
|
-
action: () => measure$1.toggle(),
|
|
68004
|
-
icon: checkmark,
|
|
68005
|
-
style: buttonBlueStyle
|
|
68006
|
-
}
|
|
68007
|
-
]
|
|
68008
|
-
};
|
|
68009
|
-
const toolSections = {
|
|
68010
|
-
id: elementIds.sectionTools,
|
|
68011
|
-
enable: () => anyUiToolButton(props.settings) && !measure$1.active && !section.active,
|
|
68012
|
-
style: measure$1.active || section.active ? sectionBlueStyle : sectionDefaultStyle,
|
|
68013
|
-
buttons: [
|
|
68014
|
-
{
|
|
68015
|
-
id: elementIds.buttonSectionBox,
|
|
68016
|
-
enabled: () => isTrue(props.settings.ui.sectioningMode),
|
|
68017
|
-
tip: "Sectioning Mode",
|
|
68018
|
-
action: () => section.toggle(),
|
|
68019
|
-
icon: sectionBox,
|
|
68020
|
-
style: buttonDefaultStyle
|
|
68021
|
-
},
|
|
68022
|
-
{
|
|
68023
|
-
id: elementIds.buttonMeasure,
|
|
68024
|
-
enabled: () => isTrue(props.settings.ui.measuringMode),
|
|
68025
|
-
tip: "Measuring Mode",
|
|
68026
|
-
action: () => measure$1.toggle(),
|
|
68027
|
-
icon: measure,
|
|
68028
|
-
style: buttonDefaultStyle
|
|
68029
|
-
},
|
|
68030
|
-
{
|
|
68031
|
-
id: elementIds.buttonToggleIsolation,
|
|
68032
|
-
enabled: () => isTrue(props.settings.ui.toggleIsolation),
|
|
68033
|
-
tip: "Toggle Isolation",
|
|
68034
|
-
action: () => props.isolation.toggle("controlBar"),
|
|
68035
|
-
icon: toggleIsolation,
|
|
68036
|
-
style: buttonDefaultStyle
|
|
68037
|
-
}
|
|
68038
|
-
]
|
|
68039
|
-
};
|
|
68040
|
-
let controlBar2 = [cameraSection, toolSections, measureSection, sectionBoxSection, settingsSection];
|
|
68041
|
-
controlBar2 = ((_a2 = props.customization) == null ? void 0 : _a2.call(props, controlBar2)) ?? controlBar2;
|
|
68042
|
-
return createBar(controlBar2);
|
|
68043
68022
|
}
|
|
68044
|
-
function
|
|
68045
|
-
|
|
68046
|
-
|
|
68047
|
-
|
|
68048
|
-
|
|
68023
|
+
function useControlBar(viewer, camera2, modal, side, isolation, cursor, settings2, section, customization) {
|
|
68024
|
+
const measure2 = getMeasureState(viewer, cursor);
|
|
68025
|
+
const pointerSection = controlBarPointer(viewer, camera2, settings2);
|
|
68026
|
+
const actionSection = controlBarActions(camera2, settings2, isolation, measure2);
|
|
68027
|
+
const sectionBoxSection = controlBarSectionBox(section, viewer.selection.count > 0);
|
|
68028
|
+
const settingsSection = controlBarSettings(modal, side, settings2);
|
|
68029
|
+
let controlBarSections = [
|
|
68030
|
+
pointerSection,
|
|
68031
|
+
actionSection,
|
|
68032
|
+
sectionBoxSection,
|
|
68033
|
+
// Optional section
|
|
68034
|
+
settingsSection
|
|
68035
|
+
];
|
|
68036
|
+
controlBarSections = (customization == null ? void 0 : customization(controlBarSections)) ?? controlBarSections;
|
|
68037
|
+
return controlBarSections;
|
|
68049
68038
|
}
|
|
68050
|
-
const controlBar = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
68051
|
-
__proto__: null,
|
|
68052
|
-
ControlBar,
|
|
68053
|
-
buttonBlueStyle,
|
|
68054
|
-
buttonDefaultStyle,
|
|
68055
|
-
elementIds,
|
|
68056
|
-
sectionBlueStyle,
|
|
68057
|
-
sectionDefaultStyle
|
|
68058
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
68059
68039
|
function RestOfScreen(props) {
|
|
68060
68040
|
const [, setVersion] = React2.useState(0);
|
|
68061
68041
|
const resizeObserver = React2.useRef();
|
|
@@ -72044,23 +72024,23 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
72044
72024
|
const viewer = props.viewer;
|
|
72045
72025
|
const camera2 = props.camera;
|
|
72046
72026
|
const [section, setSection] = React2.useState({
|
|
72047
|
-
visible: viewer.gizmos.
|
|
72048
|
-
clip: viewer.gizmos.
|
|
72027
|
+
visible: viewer.gizmos.sectionBox.visible,
|
|
72028
|
+
clip: viewer.gizmos.sectionBox.clip
|
|
72049
72029
|
});
|
|
72050
72030
|
const isClipping = () => {
|
|
72051
|
-
return !viewer.gizmos.
|
|
72031
|
+
return !viewer.gizmos.sectionBox.box.containsBox(viewer.renderer.getBoundingBox());
|
|
72052
72032
|
};
|
|
72053
72033
|
const [clipping, setClipping] = React2.useState(isClipping());
|
|
72054
72034
|
const [, setVersion] = React2.useState(0);
|
|
72055
72035
|
const hidden2 = props.isolation.isActive();
|
|
72056
72036
|
React2.useEffect(() => {
|
|
72057
|
-
const subState = viewer.gizmos.
|
|
72037
|
+
const subState = viewer.gizmos.sectionBox.onStateChanged.subscribe(() => {
|
|
72058
72038
|
setSection({
|
|
72059
|
-
visible: viewer.gizmos.
|
|
72060
|
-
clip: viewer.gizmos.
|
|
72039
|
+
visible: viewer.gizmos.sectionBox.visible,
|
|
72040
|
+
clip: viewer.gizmos.sectionBox.clip
|
|
72061
72041
|
});
|
|
72062
72042
|
});
|
|
72063
|
-
const subConfirm = viewer.gizmos.
|
|
72043
|
+
const subConfirm = viewer.gizmos.sectionBox.onBoxConfirm.subscribe(
|
|
72064
72044
|
() => setClipping(isClipping())
|
|
72065
72045
|
);
|
|
72066
72046
|
props.isolation.onChanged.subscribe(() => setVersion((v) => v + 1));
|
|
@@ -72112,10 +72092,10 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
72112
72092
|
e.stopPropagation();
|
|
72113
72093
|
};
|
|
72114
72094
|
const onSectionToggleBtn = (e) => {
|
|
72115
|
-
viewer.gizmos.
|
|
72095
|
+
viewer.gizmos.sectionBox.clip = !viewer.gizmos.sectionBox.clip;
|
|
72116
72096
|
};
|
|
72117
72097
|
const onSectionResetBtn = (e) => {
|
|
72118
|
-
viewer.gizmos.
|
|
72098
|
+
viewer.gizmos.sectionBox.fitBox(viewer.renderer.getBoundingBox());
|
|
72119
72099
|
e.stopPropagation();
|
|
72120
72100
|
};
|
|
72121
72101
|
const onMeasureDeleteBtn = (e) => {
|
|
@@ -72124,7 +72104,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
72124
72104
|
const onFitSectionToSelectionBtn = (e) => {
|
|
72125
72105
|
const box = viewer.selection.getBoundingBox();
|
|
72126
72106
|
if (box) {
|
|
72127
|
-
viewer.gizmos.
|
|
72107
|
+
viewer.gizmos.sectionBox.fitBox(box);
|
|
72128
72108
|
}
|
|
72129
72109
|
};
|
|
72130
72110
|
const createButton2 = (button) => {
|
|
@@ -75082,7 +75062,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
75082
75062
|
frameSelection(duration = 1) {
|
|
75083
75063
|
if (this._viewer.selection.count === 0) return;
|
|
75084
75064
|
const box = this._viewer.selection.getBoundingBox();
|
|
75085
|
-
if (box && this._viewer.gizmos.
|
|
75065
|
+
if (box && this._viewer.gizmos.sectionBox.box.intersectsBox(box)) {
|
|
75086
75066
|
const movement = duration === 0 ? this._viewer.camera.snap() : this._viewer.camera.lerp(duration);
|
|
75087
75067
|
movement.frame(box);
|
|
75088
75068
|
}
|
|
@@ -75731,6 +75711,254 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
75731
75711
|
component.classList.remove("behind");
|
|
75732
75712
|
}
|
|
75733
75713
|
}
|
|
75714
|
+
function SectionBoxPanel(props) {
|
|
75715
|
+
const [panelPosition, setPanelPosition] = React2.useState({
|
|
75716
|
+
top: 0,
|
|
75717
|
+
left: 0
|
|
75718
|
+
});
|
|
75719
|
+
const panelRef = React2.useRef(null);
|
|
75720
|
+
React2.useLayoutEffect(() => {
|
|
75721
|
+
const updatePosition = () => {
|
|
75722
|
+
const { top, left } = computePosition(panelRef);
|
|
75723
|
+
setPanelPosition({ top, left });
|
|
75724
|
+
};
|
|
75725
|
+
updatePosition();
|
|
75726
|
+
let resizeObserver = null;
|
|
75727
|
+
if (panelRef.current) {
|
|
75728
|
+
resizeObserver = new ResizeObserver(updatePosition);
|
|
75729
|
+
resizeObserver.observe(panelRef.current.parentElement);
|
|
75730
|
+
}
|
|
75731
|
+
return () => {
|
|
75732
|
+
if (resizeObserver) {
|
|
75733
|
+
resizeObserver.disconnect();
|
|
75734
|
+
}
|
|
75735
|
+
};
|
|
75736
|
+
}, [props.state.showOffsetPanel.get()]);
|
|
75737
|
+
if (!props.state.showOffsetPanel.get()) return null;
|
|
75738
|
+
const renderField = (id2, label, field) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "vim-sectionbox-offsets-entry vc-text-xs vc-flex vc-items-center vc-justify-center vc-justify-between vc-my-2", children: [
|
|
75739
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("dt", { className: "vc-w-1/2 vc-inline", children: label }),
|
|
75740
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("dd", { className: "vc-w-1/3 vc-inline", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
75741
|
+
"input",
|
|
75742
|
+
{
|
|
75743
|
+
id: id2,
|
|
75744
|
+
type: "text",
|
|
75745
|
+
value: field.get(),
|
|
75746
|
+
onChange: (e) => field.set(e.target.value),
|
|
75747
|
+
className: "vc-border vc-inline vc-border-gray-300 vc-py-1 vc-w-full vc-px-1",
|
|
75748
|
+
onBlur: () => field.confirm()
|
|
75749
|
+
}
|
|
75750
|
+
) })
|
|
75751
|
+
] });
|
|
75752
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
75753
|
+
"div",
|
|
75754
|
+
{
|
|
75755
|
+
className: "vc-fixed vc-inset-0 vc-flex vc-pointer-events-none",
|
|
75756
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
75757
|
+
"div",
|
|
75758
|
+
{
|
|
75759
|
+
ref: panelRef,
|
|
75760
|
+
style: { position: "absolute", top: panelPosition.top, left: panelPosition.left, width: "min(200px, 60%)" },
|
|
75761
|
+
className: "vim-sectionbox-offsets vc-pointer-events-auto vc-bg-white vc-relative",
|
|
75762
|
+
onClick: (e) => e.stopPropagation(),
|
|
75763
|
+
children: [
|
|
75764
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "vim-sectionbox-header vc-px-2 vc-bg-gray-light vc-flex vc-items-center vc-justify-between ", children: [
|
|
75765
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "vc-flex vim-sectionbox-offsets-title vc-title vc-block", children: "Section Box Offsets" }),
|
|
75766
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
75767
|
+
"button",
|
|
75768
|
+
{
|
|
75769
|
+
className: "vc-flex vc-border-none vc-bg-transparent vc-text-sm vc-cursor-pointer",
|
|
75770
|
+
onClick: () => props.state.showOffsetPanel.set(false),
|
|
75771
|
+
children: close({ height: 12, width: 12, fill: "currentColor" })
|
|
75772
|
+
}
|
|
75773
|
+
)
|
|
75774
|
+
] }),
|
|
75775
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("dl", { className: "vc-text-xl vc-text-gray-darker vc-mb-2 vc-mx-2 ", children: [
|
|
75776
|
+
renderField("topOffset", "Top Offset", props.state.topOffset),
|
|
75777
|
+
renderField("sideOffseet", "Side Offset", props.state.sideOffset),
|
|
75778
|
+
renderField("bottomOffset", "Bottom Offset", props.state.bottomOffset)
|
|
75779
|
+
] })
|
|
75780
|
+
]
|
|
75781
|
+
}
|
|
75782
|
+
)
|
|
75783
|
+
}
|
|
75784
|
+
);
|
|
75785
|
+
}
|
|
75786
|
+
function computePosition(panelRef) {
|
|
75787
|
+
const origin = document.getElementById("vim-control-bar");
|
|
75788
|
+
if (origin && panelRef.current) {
|
|
75789
|
+
const originRect = origin.getBoundingClientRect();
|
|
75790
|
+
const panelRect = panelRef.current.getBoundingClientRect();
|
|
75791
|
+
let left = originRect.left + originRect.width / 2 - panelRect.width / 2;
|
|
75792
|
+
let top = originRect.top - 10 - panelRect.height;
|
|
75793
|
+
if (top < 10) {
|
|
75794
|
+
top = originRect.bottom + 10;
|
|
75795
|
+
}
|
|
75796
|
+
if (left < 10) {
|
|
75797
|
+
left = 10;
|
|
75798
|
+
}
|
|
75799
|
+
if (left + panelRect.width > window.innerWidth - 10) {
|
|
75800
|
+
left = window.innerWidth - panelRect.width - 10;
|
|
75801
|
+
}
|
|
75802
|
+
return { top, left };
|
|
75803
|
+
}
|
|
75804
|
+
return { top: 0, left: 0 };
|
|
75805
|
+
}
|
|
75806
|
+
function addBox(b1, b2) {
|
|
75807
|
+
const r = b1.clone();
|
|
75808
|
+
r.min.x += b2.min.x;
|
|
75809
|
+
r.min.y += b2.min.y;
|
|
75810
|
+
r.min.z += b2.min.z;
|
|
75811
|
+
r.max.x += b2.max.x;
|
|
75812
|
+
r.max.y += b2.max.y;
|
|
75813
|
+
r.max.z += b2.max.z;
|
|
75814
|
+
return r;
|
|
75815
|
+
}
|
|
75816
|
+
function useStateRef(initialValue) {
|
|
75817
|
+
const [value, setValue] = React2.useState(initialValue);
|
|
75818
|
+
const ref = React2.useRef(initialValue);
|
|
75819
|
+
const event = React2.useRef(new distExports.SimpleEventDispatcher());
|
|
75820
|
+
const validate = React2.useRef((value2) => value2);
|
|
75821
|
+
const confirm = React2.useRef((value2) => value2);
|
|
75822
|
+
const set2 = (value2) => {
|
|
75823
|
+
const finalValue = validate.current(value2) ?? value2;
|
|
75824
|
+
if (finalValue === void 0) return;
|
|
75825
|
+
if (finalValue === ref.current) return;
|
|
75826
|
+
ref.current = finalValue;
|
|
75827
|
+
setValue(finalValue);
|
|
75828
|
+
event.current.dispatch(finalValue);
|
|
75829
|
+
};
|
|
75830
|
+
return {
|
|
75831
|
+
get() {
|
|
75832
|
+
return ref.current;
|
|
75833
|
+
},
|
|
75834
|
+
set: set2,
|
|
75835
|
+
confirm() {
|
|
75836
|
+
set2(confirm.current(ref.current));
|
|
75837
|
+
},
|
|
75838
|
+
useRegister(on) {
|
|
75839
|
+
React2.useEffect(() => {
|
|
75840
|
+
return event.current.subscribe(on);
|
|
75841
|
+
}, []);
|
|
75842
|
+
},
|
|
75843
|
+
useMemo(on, deps) {
|
|
75844
|
+
return React2.useMemo(() => on(value), [...deps || [], value]);
|
|
75845
|
+
},
|
|
75846
|
+
useValidate(on) {
|
|
75847
|
+
React2.useEffect(() => {
|
|
75848
|
+
validate.current = on;
|
|
75849
|
+
}, []);
|
|
75850
|
+
},
|
|
75851
|
+
useConfirm(on) {
|
|
75852
|
+
React2.useEffect(() => {
|
|
75853
|
+
confirm.current = on;
|
|
75854
|
+
}, []);
|
|
75855
|
+
}
|
|
75856
|
+
};
|
|
75857
|
+
}
|
|
75858
|
+
function useSectionBox(adapter) {
|
|
75859
|
+
const enable = useStateRef(false);
|
|
75860
|
+
const visible2 = useStateRef(false);
|
|
75861
|
+
const showOffsetPanel = useStateRef(false);
|
|
75862
|
+
const auto = useStateRef(false);
|
|
75863
|
+
const topOffset = useStateRef("1");
|
|
75864
|
+
const sideOffset = useStateRef("1");
|
|
75865
|
+
const bottomOffset = useStateRef("1");
|
|
75866
|
+
const boxRef = React2.useRef(adapter.getBox());
|
|
75867
|
+
enable.useRegister((v) => {
|
|
75868
|
+
visible2.set(v);
|
|
75869
|
+
auto.set(false);
|
|
75870
|
+
showOffsetPanel.set(false);
|
|
75871
|
+
topOffset.set("1");
|
|
75872
|
+
sideOffset.set("1");
|
|
75873
|
+
bottomOffset.set("1");
|
|
75874
|
+
void sectionReset();
|
|
75875
|
+
});
|
|
75876
|
+
topOffset.useValidate((v) => sanitize(v, false));
|
|
75877
|
+
sideOffset.useValidate((v) => sanitize(v, false));
|
|
75878
|
+
bottomOffset.useValidate((v) => sanitize(v, false));
|
|
75879
|
+
topOffset.useConfirm((v) => sanitize(v, true));
|
|
75880
|
+
sideOffset.useConfirm((v) => sanitize(v, true));
|
|
75881
|
+
bottomOffset.useConfirm((v) => sanitize(v, true));
|
|
75882
|
+
const offsetBox = React2.useMemo(
|
|
75883
|
+
() => offsetsToBox3(topOffset.get(), sideOffset.get(), bottomOffset.get()),
|
|
75884
|
+
[topOffset.get(), sideOffset.get(), bottomOffset.get()]
|
|
75885
|
+
);
|
|
75886
|
+
React2.useEffect(() => section(boxRef.current), [offsetBox]);
|
|
75887
|
+
auto.useRegister((v) => {
|
|
75888
|
+
if (v) sectionSelection();
|
|
75889
|
+
});
|
|
75890
|
+
React2.useEffect(() => {
|
|
75891
|
+
return adapter.onSelectionChanged.sub(() => {
|
|
75892
|
+
if (auto.get()) sectionSelection();
|
|
75893
|
+
});
|
|
75894
|
+
}, []);
|
|
75895
|
+
visible2.useRegister((v) => adapter.setVisible(v));
|
|
75896
|
+
const section = (baseBox) => {
|
|
75897
|
+
boxRef.current = baseBox;
|
|
75898
|
+
const newBox = addBox(baseBox, offsetBox);
|
|
75899
|
+
adapter.fitBox(newBox);
|
|
75900
|
+
};
|
|
75901
|
+
const sectionSelection = async () => {
|
|
75902
|
+
try {
|
|
75903
|
+
const box = await adapter.getSelectionBox() ?? await adapter.getRendererBox();
|
|
75904
|
+
section(box);
|
|
75905
|
+
} catch (e) {
|
|
75906
|
+
console.error(e);
|
|
75907
|
+
}
|
|
75908
|
+
};
|
|
75909
|
+
const sectionReset = async () => {
|
|
75910
|
+
const box = await adapter.getRendererBox();
|
|
75911
|
+
section(box);
|
|
75912
|
+
};
|
|
75913
|
+
return {
|
|
75914
|
+
enable,
|
|
75915
|
+
visible: visible2,
|
|
75916
|
+
auto,
|
|
75917
|
+
showOffsetPanel,
|
|
75918
|
+
topOffset,
|
|
75919
|
+
sideOffset,
|
|
75920
|
+
bottomOffset,
|
|
75921
|
+
sectionSelection,
|
|
75922
|
+
sectionReset,
|
|
75923
|
+
section
|
|
75924
|
+
};
|
|
75925
|
+
}
|
|
75926
|
+
const sanitize = (value, strict) => {
|
|
75927
|
+
if (!strict) {
|
|
75928
|
+
if (value === "" || value === "-") return value;
|
|
75929
|
+
}
|
|
75930
|
+
const num = parseFloat(value);
|
|
75931
|
+
if (isNaN(num)) {
|
|
75932
|
+
return strict ? "1" : void 0;
|
|
75933
|
+
}
|
|
75934
|
+
return String(num);
|
|
75935
|
+
};
|
|
75936
|
+
function offsetsToBox3(top, side, bottom) {
|
|
75937
|
+
const getNumber = (s) => {
|
|
75938
|
+
const num = parseFloat(s);
|
|
75939
|
+
return isNaN(num) ? 0 : num;
|
|
75940
|
+
};
|
|
75941
|
+
return new Box3(
|
|
75942
|
+
new Vector3(-getNumber(side), -getNumber(side), -getNumber(bottom)),
|
|
75943
|
+
new Vector3(getNumber(side), getNumber(side), getNumber(top))
|
|
75944
|
+
);
|
|
75945
|
+
}
|
|
75946
|
+
function useWebglSectionBox(viewer) {
|
|
75947
|
+
const vimAdapter = {
|
|
75948
|
+
setVisible: (b) => {
|
|
75949
|
+
viewer.gizmos.sectionBox.visible = b;
|
|
75950
|
+
viewer.gizmos.sectionBox.interactive = b;
|
|
75951
|
+
},
|
|
75952
|
+
getBox: () => viewer.gizmos.sectionBox.box.clone(),
|
|
75953
|
+
fitBox: (box) => viewer.gizmos.sectionBox.fitBox(box),
|
|
75954
|
+
getSelectionBox: () => Promise.resolve(viewer.selection.getBoundingBox()),
|
|
75955
|
+
getRendererBox: () => Promise.resolve(viewer.renderer.getBoundingBox()),
|
|
75956
|
+
onSceneChanged: viewer.renderer.onBoxUpdated,
|
|
75957
|
+
onSelectionChanged: viewer.selection.onValueChanged
|
|
75958
|
+
};
|
|
75959
|
+
viewer.gizmos.sectionBox.clip = true;
|
|
75960
|
+
return useSectionBox(vimAdapter);
|
|
75961
|
+
}
|
|
75734
75962
|
function createWebglComponent(container, componentSettings = {}, viewerSettings = {}) {
|
|
75735
75963
|
const promise2 = new DeferredPromise();
|
|
75736
75964
|
const cmpContainer = container instanceof HTMLElement ? createContainer(container) : container ?? createContainer();
|
|
@@ -75772,11 +76000,13 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
75772
76000
|
Math.min(props.container.root.clientWidth * 0.25, 340)
|
|
75773
76001
|
);
|
|
75774
76002
|
const [contextMenu2, setcontextMenu] = React2.useState();
|
|
75775
|
-
const [
|
|
76003
|
+
const [controlBarCustom, setControlBarCustom] = React2.useState();
|
|
75776
76004
|
const bimInfoRef = useBimInfo();
|
|
75777
76005
|
const viewerState = useViewerState(props.viewer);
|
|
75778
76006
|
const treeRef = React2.useRef();
|
|
75779
76007
|
const performanceRef = React2.useRef(null);
|
|
76008
|
+
const sectionBox2 = useWebglSectionBox(props.viewer);
|
|
76009
|
+
const controlBar2 = useControlBar(props.viewer, camera2, modal, side, isolation, cursor, settings2.value, sectionBox2, controlBarCustom);
|
|
75780
76010
|
React2.useEffect(() => {
|
|
75781
76011
|
var _a3;
|
|
75782
76012
|
side.setHasBim(((_a3 = viewerState.vim) == null ? void 0 : _a3.bim) !== void 0);
|
|
@@ -75801,11 +76031,14 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
75801
76031
|
isolation,
|
|
75802
76032
|
camera: camera2,
|
|
75803
76033
|
settings: settings2,
|
|
76034
|
+
get sectionBox() {
|
|
76035
|
+
return sectionBox2;
|
|
76036
|
+
},
|
|
75804
76037
|
contextMenu: {
|
|
75805
76038
|
customize: (v) => setcontextMenu(() => v)
|
|
75806
76039
|
},
|
|
75807
76040
|
controlBar: {
|
|
75808
|
-
customize: (v) =>
|
|
76041
|
+
customize: (v) => setControlBarCustom(() => v)
|
|
75809
76042
|
},
|
|
75810
76043
|
modal,
|
|
75811
76044
|
bimInfo: bimInfoRef,
|
|
@@ -75859,16 +76092,11 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
75859
76092
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
75860
76093
|
ControlBar,
|
|
75861
76094
|
{
|
|
75862
|
-
|
|
75863
|
-
|
|
75864
|
-
modal,
|
|
75865
|
-
side,
|
|
75866
|
-
isolation,
|
|
75867
|
-
cursor,
|
|
75868
|
-
settings: settings2.value,
|
|
75869
|
-
customization: controlBar2
|
|
76095
|
+
content: controlBar2,
|
|
76096
|
+
show: isTrue(settings2.value.ui.controlBar)
|
|
75870
76097
|
}
|
|
75871
76098
|
),
|
|
76099
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SectionBoxPanel, { state: sectionBox2 }),
|
|
75872
76100
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
75873
76101
|
AxesPanelMemo,
|
|
75874
76102
|
{
|
|
@@ -76194,12 +76422,53 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
76194
76422
|
return serverConnectionError(source.url);
|
|
76195
76423
|
}
|
|
76196
76424
|
}
|
|
76425
|
+
function updateModal(modal, state) {
|
|
76426
|
+
if (state.status === "connected") {
|
|
76427
|
+
modal.loading(void 0);
|
|
76428
|
+
modal.message(void 0);
|
|
76429
|
+
}
|
|
76430
|
+
if (state.status === "connecting") {
|
|
76431
|
+
if (modal.current === void 0 || modal.current.type === "loading") {
|
|
76432
|
+
modal.loading({ message: "Connecting to VIM Ultra server..." });
|
|
76433
|
+
}
|
|
76434
|
+
}
|
|
76435
|
+
if (state.status === "error") {
|
|
76436
|
+
console.log("Error loading vim", state);
|
|
76437
|
+
modal.message(getErrorMessage(state));
|
|
76438
|
+
}
|
|
76439
|
+
}
|
|
76440
|
+
async function updateProgress(request2, modal) {
|
|
76441
|
+
for await (const progress of request2.getProgress()) {
|
|
76442
|
+
if (request2.isCompleted) break;
|
|
76443
|
+
modal.loading({ message: "Loading File in VIM Ultra mode", progress });
|
|
76444
|
+
}
|
|
76445
|
+
}
|
|
76446
|
+
function useUltraSectionBox(viewer) {
|
|
76447
|
+
const ultraAdapter = {
|
|
76448
|
+
setVisible: (b) => {
|
|
76449
|
+
viewer.sectionBox.visible = b;
|
|
76450
|
+
viewer.sectionBox.interactive = b;
|
|
76451
|
+
},
|
|
76452
|
+
getBox: () => viewer.sectionBox.getBox().clone(),
|
|
76453
|
+
fitBox: (box) => viewer.sectionBox.fitBox(box),
|
|
76454
|
+
getSelectionBox: () => viewer.selection.getBoundingBox(),
|
|
76455
|
+
getRendererBox: () => viewer.renderer.getBoundingBox(),
|
|
76456
|
+
onSelectionChanged: viewer.selection.onValueChanged,
|
|
76457
|
+
onSceneChanged: viewer.vims.onChanged
|
|
76458
|
+
};
|
|
76459
|
+
return useSectionBox(ultraAdapter);
|
|
76460
|
+
}
|
|
76461
|
+
function useUltraControlBar(viewer, section, customization) {
|
|
76462
|
+
let controlBar2 = [controlBarSectionBox(section, viewer.selection.count > 0)];
|
|
76463
|
+
controlBar2 = (customization == null ? void 0 : customization(controlBar2)) ?? controlBar2;
|
|
76464
|
+
return controlBar2;
|
|
76465
|
+
}
|
|
76197
76466
|
function createUltraComponent(container) {
|
|
76198
76467
|
const promise2 = new DeferredPromise();
|
|
76199
76468
|
const cmpContainer = container instanceof HTMLElement ? createContainer(container) : container ?? createContainer();
|
|
76200
76469
|
const viewer = Viewer.createWithCanvas(cmpContainer.gfx);
|
|
76201
76470
|
const reactRoot = clientExports.createRoot(cmpContainer.ui);
|
|
76202
|
-
const
|
|
76471
|
+
const attachDispose = (cmp) => {
|
|
76203
76472
|
cmp.dispose = () => {
|
|
76204
76473
|
viewer.dispose();
|
|
76205
76474
|
cmpContainer.dispose();
|
|
@@ -76213,7 +76482,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
76213
76482
|
{
|
|
76214
76483
|
container: cmpContainer,
|
|
76215
76484
|
viewer,
|
|
76216
|
-
onMount: (cmp) => promise2.resolve(
|
|
76485
|
+
onMount: (cmp) => promise2.resolve(attachDispose(cmp))
|
|
76217
76486
|
}
|
|
76218
76487
|
)
|
|
76219
76488
|
);
|
|
@@ -76221,31 +76490,36 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
76221
76490
|
}
|
|
76222
76491
|
function UltraComponent(props) {
|
|
76223
76492
|
const modal = useModal(true);
|
|
76493
|
+
const sectionBox2 = useUltraSectionBox(props.viewer);
|
|
76494
|
+
const controlBar2 = useUltraControlBar(props.viewer, sectionBox2, (_2) => _2);
|
|
76495
|
+
const side = useSideState(true, 400);
|
|
76496
|
+
const [_, setSelectState] = React2.useState(0);
|
|
76224
76497
|
React2.useEffect(() => {
|
|
76225
76498
|
props.viewer.onStateChanged.subscribe((state) => updateModal(modal, state));
|
|
76226
|
-
props.
|
|
76499
|
+
props.viewer.selection.onValueChanged.subscribe(() => {
|
|
76500
|
+
setSelectState((i2) => (i2 + 1) % 2);
|
|
76501
|
+
});
|
|
76502
|
+
props.onMount(createComponentRef(props.viewer, modal, sectionBox2));
|
|
76227
76503
|
}, []);
|
|
76228
76504
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
76229
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
76505
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(RestOfScreen, { side, content: () => {
|
|
76506
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
76507
|
+
whenTrue(true, /* @__PURE__ */ jsxRuntimeExports.jsx(LogoMemo, {})),
|
|
76508
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Overlay, { canvas: props.viewer.viewport.canvas }),
|
|
76509
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
76510
|
+
ControlBar,
|
|
76511
|
+
{
|
|
76512
|
+
content: controlBar2,
|
|
76513
|
+
show: true
|
|
76514
|
+
}
|
|
76515
|
+
),
|
|
76516
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SectionBoxPanel, { state: sectionBox2 })
|
|
76517
|
+
] });
|
|
76518
|
+
} }),
|
|
76230
76519
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Modal, { state: modal })
|
|
76231
76520
|
] });
|
|
76232
76521
|
}
|
|
76233
|
-
function
|
|
76234
|
-
if (state.status === "connected") {
|
|
76235
|
-
modal.loading(void 0);
|
|
76236
|
-
modal.message(void 0);
|
|
76237
|
-
}
|
|
76238
|
-
if (state.status === "connecting") {
|
|
76239
|
-
if (modal.current === void 0 || modal.current.type === "loading") {
|
|
76240
|
-
modal.loading({ message: "Connecting to VIM Ultra server..." });
|
|
76241
|
-
}
|
|
76242
|
-
}
|
|
76243
|
-
if (state.status === "error") {
|
|
76244
|
-
console.log("Error loading vim", state);
|
|
76245
|
-
modal.message(getErrorMessage(state));
|
|
76246
|
-
}
|
|
76247
|
-
}
|
|
76248
|
-
function ToRef(viewer, modal) {
|
|
76522
|
+
function createComponentRef(viewer, modal, sectionBox2) {
|
|
76249
76523
|
function load(source) {
|
|
76250
76524
|
const request2 = viewer.loadVim(source);
|
|
76251
76525
|
void updateProgress(request2, modal);
|
|
@@ -76265,17 +76539,12 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
76265
76539
|
return {
|
|
76266
76540
|
viewer,
|
|
76267
76541
|
modal,
|
|
76542
|
+
sectionBox: sectionBox2,
|
|
76268
76543
|
dispose: () => {
|
|
76269
76544
|
},
|
|
76270
76545
|
load
|
|
76271
76546
|
};
|
|
76272
76547
|
}
|
|
76273
|
-
async function updateProgress(request2, modal) {
|
|
76274
|
-
for await (const progress of request2.getProgress()) {
|
|
76275
|
-
if (request2.isCompleted) break;
|
|
76276
|
-
modal.loading({ message: "Loading File in VIM Ultra mode", progress });
|
|
76277
|
-
}
|
|
76278
|
-
}
|
|
76279
76548
|
const index = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
76280
76549
|
__proto__: null,
|
|
76281
76550
|
UltraComponent,
|