vim-web 0.3.44-dev.1 → 0.3.44-dev.12

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.
Files changed (43) hide show
  1. package/dist/style.css +38 -1
  2. package/dist/types/core-viewers/ultra/index.d.ts +1 -1
  3. package/dist/types/core-viewers/ultra/utils/math3d.d.ts +11 -51
  4. package/dist/types/core-viewers/ultra/viewer/marshal.d.ts +0 -1
  5. package/dist/types/core-viewers/ultra/viewer/rpcClient.d.ts +1 -0
  6. package/dist/types/core-viewers/ultra/viewer/rpcSafeClient.d.ts +1 -0
  7. package/dist/types/core-viewers/ultra/viewer/sectionBox.d.ts +2 -5
  8. package/dist/types/core-viewers/ultra/viewer/selection.d.ts +2 -0
  9. package/dist/types/core-viewers/ultra/viewer/viewer.d.ts +2 -0
  10. package/dist/types/core-viewers/ultra/viewer/vimCollection.d.ts +4 -0
  11. package/dist/types/core-viewers/webgl/utils/threeUtils.d.ts +3 -0
  12. package/dist/types/core-viewers/webgl/viewer/gizmos/gizmos.d.ts +1 -1
  13. package/dist/types/core-viewers/webgl/viewer/gizmos/sectionBox/sectionBox.d.ts +1 -1
  14. package/dist/types/core-viewers/webgl/viewer/gizmos/sectionBox/sectionBoxGizmo.d.ts +2 -1
  15. package/dist/types/core-viewers/webgl/viewer/gizmos/sectionBox/sectionBoxHandle.d.ts +3 -0
  16. package/dist/types/core-viewers/webgl/viewer/gizmos/sectionBox/sectionBoxHandles.d.ts +2 -1
  17. package/dist/types/react-viewers/controlbar/controlBar.d.ts +6 -44
  18. package/dist/types/react-viewers/controlbar/controlBarButton.d.ts +3 -1
  19. package/dist/types/react-viewers/controlbar/controlBarIds.d.ts +27 -0
  20. package/dist/types/react-viewers/controlbar/controlBarSection.d.ts +2 -1
  21. package/dist/types/react-viewers/helpers/reactUtils.d.ts +14 -0
  22. package/dist/types/react-viewers/panels/icons.d.ts +6 -0
  23. package/dist/types/react-viewers/panels/sectionBoxPanel.d.ts +4 -0
  24. package/dist/types/react-viewers/state/controlBarState.d.ts +39 -0
  25. package/dist/types/react-viewers/state/sectionBoxState.d.ts +31 -0
  26. package/dist/types/react-viewers/ultra/ultraComponent.d.ts +18 -0
  27. package/dist/types/react-viewers/ultra/ultraControlBarState.d.ts +6 -0
  28. package/dist/types/react-viewers/ultra/ultraModal.d.ts +4 -0
  29. package/dist/types/react-viewers/ultra/ultraSectionBoxState.d.ts +3 -0
  30. package/dist/types/react-viewers/webgl/index.d.ts +0 -1
  31. package/dist/types/react-viewers/webgl/webglComponentRef.d.ts +5 -0
  32. package/dist/types/react-viewers/webgl/webglSectionBoxState.d.ts +3 -0
  33. package/dist/vim-web.iife.js +1281 -1014
  34. package/dist/vim-web.iife.js.map +1 -1
  35. package/dist/vim-web.js +1300 -1033
  36. package/dist/vim-web.js.map +1 -1
  37. package/package.json +1 -1
  38. package/dist/types/react-viewers/controlbar/controlBarCommands.d.ts +0 -4
  39. package/dist/types/react-viewers/controlbar/sectionBoxState.d.ts +0 -15
  40. /package/dist/types/react-viewers/{controlbar → panels}/restOfScreen.d.ts +0 -0
  41. /package/dist/types/react-viewers/{controlbar → state}/fullScreenState.d.ts +0 -0
  42. /package/dist/types/react-viewers/{controlbar → state}/measureState.d.ts +0 -0
  43. /package/dist/types/react-viewers/{controlbar → state}/pointerState.d.ts +0 -0
package/dist/vim-web.js CHANGED
@@ -2,7 +2,7 @@ var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
4
  import * as React from "react";
5
- import React__default, { useState, useRef, useEffect, useMemo, useCallback, useImperativeHandle, useContext, Component } from "react";
5
+ import React__default, { useState, useRef, useEffect, useMemo, useCallback, useImperativeHandle, useContext, Component, useLayoutEffect } from "react";
6
6
  import ReactDOM, { flushSync as flushSync$1 } from "react-dom";
7
7
  function getDefaultExportFromCjs(x) {
8
8
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
@@ -13850,7 +13850,7 @@ const MathUtils = {
13850
13850
  normalize: normalize$1,
13851
13851
  denormalize
13852
13852
  };
13853
- let Vector2$1 = class Vector2 {
13853
+ class Vector2 {
13854
13854
  constructor(x = 0, y = 0) {
13855
13855
  Vector2.prototype.isVector2 = true;
13856
13856
  this.x = x;
@@ -14112,7 +14112,7 @@ let Vector2$1 = class Vector2 {
14112
14112
  yield this.x;
14113
14113
  yield this.y;
14114
14114
  }
14115
- };
14115
+ }
14116
14116
  class Matrix3 {
14117
14117
  constructor(n11, n12, n13, n21, n22, n23, n31, n32, n33) {
14118
14118
  Matrix3.prototype.isMatrix3 = true;
@@ -14748,9 +14748,9 @@ class Texture extends EventDispatcher {
14748
14748
  this.format = format;
14749
14749
  this.internalFormat = null;
14750
14750
  this.type = type;
14751
- this.offset = new Vector2$1(0, 0);
14752
- this.repeat = new Vector2$1(1, 1);
14753
- this.center = new Vector2$1(0, 0);
14751
+ this.offset = new Vector2(0, 0);
14752
+ this.repeat = new Vector2(1, 1);
14753
+ this.center = new Vector2(0, 0);
14754
14754
  this.rotation = 0;
14755
14755
  this.matrixAutoUpdate = true;
14756
14756
  this.matrix = new Matrix3();
@@ -15835,7 +15835,7 @@ class Quaternion {
15835
15835
  yield this._w;
15836
15836
  }
15837
15837
  }
15838
- let Vector3$1 = class Vector3 {
15838
+ class Vector3 {
15839
15839
  constructor(x = 0, y = 0, z = 0) {
15840
15840
  Vector3.prototype.isVector3 = true;
15841
15841
  this.x = x;
@@ -16247,11 +16247,11 @@ let Vector3$1 = class Vector3 {
16247
16247
  yield this.y;
16248
16248
  yield this.z;
16249
16249
  }
16250
- };
16251
- const _vector$c = /* @__PURE__ */ new Vector3$1();
16250
+ }
16251
+ const _vector$c = /* @__PURE__ */ new Vector3();
16252
16252
  const _quaternion$4 = /* @__PURE__ */ new Quaternion();
16253
- let Box3$1 = class Box3 {
16254
- constructor(min2 = new Vector3$1(Infinity, Infinity, Infinity), max2 = new Vector3$1(-Infinity, -Infinity, -Infinity)) {
16253
+ class Box3 {
16254
+ constructor(min2 = new Vector3(Infinity, Infinity, Infinity), max2 = new Vector3(-Infinity, -Infinity, -Infinity)) {
16255
16255
  this.isBox3 = true;
16256
16256
  this.min = min2;
16257
16257
  this.max = max2;
@@ -16510,29 +16510,29 @@ let Box3$1 = class Box3 {
16510
16510
  equals(box) {
16511
16511
  return box.min.equals(this.min) && box.max.equals(this.max);
16512
16512
  }
16513
- };
16513
+ }
16514
16514
  const _points = [
16515
- /* @__PURE__ */ new Vector3$1(),
16516
- /* @__PURE__ */ new Vector3$1(),
16517
- /* @__PURE__ */ new Vector3$1(),
16518
- /* @__PURE__ */ new Vector3$1(),
16519
- /* @__PURE__ */ new Vector3$1(),
16520
- /* @__PURE__ */ new Vector3$1(),
16521
- /* @__PURE__ */ new Vector3$1(),
16522
- /* @__PURE__ */ new Vector3$1()
16515
+ /* @__PURE__ */ new Vector3(),
16516
+ /* @__PURE__ */ new Vector3(),
16517
+ /* @__PURE__ */ new Vector3(),
16518
+ /* @__PURE__ */ new Vector3(),
16519
+ /* @__PURE__ */ new Vector3(),
16520
+ /* @__PURE__ */ new Vector3(),
16521
+ /* @__PURE__ */ new Vector3(),
16522
+ /* @__PURE__ */ new Vector3()
16523
16523
  ];
16524
- const _vector$b = /* @__PURE__ */ new Vector3$1();
16525
- const _box$4 = /* @__PURE__ */ new Box3$1();
16526
- const _v0$2 = /* @__PURE__ */ new Vector3$1();
16527
- const _v1$7 = /* @__PURE__ */ new Vector3$1();
16528
- const _v2$4 = /* @__PURE__ */ new Vector3$1();
16529
- const _f0 = /* @__PURE__ */ new Vector3$1();
16530
- const _f1 = /* @__PURE__ */ new Vector3$1();
16531
- const _f2 = /* @__PURE__ */ new Vector3$1();
16532
- const _center = /* @__PURE__ */ new Vector3$1();
16533
- const _extents = /* @__PURE__ */ new Vector3$1();
16534
- const _triangleNormal = /* @__PURE__ */ new Vector3$1();
16535
- const _testAxis = /* @__PURE__ */ new Vector3$1();
16524
+ const _vector$b = /* @__PURE__ */ new Vector3();
16525
+ const _box$4 = /* @__PURE__ */ new Box3();
16526
+ const _v0$2 = /* @__PURE__ */ new Vector3();
16527
+ const _v1$7 = /* @__PURE__ */ new Vector3();
16528
+ const _v2$4 = /* @__PURE__ */ new Vector3();
16529
+ const _f0 = /* @__PURE__ */ new Vector3();
16530
+ const _f1 = /* @__PURE__ */ new Vector3();
16531
+ const _f2 = /* @__PURE__ */ new Vector3();
16532
+ const _center = /* @__PURE__ */ new Vector3();
16533
+ const _extents = /* @__PURE__ */ new Vector3();
16534
+ const _triangleNormal = /* @__PURE__ */ new Vector3();
16535
+ const _testAxis = /* @__PURE__ */ new Vector3();
16536
16536
  function satForAxes(axes, v0, v1, v2, extents) {
16537
16537
  for (let i = 0, j = axes.length - 3; i <= j; i += 3) {
16538
16538
  _testAxis.fromArray(axes, i);
@@ -16546,11 +16546,11 @@ function satForAxes(axes, v0, v1, v2, extents) {
16546
16546
  }
16547
16547
  return true;
16548
16548
  }
16549
- const _box$3 = /* @__PURE__ */ new Box3$1();
16550
- const _v1$6 = /* @__PURE__ */ new Vector3$1();
16551
- const _v2$3 = /* @__PURE__ */ new Vector3$1();
16549
+ const _box$3 = /* @__PURE__ */ new Box3();
16550
+ const _v1$6 = /* @__PURE__ */ new Vector3();
16551
+ const _v2$3 = /* @__PURE__ */ new Vector3();
16552
16552
  class Sphere {
16553
- constructor(center = new Vector3$1(), radius = -1) {
16553
+ constructor(center = new Vector3(), radius = -1) {
16554
16554
  this.isSphere = true;
16555
16555
  this.center = center;
16556
16556
  this.radius = radius;
@@ -16670,15 +16670,15 @@ class Sphere {
16670
16670
  return new this.constructor().copy(this);
16671
16671
  }
16672
16672
  }
16673
- const _vector$a = /* @__PURE__ */ new Vector3$1();
16674
- const _segCenter = /* @__PURE__ */ new Vector3$1();
16675
- const _segDir = /* @__PURE__ */ new Vector3$1();
16676
- const _diff = /* @__PURE__ */ new Vector3$1();
16677
- const _edge1 = /* @__PURE__ */ new Vector3$1();
16678
- const _edge2 = /* @__PURE__ */ new Vector3$1();
16679
- const _normal$1 = /* @__PURE__ */ new Vector3$1();
16673
+ const _vector$a = /* @__PURE__ */ new Vector3();
16674
+ const _segCenter = /* @__PURE__ */ new Vector3();
16675
+ const _segDir = /* @__PURE__ */ new Vector3();
16676
+ const _diff = /* @__PURE__ */ new Vector3();
16677
+ const _edge1 = /* @__PURE__ */ new Vector3();
16678
+ const _edge2 = /* @__PURE__ */ new Vector3();
16679
+ const _normal$1 = /* @__PURE__ */ new Vector3();
16680
16680
  class Ray {
16681
- constructor(origin = new Vector3$1(), direction = new Vector3$1(0, 0, -1)) {
16681
+ constructor(origin = new Vector3(), direction = new Vector3(0, 0, -1)) {
16682
16682
  this.origin = origin;
16683
16683
  this.direction = direction;
16684
16684
  }
@@ -17676,13 +17676,13 @@ class Matrix4 {
17676
17676
  return array;
17677
17677
  }
17678
17678
  }
17679
- const _v1$5 = /* @__PURE__ */ new Vector3$1();
17679
+ const _v1$5 = /* @__PURE__ */ new Vector3();
17680
17680
  const _m1$2 = /* @__PURE__ */ new Matrix4();
17681
- const _zero = /* @__PURE__ */ new Vector3$1(0, 0, 0);
17682
- const _one = /* @__PURE__ */ new Vector3$1(1, 1, 1);
17683
- const _x = /* @__PURE__ */ new Vector3$1();
17684
- const _y = /* @__PURE__ */ new Vector3$1();
17685
- const _z = /* @__PURE__ */ new Vector3$1();
17681
+ const _zero = /* @__PURE__ */ new Vector3(0, 0, 0);
17682
+ const _one = /* @__PURE__ */ new Vector3(1, 1, 1);
17683
+ const _x = /* @__PURE__ */ new Vector3();
17684
+ const _y = /* @__PURE__ */ new Vector3();
17685
+ const _z = /* @__PURE__ */ new Vector3();
17686
17686
  const _matrix$2 = /* @__PURE__ */ new Matrix4();
17687
17687
  const _quaternion$3 = /* @__PURE__ */ new Quaternion();
17688
17688
  class Euler {
@@ -17886,16 +17886,16 @@ class Layers {
17886
17886
  }
17887
17887
  }
17888
17888
  let _object3DId = 0;
17889
- const _v1$4 = /* @__PURE__ */ new Vector3$1();
17889
+ const _v1$4 = /* @__PURE__ */ new Vector3();
17890
17890
  const _q1 = /* @__PURE__ */ new Quaternion();
17891
17891
  const _m1$1$1 = /* @__PURE__ */ new Matrix4();
17892
- const _target = /* @__PURE__ */ new Vector3$1();
17893
- const _position$3 = /* @__PURE__ */ new Vector3$1();
17894
- const _scale$2 = /* @__PURE__ */ new Vector3$1();
17892
+ const _target = /* @__PURE__ */ new Vector3();
17893
+ const _position$3 = /* @__PURE__ */ new Vector3();
17894
+ const _scale$2 = /* @__PURE__ */ new Vector3();
17895
17895
  const _quaternion$2 = /* @__PURE__ */ new Quaternion();
17896
- const _xAxis = /* @__PURE__ */ new Vector3$1(1, 0, 0);
17897
- const _yAxis = /* @__PURE__ */ new Vector3$1(0, 1, 0);
17898
- const _zAxis = /* @__PURE__ */ new Vector3$1(0, 0, 1);
17896
+ const _xAxis = /* @__PURE__ */ new Vector3(1, 0, 0);
17897
+ const _yAxis = /* @__PURE__ */ new Vector3(0, 1, 0);
17898
+ const _zAxis = /* @__PURE__ */ new Vector3(0, 0, 1);
17899
17899
  const _addedEvent = { type: "added" };
17900
17900
  const _removedEvent = { type: "removed" };
17901
17901
  const _childaddedEvent = { type: "childadded", child: null };
@@ -17911,10 +17911,10 @@ let Object3D$1 = class Object3D extends EventDispatcher {
17911
17911
  this.parent = null;
17912
17912
  this.children = [];
17913
17913
  this.up = Object3D.DEFAULT_UP.clone();
17914
- const position = new Vector3$1();
17914
+ const position = new Vector3();
17915
17915
  const rotation = new Euler();
17916
17916
  const quaternion = new Quaternion();
17917
- const scale = new Vector3$1(1, 1, 1);
17917
+ const scale = new Vector3(1, 1, 1);
17918
17918
  function onRotationChange() {
17919
17919
  quaternion.setFromEuler(rotation, false);
17920
17920
  }
@@ -18440,24 +18440,24 @@ let Object3D$1 = class Object3D extends EventDispatcher {
18440
18440
  return this;
18441
18441
  }
18442
18442
  };
18443
- Object3D$1.DEFAULT_UP = /* @__PURE__ */ new Vector3$1(0, 1, 0);
18443
+ Object3D$1.DEFAULT_UP = /* @__PURE__ */ new Vector3(0, 1, 0);
18444
18444
  Object3D$1.DEFAULT_MATRIX_AUTO_UPDATE = true;
18445
18445
  Object3D$1.DEFAULT_MATRIX_WORLD_AUTO_UPDATE = true;
18446
- const _v0$1 = /* @__PURE__ */ new Vector3$1();
18447
- const _v1$3 = /* @__PURE__ */ new Vector3$1();
18448
- const _v2$2 = /* @__PURE__ */ new Vector3$1();
18449
- const _v3$2 = /* @__PURE__ */ new Vector3$1();
18450
- const _vab = /* @__PURE__ */ new Vector3$1();
18451
- const _vac = /* @__PURE__ */ new Vector3$1();
18452
- const _vbc = /* @__PURE__ */ new Vector3$1();
18453
- const _vap = /* @__PURE__ */ new Vector3$1();
18454
- const _vbp = /* @__PURE__ */ new Vector3$1();
18455
- const _vcp = /* @__PURE__ */ new Vector3$1();
18446
+ const _v0$1 = /* @__PURE__ */ new Vector3();
18447
+ const _v1$3 = /* @__PURE__ */ new Vector3();
18448
+ const _v2$2 = /* @__PURE__ */ new Vector3();
18449
+ const _v3$2 = /* @__PURE__ */ new Vector3();
18450
+ const _vab = /* @__PURE__ */ new Vector3();
18451
+ const _vac = /* @__PURE__ */ new Vector3();
18452
+ const _vbc = /* @__PURE__ */ new Vector3();
18453
+ const _vap = /* @__PURE__ */ new Vector3();
18454
+ const _vbp = /* @__PURE__ */ new Vector3();
18455
+ const _vcp = /* @__PURE__ */ new Vector3();
18456
18456
  const _v40 = /* @__PURE__ */ new Vector4();
18457
18457
  const _v41 = /* @__PURE__ */ new Vector4();
18458
18458
  const _v42 = /* @__PURE__ */ new Vector4();
18459
18459
  class Triangle {
18460
- constructor(a = new Vector3$1(), b = new Vector3$1(), c = new Vector3$1()) {
18460
+ constructor(a = new Vector3(), b = new Vector3(), c = new Vector3()) {
18461
18461
  this.a = a;
18462
18462
  this.b = b;
18463
18463
  this.c = c;
@@ -19597,8 +19597,8 @@ const DataUtils = {
19597
19597
  toHalfFloat,
19598
19598
  fromHalfFloat
19599
19599
  };
19600
- const _vector$9 = /* @__PURE__ */ new Vector3$1();
19601
- const _vector2$1 = /* @__PURE__ */ new Vector2$1();
19600
+ const _vector$9 = /* @__PURE__ */ new Vector3();
19601
+ const _vector2$1 = /* @__PURE__ */ new Vector2();
19602
19602
  class BufferAttribute {
19603
19603
  constructor(array, itemSize, normalized = false) {
19604
19604
  if (Array.isArray(array)) {
@@ -19926,10 +19926,10 @@ class Float32BufferAttribute extends BufferAttribute {
19926
19926
  let _id$1 = 0;
19927
19927
  const _m1$3 = /* @__PURE__ */ new Matrix4();
19928
19928
  const _obj = /* @__PURE__ */ new Object3D$1();
19929
- const _offset = /* @__PURE__ */ new Vector3$1();
19930
- const _box$2 = /* @__PURE__ */ new Box3$1();
19931
- const _boxMorphTargets = /* @__PURE__ */ new Box3$1();
19932
- const _vector$8 = /* @__PURE__ */ new Vector3$1();
19929
+ const _offset = /* @__PURE__ */ new Vector3();
19930
+ const _box$2 = /* @__PURE__ */ new Box3();
19931
+ const _boxMorphTargets = /* @__PURE__ */ new Box3();
19932
+ const _vector$8 = /* @__PURE__ */ new Vector3();
19933
19933
  class BufferGeometry extends EventDispatcher {
19934
19934
  constructor() {
19935
19935
  super();
@@ -20086,15 +20086,15 @@ class BufferGeometry extends EventDispatcher {
20086
20086
  }
20087
20087
  computeBoundingBox() {
20088
20088
  if (this.boundingBox === null) {
20089
- this.boundingBox = new Box3$1();
20089
+ this.boundingBox = new Box3();
20090
20090
  }
20091
20091
  const position = this.attributes.position;
20092
20092
  const morphAttributesPosition = this.morphAttributes.position;
20093
20093
  if (position && position.isGLBufferAttribute) {
20094
20094
  console.error("THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.", this);
20095
20095
  this.boundingBox.set(
20096
- new Vector3$1(-Infinity, -Infinity, -Infinity),
20097
- new Vector3$1(Infinity, Infinity, Infinity)
20096
+ new Vector3(-Infinity, -Infinity, -Infinity),
20097
+ new Vector3(Infinity, Infinity, Infinity)
20098
20098
  );
20099
20099
  return;
20100
20100
  }
@@ -20130,7 +20130,7 @@ class BufferGeometry extends EventDispatcher {
20130
20130
  const morphAttributesPosition = this.morphAttributes.position;
20131
20131
  if (position && position.isGLBufferAttribute) {
20132
20132
  console.error("THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.", this);
20133
- this.boundingSphere.set(new Vector3$1(), Infinity);
20133
+ this.boundingSphere.set(new Vector3(), Infinity);
20134
20134
  return;
20135
20135
  }
20136
20136
  if (position) {
@@ -20193,10 +20193,10 @@ class BufferGeometry extends EventDispatcher {
20193
20193
  const tangentAttribute = this.getAttribute("tangent");
20194
20194
  const tan1 = [], tan2 = [];
20195
20195
  for (let i = 0; i < positionAttribute.count; i++) {
20196
- tan1[i] = new Vector3$1();
20197
- tan2[i] = new Vector3$1();
20196
+ tan1[i] = new Vector3();
20197
+ tan2[i] = new Vector3();
20198
20198
  }
20199
- const vA = new Vector3$1(), vB = new Vector3$1(), vC = new Vector3$1(), uvA = new Vector2$1(), uvB = new Vector2$1(), uvC = new Vector2$1(), sdir = new Vector3$1(), tdir = new Vector3$1();
20199
+ 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();
20200
20200
  function handleTriangle(a, b, c) {
20201
20201
  vA.fromBufferAttribute(positionAttribute, a);
20202
20202
  vB.fromBufferAttribute(positionAttribute, b);
@@ -20238,8 +20238,8 @@ class BufferGeometry extends EventDispatcher {
20238
20238
  );
20239
20239
  }
20240
20240
  }
20241
- const tmp2 = new Vector3$1(), tmp22 = new Vector3$1();
20242
- const n = new Vector3$1(), n2 = new Vector3$1();
20241
+ const tmp2 = new Vector3(), tmp22 = new Vector3();
20242
+ const n = new Vector3(), n2 = new Vector3();
20243
20243
  function handleVertex(v) {
20244
20244
  n.fromBufferAttribute(normalAttribute, v);
20245
20245
  n2.copy(n);
@@ -20275,9 +20275,9 @@ class BufferGeometry extends EventDispatcher {
20275
20275
  normalAttribute.setXYZ(i, 0, 0, 0);
20276
20276
  }
20277
20277
  }
20278
- const pA = new Vector3$1(), pB = new Vector3$1(), pC = new Vector3$1();
20279
- const nA = new Vector3$1(), nB = new Vector3$1(), nC = new Vector3$1();
20280
- const cb = new Vector3$1(), ab = new Vector3$1();
20278
+ const pA = new Vector3(), pB = new Vector3(), pC = new Vector3();
20279
+ const nA = new Vector3(), nB = new Vector3(), nC = new Vector3();
20280
+ const cb = new Vector3(), ab = new Vector3();
20281
20281
  if (index2) {
20282
20282
  for (let i = 0, il = index2.count; i < il; i += 3) {
20283
20283
  const vA = index2.getX(i + 0);
@@ -20493,14 +20493,14 @@ class BufferGeometry extends EventDispatcher {
20493
20493
  const _inverseMatrix$3 = /* @__PURE__ */ new Matrix4();
20494
20494
  const _ray$3 = /* @__PURE__ */ new Ray();
20495
20495
  const _sphere$6 = /* @__PURE__ */ new Sphere();
20496
- const _sphereHitAt = /* @__PURE__ */ new Vector3$1();
20497
- const _vA$1 = /* @__PURE__ */ new Vector3$1();
20498
- const _vB$1 = /* @__PURE__ */ new Vector3$1();
20499
- const _vC$1 = /* @__PURE__ */ new Vector3$1();
20500
- const _tempA = /* @__PURE__ */ new Vector3$1();
20501
- const _morphA = /* @__PURE__ */ new Vector3$1();
20502
- const _intersectionPoint = /* @__PURE__ */ new Vector3$1();
20503
- const _intersectionPointWorld = /* @__PURE__ */ new Vector3$1();
20496
+ const _sphereHitAt = /* @__PURE__ */ new Vector3();
20497
+ const _vA$1 = /* @__PURE__ */ new Vector3();
20498
+ const _vB$1 = /* @__PURE__ */ new Vector3();
20499
+ const _vC$1 = /* @__PURE__ */ new Vector3();
20500
+ const _tempA = /* @__PURE__ */ new Vector3();
20501
+ const _morphA = /* @__PURE__ */ new Vector3();
20502
+ const _intersectionPoint = /* @__PURE__ */ new Vector3();
20503
+ const _intersectionPointWorld = /* @__PURE__ */ new Vector3();
20504
20504
  class Mesh extends Object3D$1 {
20505
20505
  constructor(geometry = new BufferGeometry(), material = new MeshBasicMaterial()) {
20506
20506
  super();
@@ -20687,16 +20687,16 @@ function checkGeometryIntersection(object, material, raycaster, ray, uv, uv1, no
20687
20687
  object.getVertexPosition(c, _vC$1);
20688
20688
  const intersection = checkIntersection$1(object, material, raycaster, ray, _vA$1, _vB$1, _vC$1, _intersectionPoint);
20689
20689
  if (intersection) {
20690
- const barycoord = new Vector3$1();
20690
+ const barycoord = new Vector3();
20691
20691
  Triangle.getBarycoord(_intersectionPoint, _vA$1, _vB$1, _vC$1, barycoord);
20692
20692
  if (uv) {
20693
- intersection.uv = Triangle.getInterpolatedAttribute(uv, a, b, c, barycoord, new Vector2$1());
20693
+ intersection.uv = Triangle.getInterpolatedAttribute(uv, a, b, c, barycoord, new Vector2());
20694
20694
  }
20695
20695
  if (uv1) {
20696
- intersection.uv1 = Triangle.getInterpolatedAttribute(uv1, a, b, c, barycoord, new Vector2$1());
20696
+ intersection.uv1 = Triangle.getInterpolatedAttribute(uv1, a, b, c, barycoord, new Vector2());
20697
20697
  }
20698
20698
  if (normal) {
20699
- intersection.normal = Triangle.getInterpolatedAttribute(normal, a, b, c, barycoord, new Vector3$1());
20699
+ intersection.normal = Triangle.getInterpolatedAttribute(normal, a, b, c, barycoord, new Vector3());
20700
20700
  if (intersection.normal.dot(ray.direction) > 0) {
20701
20701
  intersection.normal.multiplyScalar(-1);
20702
20702
  }
@@ -20705,7 +20705,7 @@ function checkGeometryIntersection(object, material, raycaster, ray, uv, uv1, no
20705
20705
  a,
20706
20706
  b,
20707
20707
  c,
20708
- normal: new Vector3$1(),
20708
+ normal: new Vector3(),
20709
20709
  materialIndex: 0
20710
20710
  };
20711
20711
  Triangle.getNormal(_vA$1, _vB$1, _vC$1, face.normal);
@@ -20756,7 +20756,7 @@ class BoxGeometry extends BufferGeometry {
20756
20756
  const gridY1 = gridY + 1;
20757
20757
  let vertexCounter = 0;
20758
20758
  let groupCount = 0;
20759
- const vector = new Vector3$1();
20759
+ const vector = new Vector3();
20760
20760
  for (let iy = 0; iy < gridY1; iy++) {
20761
20761
  const y = iy * segmentHeight - heightHalf;
20762
20762
  for (let ix = 0; ix < gridX1; ix++) {
@@ -20996,9 +20996,9 @@ let Camera$2 = class Camera extends Object3D$1 {
20996
20996
  return new this.constructor().copy(this);
20997
20997
  }
20998
20998
  };
20999
- const _v3$1 = /* @__PURE__ */ new Vector3$1();
21000
- const _minTarget = /* @__PURE__ */ new Vector2$1();
21001
- const _maxTarget = /* @__PURE__ */ new Vector2$1();
20999
+ const _v3$1 = /* @__PURE__ */ new Vector3();
21000
+ const _minTarget = /* @__PURE__ */ new Vector2();
21001
+ const _maxTarget = /* @__PURE__ */ new Vector2();
21002
21002
  class PerspectiveCamera extends Camera$2 {
21003
21003
  constructor(fov2 = 50, aspect2 = 1, near = 0.1, far = 2e3) {
21004
21004
  super();
@@ -21547,7 +21547,7 @@ class InterleavedBuffer {
21547
21547
  };
21548
21548
  }
21549
21549
  }
21550
- const _vector$7 = /* @__PURE__ */ new Vector3$1();
21550
+ const _vector$7 = /* @__PURE__ */ new Vector3();
21551
21551
  class InterleavedBufferAttribute {
21552
21552
  constructor(interleavedBuffer, itemSize, offset, normalized = false) {
21553
21553
  this.isInterleavedBufferAttribute = true;
@@ -21756,18 +21756,18 @@ class SpriteMaterial extends Material {
21756
21756
  }
21757
21757
  }
21758
21758
  let _geometry$1;
21759
- const _intersectPoint = /* @__PURE__ */ new Vector3$1();
21760
- const _worldScale = /* @__PURE__ */ new Vector3$1();
21761
- const _mvPosition = /* @__PURE__ */ new Vector3$1();
21762
- const _alignedPosition = /* @__PURE__ */ new Vector2$1();
21763
- const _rotatedPosition = /* @__PURE__ */ new Vector2$1();
21759
+ const _intersectPoint = /* @__PURE__ */ new Vector3();
21760
+ const _worldScale = /* @__PURE__ */ new Vector3();
21761
+ const _mvPosition = /* @__PURE__ */ new Vector3();
21762
+ const _alignedPosition = /* @__PURE__ */ new Vector2();
21763
+ const _rotatedPosition = /* @__PURE__ */ new Vector2();
21764
21764
  const _viewWorldMatrix = /* @__PURE__ */ new Matrix4();
21765
- const _vA = /* @__PURE__ */ new Vector3$1();
21766
- const _vB = /* @__PURE__ */ new Vector3$1();
21767
- const _vC = /* @__PURE__ */ new Vector3$1();
21768
- const _uvA = /* @__PURE__ */ new Vector2$1();
21769
- const _uvB = /* @__PURE__ */ new Vector2$1();
21770
- const _uvC = /* @__PURE__ */ new Vector2$1();
21765
+ const _vA = /* @__PURE__ */ new Vector3();
21766
+ const _vB = /* @__PURE__ */ new Vector3();
21767
+ const _vC = /* @__PURE__ */ new Vector3();
21768
+ const _uvA = /* @__PURE__ */ new Vector2();
21769
+ const _uvB = /* @__PURE__ */ new Vector2();
21770
+ const _uvC = /* @__PURE__ */ new Vector2();
21771
21771
  class Sprite extends Object3D$1 {
21772
21772
  constructor(material = new SpriteMaterial()) {
21773
21773
  super();
@@ -21804,7 +21804,7 @@ class Sprite extends Object3D$1 {
21804
21804
  }
21805
21805
  this.geometry = _geometry$1;
21806
21806
  this.material = material;
21807
- this.center = new Vector2$1(0.5, 0.5);
21807
+ this.center = new Vector2(0.5, 0.5);
21808
21808
  }
21809
21809
  raycast(raycaster, intersects2) {
21810
21810
  if (raycaster.camera === null) {
@@ -21844,7 +21844,7 @@ class Sprite extends Object3D$1 {
21844
21844
  intersects2.push({
21845
21845
  distance,
21846
21846
  point: _intersectPoint.clone(),
21847
- uv: Triangle.getInterpolation(_intersectPoint, _vA, _vB, _vC, _uvA, _uvB, _uvC, new Vector2$1()),
21847
+ uv: Triangle.getInterpolation(_intersectPoint, _vA, _vB, _vC, _uvA, _uvB, _uvC, new Vector2()),
21848
21848
  face: null,
21849
21849
  object: this
21850
21850
  });
@@ -21869,8 +21869,8 @@ function transformVertex(vertexPosition, mvPosition, center, scale, sin, cos) {
21869
21869
  vertexPosition.y += _rotatedPosition.y;
21870
21870
  vertexPosition.applyMatrix4(_viewWorldMatrix);
21871
21871
  }
21872
- const _v1$2 = /* @__PURE__ */ new Vector3$1();
21873
- const _v2$1 = /* @__PURE__ */ new Vector3$1();
21872
+ const _v1$2 = /* @__PURE__ */ new Vector3();
21873
+ const _v2$1 = /* @__PURE__ */ new Vector3();
21874
21874
  class LOD extends Object3D$1 {
21875
21875
  constructor() {
21876
21876
  super();
@@ -21991,12 +21991,12 @@ class LOD extends Object3D$1 {
21991
21991
  return data2;
21992
21992
  }
21993
21993
  }
21994
- const _basePosition = /* @__PURE__ */ new Vector3$1();
21994
+ const _basePosition = /* @__PURE__ */ new Vector3();
21995
21995
  const _skinIndex = /* @__PURE__ */ new Vector4();
21996
21996
  const _skinWeight = /* @__PURE__ */ new Vector4();
21997
- const _vector3 = /* @__PURE__ */ new Vector3$1();
21997
+ const _vector3 = /* @__PURE__ */ new Vector3();
21998
21998
  const _matrix4 = /* @__PURE__ */ new Matrix4();
21999
- const _vertex = /* @__PURE__ */ new Vector3$1();
21999
+ const _vertex = /* @__PURE__ */ new Vector3();
22000
22000
  const _sphere$5 = /* @__PURE__ */ new Sphere();
22001
22001
  const _inverseMatrix$2 = /* @__PURE__ */ new Matrix4();
22002
22002
  const _ray$2 = /* @__PURE__ */ new Ray();
@@ -22014,7 +22014,7 @@ class SkinnedMesh extends Mesh {
22014
22014
  computeBoundingBox() {
22015
22015
  const geometry = this.geometry;
22016
22016
  if (this.boundingBox === null) {
22017
- this.boundingBox = new Box3$1();
22017
+ this.boundingBox = new Box3();
22018
22018
  }
22019
22019
  this.boundingBox.makeEmpty();
22020
22020
  const positionAttribute = geometry.getAttribute("position");
@@ -22296,7 +22296,7 @@ class InstancedBufferAttribute extends BufferAttribute {
22296
22296
  const _instanceLocalMatrix = /* @__PURE__ */ new Matrix4();
22297
22297
  const _instanceWorldMatrix = /* @__PURE__ */ new Matrix4();
22298
22298
  const _instanceIntersects = [];
22299
- const _box3 = /* @__PURE__ */ new Box3$1();
22299
+ const _box3 = /* @__PURE__ */ new Box3();
22300
22300
  const _identity = /* @__PURE__ */ new Matrix4();
22301
22301
  const _mesh$1 = /* @__PURE__ */ new Mesh();
22302
22302
  const _sphere$4 = /* @__PURE__ */ new Sphere();
@@ -22318,7 +22318,7 @@ let InstancedMesh$1 = class InstancedMesh extends Mesh {
22318
22318
  const geometry = this.geometry;
22319
22319
  const count = this.count;
22320
22320
  if (this.boundingBox === null) {
22321
- this.boundingBox = new Box3$1();
22321
+ this.boundingBox = new Box3();
22322
22322
  }
22323
22323
  if (geometry.boundingBox === null) {
22324
22324
  geometry.computeBoundingBox();
@@ -22431,11 +22431,11 @@ let InstancedMesh$1 = class InstancedMesh extends Mesh {
22431
22431
  return this;
22432
22432
  }
22433
22433
  };
22434
- const _vector1 = /* @__PURE__ */ new Vector3$1();
22435
- const _vector2 = /* @__PURE__ */ new Vector3$1();
22434
+ const _vector1 = /* @__PURE__ */ new Vector3();
22435
+ const _vector2 = /* @__PURE__ */ new Vector3();
22436
22436
  const _normalMatrix = /* @__PURE__ */ new Matrix3();
22437
22437
  class Plane {
22438
- constructor(normal = new Vector3$1(1, 0, 0), constant = 0) {
22438
+ constructor(normal = new Vector3(1, 0, 0), constant = 0) {
22439
22439
  this.isPlane = true;
22440
22440
  this.normal = normal;
22441
22441
  this.constant = constant;
@@ -22533,7 +22533,7 @@ class Plane {
22533
22533
  }
22534
22534
  }
22535
22535
  const _sphere$3 = /* @__PURE__ */ new Sphere();
22536
- const _vector$6 = /* @__PURE__ */ new Vector3$1();
22536
+ const _vector$6 = /* @__PURE__ */ new Vector3();
22537
22537
  class Frustum {
22538
22538
  constructor(p0 = new Plane(), p1 = new Plane(), p2 = new Plane(), p3 = new Plane(), p4 = new Plane(), p5 = new Plane()) {
22539
22539
  this.planes = [p0, p1, p2, p3, p4, p5];
@@ -22673,11 +22673,11 @@ class MultiDrawRenderList {
22673
22673
  const _matrix$1 = /* @__PURE__ */ new Matrix4();
22674
22674
  const _whiteColor = /* @__PURE__ */ new Color(1, 1, 1);
22675
22675
  const _frustum = /* @__PURE__ */ new Frustum();
22676
- const _box$1 = /* @__PURE__ */ new Box3$1();
22676
+ const _box$1 = /* @__PURE__ */ new Box3();
22677
22677
  const _sphere$2 = /* @__PURE__ */ new Sphere();
22678
- const _vector$5 = /* @__PURE__ */ new Vector3$1();
22679
- const _forward = /* @__PURE__ */ new Vector3$1();
22680
- const _temp = /* @__PURE__ */ new Vector3$1();
22678
+ const _vector$5 = /* @__PURE__ */ new Vector3();
22679
+ const _forward = /* @__PURE__ */ new Vector3();
22680
+ const _temp = /* @__PURE__ */ new Vector3();
22681
22681
  const _renderList = /* @__PURE__ */ new MultiDrawRenderList();
22682
22682
  const _mesh = /* @__PURE__ */ new Mesh();
22683
22683
  const _batchIntersects = [];
@@ -22826,7 +22826,7 @@ class BatchedMesh extends Mesh {
22826
22826
  }
22827
22827
  computeBoundingBox() {
22828
22828
  if (this.boundingBox === null) {
22829
- this.boundingBox = new Box3$1();
22829
+ this.boundingBox = new Box3();
22830
22830
  }
22831
22831
  const boundingBox = this.boundingBox;
22832
22832
  const instanceInfo = this._instanceInfo;
@@ -23064,7 +23064,7 @@ class BatchedMesh extends Mesh {
23064
23064
  const geometry = this.geometry;
23065
23065
  const geometryInfo = this._geometryInfo[geometryId];
23066
23066
  if (geometryInfo.boundingBox === null) {
23067
- const box = new Box3$1();
23067
+ const box = new Box3();
23068
23068
  const index2 = geometry.index;
23069
23069
  const position = geometry.attributes.position;
23070
23070
  for (let i = geometryInfo.start, l = geometryInfo.start + geometryInfo.count; i < l; i++) {
@@ -23239,7 +23239,7 @@ class BatchedMesh extends Mesh {
23239
23239
  _mesh.geometry.index = batchGeometry.index;
23240
23240
  _mesh.geometry.attributes = batchGeometry.attributes;
23241
23241
  if (_mesh.geometry.boundingBox === null) {
23242
- _mesh.geometry.boundingBox = new Box3$1();
23242
+ _mesh.geometry.boundingBox = new Box3();
23243
23243
  }
23244
23244
  if (_mesh.geometry.boundingSphere === null) {
23245
23245
  _mesh.geometry.boundingSphere = new Sphere();
@@ -23416,13 +23416,13 @@ class LineBasicMaterial extends Material {
23416
23416
  return this;
23417
23417
  }
23418
23418
  }
23419
- const _vStart = /* @__PURE__ */ new Vector3$1();
23420
- const _vEnd = /* @__PURE__ */ new Vector3$1();
23419
+ const _vStart = /* @__PURE__ */ new Vector3();
23420
+ const _vEnd = /* @__PURE__ */ new Vector3();
23421
23421
  const _inverseMatrix$1 = /* @__PURE__ */ new Matrix4();
23422
23422
  const _ray$1 = /* @__PURE__ */ new Ray();
23423
23423
  const _sphere$1 = /* @__PURE__ */ new Sphere();
23424
- const _intersectPointOnRay = /* @__PURE__ */ new Vector3$1();
23425
- const _intersectPointOnSegment = /* @__PURE__ */ new Vector3$1();
23424
+ const _intersectPointOnRay = /* @__PURE__ */ new Vector3();
23425
+ const _intersectPointOnSegment = /* @__PURE__ */ new Vector3();
23426
23426
  class Line extends Object3D$1 {
23427
23427
  constructor(geometry = new BufferGeometry(), material = new LineBasicMaterial()) {
23428
23428
  super();
@@ -23548,8 +23548,8 @@ function checkIntersection(object, raycaster, ray, thresholdSq, a, b) {
23548
23548
  object
23549
23549
  };
23550
23550
  }
23551
- const _start = /* @__PURE__ */ new Vector3$1();
23552
- const _end = /* @__PURE__ */ new Vector3$1();
23551
+ const _start = /* @__PURE__ */ new Vector3();
23552
+ const _end = /* @__PURE__ */ new Vector3();
23553
23553
  class LineSegments extends Line {
23554
23554
  constructor(geometry, material) {
23555
23555
  super(geometry, material);
@@ -23608,7 +23608,7 @@ class PointsMaterial extends Material {
23608
23608
  const _inverseMatrix = /* @__PURE__ */ new Matrix4();
23609
23609
  const _ray = /* @__PURE__ */ new Ray();
23610
23610
  const _sphere = /* @__PURE__ */ new Sphere();
23611
- const _position$2 = /* @__PURE__ */ new Vector3$1();
23611
+ const _position$2 = /* @__PURE__ */ new Vector3();
23612
23612
  class Points extends Object3D$1 {
23613
23613
  constructor(geometry = new BufferGeometry(), material = new PointsMaterial()) {
23614
23614
  super();
@@ -23679,7 +23679,7 @@ class Points extends Object3D$1 {
23679
23679
  function testPoint(point, index2, localThresholdSq, matrixWorld, raycaster, intersects2, object) {
23680
23680
  const rayPointDistanceSq = _ray.distanceSqToPoint(point);
23681
23681
  if (rayPointDistanceSq < localThresholdSq) {
23682
- const intersectPoint = new Vector3$1();
23682
+ const intersectPoint = new Vector3();
23683
23683
  _ray.closestPointToPoint(point, intersectPoint);
23684
23684
  intersectPoint.applyMatrix4(matrixWorld);
23685
23685
  const distance = raycaster.ray.origin.distanceTo(intersectPoint);
@@ -23915,7 +23915,7 @@ class Curve {
23915
23915
  if (t2 > 1) t2 = 1;
23916
23916
  const pt1 = this.getPoint(t1);
23917
23917
  const pt2 = this.getPoint(t2);
23918
- const tangent = optionalTarget || (pt1.isVector2 ? new Vector2$1() : new Vector3$1());
23918
+ const tangent = optionalTarget || (pt1.isVector2 ? new Vector2() : new Vector3());
23919
23919
  tangent.copy(pt2).sub(pt1).normalize();
23920
23920
  return tangent;
23921
23921
  }
@@ -23924,18 +23924,18 @@ class Curve {
23924
23924
  return this.getTangent(t, optionalTarget);
23925
23925
  }
23926
23926
  computeFrenetFrames(segments, closed) {
23927
- const normal = new Vector3$1();
23927
+ const normal = new Vector3();
23928
23928
  const tangents = [];
23929
23929
  const normals = [];
23930
23930
  const binormals = [];
23931
- const vec = new Vector3$1();
23931
+ const vec = new Vector3();
23932
23932
  const mat = new Matrix4();
23933
23933
  for (let i = 0; i <= segments; i++) {
23934
23934
  const u = i / segments;
23935
- tangents[i] = this.getTangentAt(u, new Vector3$1());
23935
+ tangents[i] = this.getTangentAt(u, new Vector3());
23936
23936
  }
23937
- normals[0] = new Vector3$1();
23938
- binormals[0] = new Vector3$1();
23937
+ normals[0] = new Vector3();
23938
+ binormals[0] = new Vector3();
23939
23939
  let min2 = Number.MAX_VALUE;
23940
23940
  const tx = Math.abs(tangents[0].x);
23941
23941
  const ty = Math.abs(tangents[0].y);
@@ -24020,7 +24020,7 @@ class EllipseCurve extends Curve {
24020
24020
  this.aClockwise = aClockwise;
24021
24021
  this.aRotation = aRotation;
24022
24022
  }
24023
- getPoint(t, optionalTarget = new Vector2$1()) {
24023
+ getPoint(t, optionalTarget = new Vector2()) {
24024
24024
  const point = optionalTarget;
24025
24025
  const twoPi = Math.PI * 2;
24026
24026
  let deltaAngle = this.aEndAngle - this.aStartAngle;
@@ -24124,7 +24124,7 @@ function CubicPoly() {
24124
24124
  }
24125
24125
  };
24126
24126
  }
24127
- const tmp = /* @__PURE__ */ new Vector3$1();
24127
+ const tmp = /* @__PURE__ */ new Vector3();
24128
24128
  const px = /* @__PURE__ */ new CubicPoly();
24129
24129
  const py = /* @__PURE__ */ new CubicPoly();
24130
24130
  const pz = /* @__PURE__ */ new CubicPoly();
@@ -24138,7 +24138,7 @@ class CatmullRomCurve3 extends Curve {
24138
24138
  this.curveType = curveType;
24139
24139
  this.tension = tension;
24140
24140
  }
24141
- getPoint(t, optionalTarget = new Vector3$1()) {
24141
+ getPoint(t, optionalTarget = new Vector3()) {
24142
24142
  const point = optionalTarget;
24143
24143
  const points = this.points;
24144
24144
  const l = points.length;
@@ -24218,7 +24218,7 @@ class CatmullRomCurve3 extends Curve {
24218
24218
  this.points = [];
24219
24219
  for (let i = 0, l = json.points.length; i < l; i++) {
24220
24220
  const point = json.points[i];
24221
- this.points.push(new Vector3$1().fromArray(point));
24221
+ this.points.push(new Vector3().fromArray(point));
24222
24222
  }
24223
24223
  this.closed = json.closed;
24224
24224
  this.curveType = json.curveType;
@@ -24264,7 +24264,7 @@ function CubicBezier(t, p0, p1, p2, p3) {
24264
24264
  return CubicBezierP0(t, p0) + CubicBezierP1(t, p1) + CubicBezierP2(t, p2) + CubicBezierP3(t, p3);
24265
24265
  }
24266
24266
  class CubicBezierCurve extends Curve {
24267
- constructor(v0 = new Vector2$1(), v1 = new Vector2$1(), v2 = new Vector2$1(), v3 = new Vector2$1()) {
24267
+ constructor(v0 = new Vector2(), v1 = new Vector2(), v2 = new Vector2(), v3 = new Vector2()) {
24268
24268
  super();
24269
24269
  this.isCubicBezierCurve = true;
24270
24270
  this.type = "CubicBezierCurve";
@@ -24273,7 +24273,7 @@ class CubicBezierCurve extends Curve {
24273
24273
  this.v2 = v2;
24274
24274
  this.v3 = v3;
24275
24275
  }
24276
- getPoint(t, optionalTarget = new Vector2$1()) {
24276
+ getPoint(t, optionalTarget = new Vector2()) {
24277
24277
  const point = optionalTarget;
24278
24278
  const v0 = this.v0, v1 = this.v1, v2 = this.v2, v3 = this.v3;
24279
24279
  point.set(
@@ -24308,7 +24308,7 @@ class CubicBezierCurve extends Curve {
24308
24308
  }
24309
24309
  }
24310
24310
  class CubicBezierCurve3 extends Curve {
24311
- constructor(v0 = new Vector3$1(), v1 = new Vector3$1(), v2 = new Vector3$1(), v3 = new Vector3$1()) {
24311
+ constructor(v0 = new Vector3(), v1 = new Vector3(), v2 = new Vector3(), v3 = new Vector3()) {
24312
24312
  super();
24313
24313
  this.isCubicBezierCurve3 = true;
24314
24314
  this.type = "CubicBezierCurve3";
@@ -24317,7 +24317,7 @@ class CubicBezierCurve3 extends Curve {
24317
24317
  this.v2 = v2;
24318
24318
  this.v3 = v3;
24319
24319
  }
24320
- getPoint(t, optionalTarget = new Vector3$1()) {
24320
+ getPoint(t, optionalTarget = new Vector3()) {
24321
24321
  const point = optionalTarget;
24322
24322
  const v0 = this.v0, v1 = this.v1, v2 = this.v2, v3 = this.v3;
24323
24323
  point.set(
@@ -24353,14 +24353,14 @@ class CubicBezierCurve3 extends Curve {
24353
24353
  }
24354
24354
  }
24355
24355
  class LineCurve extends Curve {
24356
- constructor(v1 = new Vector2$1(), v2 = new Vector2$1()) {
24356
+ constructor(v1 = new Vector2(), v2 = new Vector2()) {
24357
24357
  super();
24358
24358
  this.isLineCurve = true;
24359
24359
  this.type = "LineCurve";
24360
24360
  this.v1 = v1;
24361
24361
  this.v2 = v2;
24362
24362
  }
24363
- getPoint(t, optionalTarget = new Vector2$1()) {
24363
+ getPoint(t, optionalTarget = new Vector2()) {
24364
24364
  const point = optionalTarget;
24365
24365
  if (t === 1) {
24366
24366
  point.copy(this.v2);
@@ -24374,7 +24374,7 @@ class LineCurve extends Curve {
24374
24374
  getPointAt(u, optionalTarget) {
24375
24375
  return this.getPoint(u, optionalTarget);
24376
24376
  }
24377
- getTangent(t, optionalTarget = new Vector2$1()) {
24377
+ getTangent(t, optionalTarget = new Vector2()) {
24378
24378
  return optionalTarget.subVectors(this.v2, this.v1).normalize();
24379
24379
  }
24380
24380
  getTangentAt(u, optionalTarget) {
@@ -24400,14 +24400,14 @@ class LineCurve extends Curve {
24400
24400
  }
24401
24401
  }
24402
24402
  class LineCurve3 extends Curve {
24403
- constructor(v1 = new Vector3$1(), v2 = new Vector3$1()) {
24403
+ constructor(v1 = new Vector3(), v2 = new Vector3()) {
24404
24404
  super();
24405
24405
  this.isLineCurve3 = true;
24406
24406
  this.type = "LineCurve3";
24407
24407
  this.v1 = v1;
24408
24408
  this.v2 = v2;
24409
24409
  }
24410
- getPoint(t, optionalTarget = new Vector3$1()) {
24410
+ getPoint(t, optionalTarget = new Vector3()) {
24411
24411
  const point = optionalTarget;
24412
24412
  if (t === 1) {
24413
24413
  point.copy(this.v2);
@@ -24421,7 +24421,7 @@ class LineCurve3 extends Curve {
24421
24421
  getPointAt(u, optionalTarget) {
24422
24422
  return this.getPoint(u, optionalTarget);
24423
24423
  }
24424
- getTangent(t, optionalTarget = new Vector3$1()) {
24424
+ getTangent(t, optionalTarget = new Vector3()) {
24425
24425
  return optionalTarget.subVectors(this.v2, this.v1).normalize();
24426
24426
  }
24427
24427
  getTangentAt(u, optionalTarget) {
@@ -24447,7 +24447,7 @@ class LineCurve3 extends Curve {
24447
24447
  }
24448
24448
  }
24449
24449
  class QuadraticBezierCurve extends Curve {
24450
- constructor(v0 = new Vector2$1(), v1 = new Vector2$1(), v2 = new Vector2$1()) {
24450
+ constructor(v0 = new Vector2(), v1 = new Vector2(), v2 = new Vector2()) {
24451
24451
  super();
24452
24452
  this.isQuadraticBezierCurve = true;
24453
24453
  this.type = "QuadraticBezierCurve";
@@ -24455,7 +24455,7 @@ class QuadraticBezierCurve extends Curve {
24455
24455
  this.v1 = v1;
24456
24456
  this.v2 = v2;
24457
24457
  }
24458
- getPoint(t, optionalTarget = new Vector2$1()) {
24458
+ getPoint(t, optionalTarget = new Vector2()) {
24459
24459
  const point = optionalTarget;
24460
24460
  const v0 = this.v0, v1 = this.v1, v2 = this.v2;
24461
24461
  point.set(
@@ -24487,7 +24487,7 @@ class QuadraticBezierCurve extends Curve {
24487
24487
  }
24488
24488
  }
24489
24489
  class QuadraticBezierCurve3 extends Curve {
24490
- constructor(v0 = new Vector3$1(), v1 = new Vector3$1(), v2 = new Vector3$1()) {
24490
+ constructor(v0 = new Vector3(), v1 = new Vector3(), v2 = new Vector3()) {
24491
24491
  super();
24492
24492
  this.isQuadraticBezierCurve3 = true;
24493
24493
  this.type = "QuadraticBezierCurve3";
@@ -24495,7 +24495,7 @@ class QuadraticBezierCurve3 extends Curve {
24495
24495
  this.v1 = v1;
24496
24496
  this.v2 = v2;
24497
24497
  }
24498
- getPoint(t, optionalTarget = new Vector3$1()) {
24498
+ getPoint(t, optionalTarget = new Vector3()) {
24499
24499
  const point = optionalTarget;
24500
24500
  const v0 = this.v0, v1 = this.v1, v2 = this.v2;
24501
24501
  point.set(
@@ -24534,7 +24534,7 @@ class SplineCurve extends Curve {
24534
24534
  this.type = "SplineCurve";
24535
24535
  this.points = points;
24536
24536
  }
24537
- getPoint(t, optionalTarget = new Vector2$1()) {
24537
+ getPoint(t, optionalTarget = new Vector2()) {
24538
24538
  const point = optionalTarget;
24539
24539
  const points = this.points;
24540
24540
  const p = (points.length - 1) * t;
@@ -24573,7 +24573,7 @@ class SplineCurve extends Curve {
24573
24573
  this.points = [];
24574
24574
  for (let i = 0, l = json.points.length; i < l; i++) {
24575
24575
  const point = json.points[i];
24576
- this.points.push(new Vector2$1().fromArray(point));
24576
+ this.points.push(new Vector2().fromArray(point));
24577
24577
  }
24578
24578
  return this;
24579
24579
  }
@@ -24725,7 +24725,7 @@ class Path extends CurvePath {
24725
24725
  constructor(points) {
24726
24726
  super();
24727
24727
  this.type = "Path";
24728
- this.currentPoint = new Vector2$1();
24728
+ this.currentPoint = new Vector2();
24729
24729
  if (points) {
24730
24730
  this.setFromPoints(points);
24731
24731
  }
@@ -24742,7 +24742,7 @@ class Path extends CurvePath {
24742
24742
  return this;
24743
24743
  }
24744
24744
  lineTo(x, y) {
24745
- const curve = new LineCurve(this.currentPoint.clone(), new Vector2$1(x, y));
24745
+ const curve = new LineCurve(this.currentPoint.clone(), new Vector2(x, y));
24746
24746
  this.curves.push(curve);
24747
24747
  this.currentPoint.set(x, y);
24748
24748
  return this;
@@ -24750,8 +24750,8 @@ class Path extends CurvePath {
24750
24750
  quadraticCurveTo(aCPx, aCPy, aX, aY) {
24751
24751
  const curve = new QuadraticBezierCurve(
24752
24752
  this.currentPoint.clone(),
24753
- new Vector2$1(aCPx, aCPy),
24754
- new Vector2$1(aX, aY)
24753
+ new Vector2(aCPx, aCPy),
24754
+ new Vector2(aX, aY)
24755
24755
  );
24756
24756
  this.curves.push(curve);
24757
24757
  this.currentPoint.set(aX, aY);
@@ -24760,9 +24760,9 @@ class Path extends CurvePath {
24760
24760
  bezierCurveTo(aCP1x, aCP1y, aCP2x, aCP2y, aX, aY) {
24761
24761
  const curve = new CubicBezierCurve(
24762
24762
  this.currentPoint.clone(),
24763
- new Vector2$1(aCP1x, aCP1y),
24764
- new Vector2$1(aCP2x, aCP2y),
24765
- new Vector2$1(aX, aY)
24763
+ new Vector2(aCP1x, aCP1y),
24764
+ new Vector2(aCP2x, aCP2y),
24765
+ new Vector2(aX, aY)
24766
24766
  );
24767
24767
  this.curves.push(curve);
24768
24768
  this.currentPoint.set(aX, aY);
@@ -24828,7 +24828,7 @@ class Path extends CurvePath {
24828
24828
  }
24829
24829
  }
24830
24830
  class LatheGeometry extends BufferGeometry {
24831
- constructor(points = [new Vector2$1(0, -0.5), new Vector2$1(0.5, 0), new Vector2$1(0, 0.5)], segments = 12, phiStart = 0, phiLength = Math.PI * 2) {
24831
+ 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) {
24832
24832
  super();
24833
24833
  this.type = "LatheGeometry";
24834
24834
  this.parameters = {
@@ -24845,11 +24845,11 @@ class LatheGeometry extends BufferGeometry {
24845
24845
  const initNormals = [];
24846
24846
  const normals = [];
24847
24847
  const inverseSegments = 1 / segments;
24848
- const vertex2 = new Vector3$1();
24849
- const uv = new Vector2$1();
24850
- const normal = new Vector3$1();
24851
- const curNormal = new Vector3$1();
24852
- const prevNormal = new Vector3$1();
24848
+ const vertex2 = new Vector3();
24849
+ const uv = new Vector2();
24850
+ const normal = new Vector3();
24851
+ const curNormal = new Vector3();
24852
+ const prevNormal = new Vector3();
24853
24853
  let dx = 0;
24854
24854
  let dy = 0;
24855
24855
  for (let j = 0; j <= points.length - 1; j++) {
@@ -24958,8 +24958,8 @@ class CircleGeometry extends BufferGeometry {
24958
24958
  const vertices = [];
24959
24959
  const normals = [];
24960
24960
  const uvs = [];
24961
- const vertex2 = new Vector3$1();
24962
- const uv = new Vector2$1();
24961
+ const vertex2 = new Vector3();
24962
+ const uv = new Vector2();
24963
24963
  vertices.push(0, 0, 0);
24964
24964
  normals.push(0, 0, 1);
24965
24965
  uvs.push(0.5, 0.5);
@@ -25025,8 +25025,8 @@ class CylinderGeometry extends BufferGeometry {
25025
25025
  this.setAttribute("normal", new Float32BufferAttribute(normals, 3));
25026
25026
  this.setAttribute("uv", new Float32BufferAttribute(uvs, 2));
25027
25027
  function generateTorso() {
25028
- const normal = new Vector3$1();
25029
- const vertex2 = new Vector3$1();
25028
+ const normal = new Vector3();
25029
+ const vertex2 = new Vector3();
25030
25030
  let groupCount = 0;
25031
25031
  const slope = (radiusBottom - radiusTop) / height;
25032
25032
  for (let y = 0; y <= heightSegments; y++) {
@@ -25070,8 +25070,8 @@ class CylinderGeometry extends BufferGeometry {
25070
25070
  }
25071
25071
  function generateCap(top) {
25072
25072
  const centerIndexStart = index2;
25073
- const uv = new Vector2$1();
25074
- const vertex2 = new Vector3$1();
25073
+ const uv = new Vector2();
25074
+ const vertex2 = new Vector3();
25075
25075
  let groupCount = 0;
25076
25076
  const radius = top === true ? radiusTop : radiusBottom;
25077
25077
  const sign2 = top === true ? 1 : -1;
@@ -25162,9 +25162,9 @@ class PolyhedronGeometry extends BufferGeometry {
25162
25162
  this.normalizeNormals();
25163
25163
  }
25164
25164
  function subdivide(detail2) {
25165
- const a = new Vector3$1();
25166
- const b = new Vector3$1();
25167
- const c = new Vector3$1();
25165
+ const a = new Vector3();
25166
+ const b = new Vector3();
25167
+ const c = new Vector3();
25168
25168
  for (let i = 0; i < indices.length; i += 3) {
25169
25169
  getVertexByIndex(indices[i + 0], a);
25170
25170
  getVertexByIndex(indices[i + 1], b);
@@ -25204,7 +25204,7 @@ class PolyhedronGeometry extends BufferGeometry {
25204
25204
  }
25205
25205
  }
25206
25206
  function applyRadius(radius2) {
25207
- const vertex2 = new Vector3$1();
25207
+ const vertex2 = new Vector3();
25208
25208
  for (let i = 0; i < vertexBuffer.length; i += 3) {
25209
25209
  vertex2.x = vertexBuffer[i + 0];
25210
25210
  vertex2.y = vertexBuffer[i + 1];
@@ -25216,7 +25216,7 @@ class PolyhedronGeometry extends BufferGeometry {
25216
25216
  }
25217
25217
  }
25218
25218
  function generateUVs() {
25219
- const vertex2 = new Vector3$1();
25219
+ const vertex2 = new Vector3();
25220
25220
  for (let i = 0; i < vertexBuffer.length; i += 3) {
25221
25221
  vertex2.x = vertexBuffer[i + 0];
25222
25222
  vertex2.y = vertexBuffer[i + 1];
@@ -25252,13 +25252,13 @@ class PolyhedronGeometry extends BufferGeometry {
25252
25252
  vertex2.z = vertices[stride + 2];
25253
25253
  }
25254
25254
  function correctUVs() {
25255
- const a = new Vector3$1();
25256
- const b = new Vector3$1();
25257
- const c = new Vector3$1();
25258
- const centroid = new Vector3$1();
25259
- const uvA = new Vector2$1();
25260
- const uvB = new Vector2$1();
25261
- const uvC = new Vector2$1();
25255
+ const a = new Vector3();
25256
+ const b = new Vector3();
25257
+ const c = new Vector3();
25258
+ const centroid = new Vector3();
25259
+ const uvA = new Vector2();
25260
+ const uvB = new Vector2();
25261
+ const uvC = new Vector2();
25262
25262
  for (let i = 0, j = 0; i < vertexBuffer.length; i += 9, j += 6) {
25263
25263
  a.set(vertexBuffer[i + 0], vertexBuffer[i + 1], vertexBuffer[i + 2]);
25264
25264
  b.set(vertexBuffer[i + 3], vertexBuffer[i + 4], vertexBuffer[i + 5]);
@@ -25488,9 +25488,9 @@ class DodecahedronGeometry extends PolyhedronGeometry {
25488
25488
  return new DodecahedronGeometry(data2.radius, data2.detail);
25489
25489
  }
25490
25490
  }
25491
- const _v0$3 = /* @__PURE__ */ new Vector3$1();
25492
- const _v1$1 = /* @__PURE__ */ new Vector3$1();
25493
- const _normal = /* @__PURE__ */ new Vector3$1();
25491
+ const _v0$3 = /* @__PURE__ */ new Vector3();
25492
+ const _v1$1 = /* @__PURE__ */ new Vector3();
25493
+ const _normal = /* @__PURE__ */ new Vector3();
25494
25494
  const _triangle = /* @__PURE__ */ new Triangle();
25495
25495
  class EdgesGeometry extends BufferGeometry {
25496
25496
  constructor(geometry = null, thresholdAngle = 1) {
@@ -26064,7 +26064,7 @@ function addContour(vertices, contour) {
26064
26064
  }
26065
26065
  }
26066
26066
  class ExtrudeGeometry extends BufferGeometry {
26067
- constructor(shapes = new Shape([new Vector2$1(0.5, 0.5), new Vector2$1(-0.5, 0.5), new Vector2$1(-0.5, -0.5), new Vector2$1(0.5, -0.5)]), options = {}) {
26067
+ 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 = {}) {
26068
26068
  super();
26069
26069
  this.type = "ExtrudeGeometry";
26070
26070
  this.parameters = {
@@ -26101,9 +26101,9 @@ class ExtrudeGeometry extends BufferGeometry {
26101
26101
  extrudeByPath = true;
26102
26102
  bevelEnabled = false;
26103
26103
  splineTube = extrudePath.computeFrenetFrames(steps, false);
26104
- binormal = new Vector3$1();
26105
- normal = new Vector3$1();
26106
- position2 = new Vector3$1();
26104
+ binormal = new Vector3();
26105
+ normal = new Vector3();
26106
+ position2 = new Vector3();
26107
26107
  }
26108
26108
  if (!bevelEnabled) {
26109
26109
  bevelSegments = 0;
@@ -26153,7 +26153,7 @@ class ExtrudeGeometry extends BufferGeometry {
26153
26153
  v_trans_y = ptPrevShift_y + v_prev_y * sf - inPt.y;
26154
26154
  const v_trans_lensq = v_trans_x * v_trans_x + v_trans_y * v_trans_y;
26155
26155
  if (v_trans_lensq <= 2) {
26156
- return new Vector2$1(v_trans_x, v_trans_y);
26156
+ return new Vector2(v_trans_x, v_trans_y);
26157
26157
  } else {
26158
26158
  shrink_by = Math.sqrt(v_trans_lensq / 2);
26159
26159
  }
@@ -26184,7 +26184,7 @@ class ExtrudeGeometry extends BufferGeometry {
26184
26184
  shrink_by = Math.sqrt(v_prev_lensq / 2);
26185
26185
  }
26186
26186
  }
26187
- return new Vector2$1(v_trans_x / shrink_by, v_trans_y / shrink_by);
26187
+ return new Vector2(v_trans_x / shrink_by, v_trans_y / shrink_by);
26188
26188
  }
26189
26189
  const contourMovements = [];
26190
26190
  for (let i = 0, il = contour.length, j = il - 1, k = i + 1; i < il; i++, j++, k++) {
@@ -26398,9 +26398,9 @@ const WorldUVGenerator = {
26398
26398
  const c_x = vertices[indexC * 3];
26399
26399
  const c_y = vertices[indexC * 3 + 1];
26400
26400
  return [
26401
- new Vector2$1(a_x, a_y),
26402
- new Vector2$1(b_x, b_y),
26403
- new Vector2$1(c_x, c_y)
26401
+ new Vector2(a_x, a_y),
26402
+ new Vector2(b_x, b_y),
26403
+ new Vector2(c_x, c_y)
26404
26404
  ];
26405
26405
  },
26406
26406
  generateSideWallUV: function(geometry, vertices, indexA, indexB, indexC, indexD) {
@@ -26418,17 +26418,17 @@ const WorldUVGenerator = {
26418
26418
  const d_z = vertices[indexD * 3 + 2];
26419
26419
  if (Math.abs(a_y - b_y) < Math.abs(a_x - b_x)) {
26420
26420
  return [
26421
- new Vector2$1(a_x, 1 - a_z),
26422
- new Vector2$1(b_x, 1 - b_z),
26423
- new Vector2$1(c_x, 1 - c_z),
26424
- new Vector2$1(d_x, 1 - d_z)
26421
+ new Vector2(a_x, 1 - a_z),
26422
+ new Vector2(b_x, 1 - b_z),
26423
+ new Vector2(c_x, 1 - c_z),
26424
+ new Vector2(d_x, 1 - d_z)
26425
26425
  ];
26426
26426
  } else {
26427
26427
  return [
26428
- new Vector2$1(a_y, 1 - a_z),
26429
- new Vector2$1(b_y, 1 - b_z),
26430
- new Vector2$1(c_y, 1 - c_z),
26431
- new Vector2$1(d_y, 1 - d_z)
26428
+ new Vector2(a_y, 1 - a_z),
26429
+ new Vector2(b_y, 1 - b_z),
26430
+ new Vector2(c_y, 1 - c_z),
26431
+ new Vector2(d_y, 1 - d_z)
26432
26432
  ];
26433
26433
  }
26434
26434
  }
@@ -26696,8 +26696,8 @@ class RingGeometry extends BufferGeometry {
26696
26696
  const uvs = [];
26697
26697
  let radius = innerRadius;
26698
26698
  const radiusStep = (outerRadius - innerRadius) / phiSegments;
26699
- const vertex2 = new Vector3$1();
26700
- const uv = new Vector2$1();
26699
+ const vertex2 = new Vector3();
26700
+ const uv = new Vector2();
26701
26701
  for (let j = 0; j <= phiSegments; j++) {
26702
26702
  for (let i = 0; i <= thetaSegments; i++) {
26703
26703
  const segment = thetaStart + i / thetaSegments * thetaLength;
@@ -26738,7 +26738,7 @@ class RingGeometry extends BufferGeometry {
26738
26738
  }
26739
26739
  }
26740
26740
  class ShapeGeometry extends BufferGeometry {
26741
- constructor(shapes = new Shape([new Vector2$1(0, 0.5), new Vector2$1(-0.5, -0.5), new Vector2$1(0.5, -0.5)]), curveSegments = 12) {
26741
+ constructor(shapes = new Shape([new Vector2(0, 0.5), new Vector2(-0.5, -0.5), new Vector2(0.5, -0.5)]), curveSegments = 12) {
26742
26742
  super();
26743
26743
  this.type = "ShapeGeometry";
26744
26744
  this.parameters = {
@@ -26849,8 +26849,8 @@ class SphereGeometry extends BufferGeometry {
26849
26849
  const thetaEnd = Math.min(thetaStart + thetaLength, Math.PI);
26850
26850
  let index2 = 0;
26851
26851
  const grid = [];
26852
- const vertex2 = new Vector3$1();
26853
- const normal = new Vector3$1();
26852
+ const vertex2 = new Vector3();
26853
+ const normal = new Vector3();
26854
26854
  const indices = [];
26855
26855
  const vertices = [];
26856
26856
  const normals = [];
@@ -26959,9 +26959,9 @@ class TorusGeometry extends BufferGeometry {
26959
26959
  const vertices = [];
26960
26960
  const normals = [];
26961
26961
  const uvs = [];
26962
- const center = new Vector3$1();
26963
- const vertex2 = new Vector3$1();
26964
- const normal = new Vector3$1();
26962
+ const center = new Vector3();
26963
+ const vertex2 = new Vector3();
26964
+ const normal = new Vector3();
26965
26965
  for (let j = 0; j <= radialSegments; j++) {
26966
26966
  for (let i = 0; i <= tubularSegments; i++) {
26967
26967
  const u = i / tubularSegments * arc;
@@ -27020,13 +27020,13 @@ class TorusKnotGeometry extends BufferGeometry {
27020
27020
  const vertices = [];
27021
27021
  const normals = [];
27022
27022
  const uvs = [];
27023
- const vertex2 = new Vector3$1();
27024
- const normal = new Vector3$1();
27025
- const P1 = new Vector3$1();
27026
- const P2 = new Vector3$1();
27027
- const B = new Vector3$1();
27028
- const T = new Vector3$1();
27029
- const N = new Vector3$1();
27023
+ const vertex2 = new Vector3();
27024
+ const normal = new Vector3();
27025
+ const P1 = new Vector3();
27026
+ const P2 = new Vector3();
27027
+ const B = new Vector3();
27028
+ const T = new Vector3();
27029
+ const N = new Vector3();
27030
27030
  for (let i = 0; i <= tubularSegments; ++i) {
27031
27031
  const u = i / tubularSegments * p * Math.PI * 2;
27032
27032
  calculatePositionOnCurve(u, p, q, radius, P1);
@@ -27085,7 +27085,7 @@ class TorusKnotGeometry extends BufferGeometry {
27085
27085
  }
27086
27086
  }
27087
27087
  class TubeGeometry extends BufferGeometry {
27088
- constructor(path = new QuadraticBezierCurve3(new Vector3$1(-1, -1, 0), new Vector3$1(-1, 1, 0), new Vector3$1(1, 1, 0)), tubularSegments = 64, radius = 1, radialSegments = 8, closed = false) {
27088
+ 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) {
27089
27089
  super();
27090
27090
  this.type = "TubeGeometry";
27091
27091
  this.parameters = {
@@ -27099,10 +27099,10 @@ class TubeGeometry extends BufferGeometry {
27099
27099
  this.tangents = frames.tangents;
27100
27100
  this.normals = frames.normals;
27101
27101
  this.binormals = frames.binormals;
27102
- const vertex2 = new Vector3$1();
27103
- const normal = new Vector3$1();
27104
- const uv = new Vector2$1();
27105
- let P = new Vector3$1();
27102
+ const vertex2 = new Vector3();
27103
+ const normal = new Vector3();
27104
+ const uv = new Vector2();
27105
+ let P = new Vector3();
27106
27106
  const vertices = [];
27107
27107
  const normals = [];
27108
27108
  const uvs = [];
@@ -27191,8 +27191,8 @@ class WireframeGeometry extends BufferGeometry {
27191
27191
  if (geometry !== null) {
27192
27192
  const vertices = [];
27193
27193
  const edges = /* @__PURE__ */ new Set();
27194
- const start = new Vector3$1();
27195
- const end = new Vector3$1();
27194
+ const start = new Vector3();
27195
+ const end = new Vector3();
27196
27196
  if (geometry.index !== null) {
27197
27197
  const position = geometry.attributes.position;
27198
27198
  const indices = geometry.index;
@@ -27321,7 +27321,7 @@ class MeshStandardMaterial extends Material {
27321
27321
  this.bumpScale = 1;
27322
27322
  this.normalMap = null;
27323
27323
  this.normalMapType = TangentSpaceNormalMap;
27324
- this.normalScale = new Vector2$1(1, 1);
27324
+ this.normalScale = new Vector2(1, 1);
27325
27325
  this.displacementMap = null;
27326
27326
  this.displacementScale = 1;
27327
27327
  this.displacementBias = 0;
@@ -27390,7 +27390,7 @@ class MeshPhysicalMaterial extends MeshStandardMaterial {
27390
27390
  this.clearcoatMap = null;
27391
27391
  this.clearcoatRoughness = 0;
27392
27392
  this.clearcoatRoughnessMap = null;
27393
- this.clearcoatNormalScale = new Vector2$1(1, 1);
27393
+ this.clearcoatNormalScale = new Vector2(1, 1);
27394
27394
  this.clearcoatNormalMap = null;
27395
27395
  this.ior = 1.5;
27396
27396
  Object.defineProperty(this, "reflectivity", {
@@ -27540,7 +27540,7 @@ class MeshPhongMaterial extends Material {
27540
27540
  this.bumpScale = 1;
27541
27541
  this.normalMap = null;
27542
27542
  this.normalMapType = TangentSpaceNormalMap;
27543
- this.normalScale = new Vector2$1(1, 1);
27543
+ this.normalScale = new Vector2(1, 1);
27544
27544
  this.displacementMap = null;
27545
27545
  this.displacementScale = 1;
27546
27546
  this.displacementBias = 0;
@@ -27616,7 +27616,7 @@ class MeshToonMaterial extends Material {
27616
27616
  this.bumpScale = 1;
27617
27617
  this.normalMap = null;
27618
27618
  this.normalMapType = TangentSpaceNormalMap;
27619
- this.normalScale = new Vector2$1(1, 1);
27619
+ this.normalScale = new Vector2(1, 1);
27620
27620
  this.displacementMap = null;
27621
27621
  this.displacementScale = 1;
27622
27622
  this.displacementBias = 0;
@@ -27666,7 +27666,7 @@ class MeshNormalMaterial extends Material {
27666
27666
  this.bumpScale = 1;
27667
27667
  this.normalMap = null;
27668
27668
  this.normalMapType = TangentSpaceNormalMap;
27669
- this.normalScale = new Vector2$1(1, 1);
27669
+ this.normalScale = new Vector2(1, 1);
27670
27670
  this.displacementMap = null;
27671
27671
  this.displacementScale = 1;
27672
27672
  this.displacementBias = 0;
@@ -27709,7 +27709,7 @@ class MeshLambertMaterial extends Material {
27709
27709
  this.bumpScale = 1;
27710
27710
  this.normalMap = null;
27711
27711
  this.normalMapType = TangentSpaceNormalMap;
27712
- this.normalScale = new Vector2$1(1, 1);
27712
+ this.normalScale = new Vector2(1, 1);
27713
27713
  this.displacementMap = null;
27714
27714
  this.displacementScale = 1;
27715
27715
  this.displacementBias = 0;
@@ -27826,7 +27826,7 @@ class MeshMatcapMaterial extends Material {
27826
27826
  this.bumpScale = 1;
27827
27827
  this.normalMap = null;
27828
27828
  this.normalMapType = TangentSpaceNormalMap;
27829
- this.normalScale = new Vector2$1(1, 1);
27829
+ this.normalScale = new Vector2(1, 1);
27830
27830
  this.displacementMap = null;
27831
27831
  this.displacementScale = 1;
27832
27832
  this.displacementBias = 0;
@@ -29346,8 +29346,8 @@ class HemisphereLight extends Light {
29346
29346
  }
29347
29347
  }
29348
29348
  const _projScreenMatrix$1 = /* @__PURE__ */ new Matrix4();
29349
- const _lightPositionWorld$1 = /* @__PURE__ */ new Vector3$1();
29350
- const _lookTarget$1 = /* @__PURE__ */ new Vector3$1();
29349
+ const _lightPositionWorld$1 = /* @__PURE__ */ new Vector3();
29350
+ const _lookTarget$1 = /* @__PURE__ */ new Vector3();
29351
29351
  class LightShadow {
29352
29352
  constructor(camera2) {
29353
29353
  this.camera = camera2;
@@ -29356,14 +29356,14 @@ class LightShadow {
29356
29356
  this.normalBias = 0;
29357
29357
  this.radius = 1;
29358
29358
  this.blurSamples = 8;
29359
- this.mapSize = new Vector2$1(512, 512);
29359
+ this.mapSize = new Vector2(512, 512);
29360
29360
  this.map = null;
29361
29361
  this.mapPass = null;
29362
29362
  this.matrix = new Matrix4();
29363
29363
  this.autoUpdate = true;
29364
29364
  this.needsUpdate = false;
29365
29365
  this._frustum = new Frustum();
29366
- this._frameExtents = new Vector2$1(1, 1);
29366
+ this._frameExtents = new Vector2(1, 1);
29367
29367
  this._viewportCount = 1;
29368
29368
  this._viewports = [
29369
29369
  new Vector4(0, 0, 1, 1)
@@ -29503,13 +29503,13 @@ class SpotLight extends Light {
29503
29503
  }
29504
29504
  }
29505
29505
  const _projScreenMatrix = /* @__PURE__ */ new Matrix4();
29506
- const _lightPositionWorld = /* @__PURE__ */ new Vector3$1();
29507
- const _lookTarget = /* @__PURE__ */ new Vector3$1();
29506
+ const _lightPositionWorld = /* @__PURE__ */ new Vector3();
29507
+ const _lookTarget = /* @__PURE__ */ new Vector3();
29508
29508
  class PointLightShadow extends LightShadow {
29509
29509
  constructor() {
29510
29510
  super(new PerspectiveCamera(90, 1, 0.5, 500));
29511
29511
  this.isPointLightShadow = true;
29512
- this._frameExtents = new Vector2$1(4, 2);
29512
+ this._frameExtents = new Vector2(4, 2);
29513
29513
  this._viewportCount = 6;
29514
29514
  this._viewports = [
29515
29515
  // These viewports map a cube-map onto a 2D texture with the
@@ -29538,20 +29538,20 @@ class PointLightShadow extends LightShadow {
29538
29538
  new Vector4(1, 0, 1, 1)
29539
29539
  ];
29540
29540
  this._cubeDirections = [
29541
- new Vector3$1(1, 0, 0),
29542
- new Vector3$1(-1, 0, 0),
29543
- new Vector3$1(0, 0, 1),
29544
- new Vector3$1(0, 0, -1),
29545
- new Vector3$1(0, 1, 0),
29546
- new Vector3$1(0, -1, 0)
29541
+ new Vector3(1, 0, 0),
29542
+ new Vector3(-1, 0, 0),
29543
+ new Vector3(0, 0, 1),
29544
+ new Vector3(0, 0, -1),
29545
+ new Vector3(0, 1, 0),
29546
+ new Vector3(0, -1, 0)
29547
29547
  ];
29548
29548
  this._cubeUps = [
29549
- new Vector3$1(0, 1, 0),
29550
- new Vector3$1(0, 1, 0),
29551
- new Vector3$1(0, 1, 0),
29552
- new Vector3$1(0, 1, 0),
29553
- new Vector3$1(0, 0, 1),
29554
- new Vector3$1(0, 0, -1)
29549
+ new Vector3(0, 1, 0),
29550
+ new Vector3(0, 1, 0),
29551
+ new Vector3(0, 1, 0),
29552
+ new Vector3(0, 1, 0),
29553
+ new Vector3(0, 0, 1),
29554
+ new Vector3(0, 0, -1)
29555
29555
  ];
29556
29556
  }
29557
29557
  updateMatrices(light, viewportIndex = 0) {
@@ -29752,7 +29752,7 @@ class SphericalHarmonics3 {
29752
29752
  this.isSphericalHarmonics3 = true;
29753
29753
  this.coefficients = [];
29754
29754
  for (let i = 0; i < 9; i++) {
29755
- this.coefficients.push(new Vector3$1());
29755
+ this.coefficients.push(new Vector3());
29756
29756
  }
29757
29757
  }
29758
29758
  set(coefficients) {
@@ -30015,10 +30015,10 @@ class MaterialLoader extends Loader {
30015
30015
  material.uniforms[name].value = new Color().setHex(uniform.value);
30016
30016
  break;
30017
30017
  case "v2":
30018
- material.uniforms[name].value = new Vector2$1().fromArray(uniform.value);
30018
+ material.uniforms[name].value = new Vector2().fromArray(uniform.value);
30019
30019
  break;
30020
30020
  case "v3":
30021
- material.uniforms[name].value = new Vector3$1().fromArray(uniform.value);
30021
+ material.uniforms[name].value = new Vector3().fromArray(uniform.value);
30022
30022
  break;
30023
30023
  case "v4":
30024
30024
  material.uniforms[name].value = new Vector4().fromArray(uniform.value);
@@ -30059,7 +30059,7 @@ class MaterialLoader extends Loader {
30059
30059
  if (Array.isArray(normalScale) === false) {
30060
30060
  normalScale = [normalScale, normalScale];
30061
30061
  }
30062
- material.normalScale = new Vector2$1().fromArray(normalScale);
30062
+ material.normalScale = new Vector2().fromArray(normalScale);
30063
30063
  }
30064
30064
  if (json.displacementMap !== void 0) material.displacementMap = getTexture(json.displacementMap);
30065
30065
  if (json.displacementScale !== void 0) material.displacementScale = json.displacementScale;
@@ -30084,7 +30084,7 @@ class MaterialLoader extends Loader {
30084
30084
  if (json.clearcoatMap !== void 0) material.clearcoatMap = getTexture(json.clearcoatMap);
30085
30085
  if (json.clearcoatRoughnessMap !== void 0) material.clearcoatRoughnessMap = getTexture(json.clearcoatRoughnessMap);
30086
30086
  if (json.clearcoatNormalMap !== void 0) material.clearcoatNormalMap = getTexture(json.clearcoatNormalMap);
30087
- if (json.clearcoatNormalScale !== void 0) material.clearcoatNormalScale = new Vector2$1().fromArray(json.clearcoatNormalScale);
30087
+ if (json.clearcoatNormalScale !== void 0) material.clearcoatNormalScale = new Vector2().fromArray(json.clearcoatNormalScale);
30088
30088
  if (json.iridescenceMap !== void 0) material.iridescenceMap = getTexture(json.iridescenceMap);
30089
30089
  if (json.iridescenceThicknessMap !== void 0) material.iridescenceThicknessMap = getTexture(json.iridescenceThicknessMap);
30090
30090
  if (json.transmissionMap !== void 0) material.transmissionMap = getTexture(json.transmissionMap);
@@ -30277,7 +30277,7 @@ class BufferGeometryLoader extends Loader {
30277
30277
  }
30278
30278
  const boundingSphere = json.data.boundingSphere;
30279
30279
  if (boundingSphere !== void 0) {
30280
- const center = new Vector3$1();
30280
+ const center = new Vector3();
30281
30281
  if (boundingSphere.center !== void 0) {
30282
30282
  center.fromArray(boundingSphere.center);
30283
30283
  }
@@ -30752,7 +30752,7 @@ class ObjectLoader extends Loader {
30752
30752
  object._visibility = data2.visibility;
30753
30753
  object._active = data2.active;
30754
30754
  object._bounds = data2.bounds.map((bound) => {
30755
- const box = new Box3$1();
30755
+ const box = new Box3();
30756
30756
  box.min.fromArray(bound.boxMin);
30757
30757
  box.max.fromArray(bound.boxMax);
30758
30758
  const sphere = new Sphere();
@@ -31113,10 +31113,10 @@ class Clock {
31113
31113
  function now() {
31114
31114
  return performance.now();
31115
31115
  }
31116
- const _position$1 = /* @__PURE__ */ new Vector3$1();
31116
+ const _position$1 = /* @__PURE__ */ new Vector3();
31117
31117
  const _quaternion$1 = /* @__PURE__ */ new Quaternion();
31118
- const _scale$1 = /* @__PURE__ */ new Vector3$1();
31119
- const _orientation$1 = /* @__PURE__ */ new Vector3$1();
31118
+ const _scale$1 = /* @__PURE__ */ new Vector3();
31119
+ const _orientation$1 = /* @__PURE__ */ new Vector3();
31120
31120
  class AudioListener extends Object3D$1 {
31121
31121
  constructor() {
31122
31122
  super();
@@ -31428,10 +31428,10 @@ class Audio extends Object3D$1 {
31428
31428
  return new this.constructor(this.listener).copy(this, recursive);
31429
31429
  }
31430
31430
  }
31431
- const _position = /* @__PURE__ */ new Vector3$1();
31431
+ const _position = /* @__PURE__ */ new Vector3();
31432
31432
  const _quaternion = /* @__PURE__ */ new Quaternion();
31433
- const _scale = /* @__PURE__ */ new Vector3$1();
31434
- const _orientation = /* @__PURE__ */ new Vector3$1();
31433
+ const _scale = /* @__PURE__ */ new Vector3();
31434
+ const _orientation = /* @__PURE__ */ new Vector3();
31435
31435
  class PositionalAudio extends Audio {
31436
31436
  constructor(listener2) {
31437
31437
  super(listener2);
@@ -33218,9 +33218,9 @@ class Matrix2 {
33218
33218
  return this;
33219
33219
  }
33220
33220
  }
33221
- const _vector$4 = /* @__PURE__ */ new Vector2$1();
33221
+ const _vector$4 = /* @__PURE__ */ new Vector2();
33222
33222
  class Box2 {
33223
- constructor(min2 = new Vector2$1(Infinity, Infinity), max2 = new Vector2$1(-Infinity, -Infinity)) {
33223
+ constructor(min2 = new Vector2(Infinity, Infinity), max2 = new Vector2(-Infinity, -Infinity)) {
33224
33224
  this.isBox2 = true;
33225
33225
  this.min = min2;
33226
33226
  this.max = max2;
@@ -33321,10 +33321,10 @@ class Box2 {
33321
33321
  return box.min.equals(this.min) && box.max.equals(this.max);
33322
33322
  }
33323
33323
  }
33324
- const _startP = /* @__PURE__ */ new Vector3$1();
33325
- const _startEnd = /* @__PURE__ */ new Vector3$1();
33324
+ const _startP = /* @__PURE__ */ new Vector3();
33325
+ const _startEnd = /* @__PURE__ */ new Vector3();
33326
33326
  class Line3 {
33327
- constructor(start = new Vector3$1(), end = new Vector3$1()) {
33327
+ constructor(start = new Vector3(), end = new Vector3()) {
33328
33328
  this.start = start;
33329
33329
  this.end = end;
33330
33330
  }
@@ -33380,7 +33380,7 @@ class Line3 {
33380
33380
  return new this.constructor().copy(this);
33381
33381
  }
33382
33382
  }
33383
- const _vector$3 = /* @__PURE__ */ new Vector3$1();
33383
+ const _vector$3 = /* @__PURE__ */ new Vector3();
33384
33384
  class SpotLightHelper extends Object3D$1 {
33385
33385
  constructor(light, color) {
33386
33386
  super();
@@ -33465,7 +33465,7 @@ class SpotLightHelper extends Object3D$1 {
33465
33465
  }
33466
33466
  }
33467
33467
  }
33468
- const _vector$2 = /* @__PURE__ */ new Vector3$1();
33468
+ const _vector$2 = /* @__PURE__ */ new Vector3();
33469
33469
  const _boneMatrix = /* @__PURE__ */ new Matrix4();
33470
33470
  const _matrixWorldInv = /* @__PURE__ */ new Matrix4();
33471
33471
  class SkeletonHelper extends LineSegments {
@@ -33556,7 +33556,7 @@ class PointLightHelper extends Mesh {
33556
33556
  }
33557
33557
  }
33558
33558
  }
33559
- const _vector$1 = /* @__PURE__ */ new Vector3$1();
33559
+ const _vector$1 = /* @__PURE__ */ new Vector3();
33560
33560
  const _color1 = /* @__PURE__ */ new Color();
33561
33561
  const _color2 = /* @__PURE__ */ new Color();
33562
33562
  class HemisphereLightHelper extends Object3D$1 {
@@ -33678,9 +33678,9 @@ class PolarGridHelper extends LineSegments {
33678
33678
  this.material.dispose();
33679
33679
  }
33680
33680
  }
33681
- const _v1 = /* @__PURE__ */ new Vector3$1();
33682
- const _v2 = /* @__PURE__ */ new Vector3$1();
33683
- const _v3 = /* @__PURE__ */ new Vector3$1();
33681
+ const _v1 = /* @__PURE__ */ new Vector3();
33682
+ const _v2 = /* @__PURE__ */ new Vector3();
33683
+ const _v3 = /* @__PURE__ */ new Vector3();
33684
33684
  class DirectionalLightHelper extends Object3D$1 {
33685
33685
  constructor(light, size, color) {
33686
33686
  super();
@@ -33741,7 +33741,7 @@ class DirectionalLightHelper extends Object3D$1 {
33741
33741
  this.targetLine.scale.z = _v3.length();
33742
33742
  }
33743
33743
  }
33744
- const _vector$d = /* @__PURE__ */ new Vector3$1();
33744
+ const _vector$d = /* @__PURE__ */ new Vector3();
33745
33745
  const _camera$1 = /* @__PURE__ */ new Camera$2();
33746
33746
  class CameraHelper extends LineSegments {
33747
33747
  constructor(camera2) {
@@ -33902,7 +33902,7 @@ function setPoint(point, pointMap, geometry, camera2, x, y, z) {
33902
33902
  }
33903
33903
  }
33904
33904
  }
33905
- const _box = /* @__PURE__ */ new Box3$1();
33905
+ const _box = /* @__PURE__ */ new Box3();
33906
33906
  class BoxHelper extends LineSegments {
33907
33907
  constructor(object, color = 16776960) {
33908
33908
  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]);
@@ -34026,11 +34026,11 @@ class PlaneHelper extends Line {
34026
34026
  this.children[0].material.dispose();
34027
34027
  }
34028
34028
  }
34029
- const _axis = /* @__PURE__ */ new Vector3$1();
34029
+ const _axis = /* @__PURE__ */ new Vector3();
34030
34030
  let _lineGeometry, _coneGeometry;
34031
34031
  class ArrowHelper extends Object3D$1 {
34032
34032
  // dir is assumed to be normalized
34033
- constructor(dir = new Vector3$1(0, 0, 1), origin = new Vector3$1(0, 0, 0), length = 1, color = 16776960, headLength = length * 0.2, headWidth = headLength * 0.2) {
34033
+ 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) {
34034
34034
  super();
34035
34035
  this.type = "ArrowHelper";
34036
34036
  if (_lineGeometry === void 0) {
@@ -34983,7 +34983,7 @@ const UniformsLib = {
34983
34983
  normalmap: {
34984
34984
  normalMap: { value: null },
34985
34985
  normalMapTransform: { value: /* @__PURE__ */ new Matrix3() },
34986
- normalScale: { value: /* @__PURE__ */ new Vector2$1(1, 1) }
34986
+ normalScale: { value: /* @__PURE__ */ new Vector2(1, 1) }
34987
34987
  },
34988
34988
  displacementmap: {
34989
34989
  displacementMap: { value: null },
@@ -35093,7 +35093,7 @@ const UniformsLib = {
35093
35093
  sprite: {
35094
35094
  diffuse: { value: /* @__PURE__ */ new Color(16777215) },
35095
35095
  opacity: { value: 1 },
35096
- center: { value: /* @__PURE__ */ new Vector2$1(0.5, 0.5) },
35096
+ center: { value: /* @__PURE__ */ new Vector2(0.5, 0.5) },
35097
35097
  rotation: { value: 0 },
35098
35098
  map: { value: null },
35099
35099
  mapTransform: { value: /* @__PURE__ */ new Matrix3() },
@@ -35305,7 +35305,7 @@ const ShaderLib = {
35305
35305
  UniformsLib.common,
35306
35306
  UniformsLib.displacementmap,
35307
35307
  {
35308
- referencePosition: { value: /* @__PURE__ */ new Vector3$1() },
35308
+ referencePosition: { value: /* @__PURE__ */ new Vector3() },
35309
35309
  nearDistance: { value: 1 },
35310
35310
  farDistance: { value: 1e3 }
35311
35311
  }
@@ -35335,7 +35335,7 @@ ShaderLib.physical = {
35335
35335
  clearcoatMapTransform: { value: /* @__PURE__ */ new Matrix3() },
35336
35336
  clearcoatNormalMap: { value: null },
35337
35337
  clearcoatNormalMapTransform: { value: /* @__PURE__ */ new Matrix3() },
35338
- clearcoatNormalScale: { value: /* @__PURE__ */ new Vector2$1(1, 1) },
35338
+ clearcoatNormalScale: { value: /* @__PURE__ */ new Vector2(1, 1) },
35339
35339
  clearcoatRoughness: { value: 0 },
35340
35340
  clearcoatRoughnessMap: { value: null },
35341
35341
  clearcoatRoughnessMapTransform: { value: /* @__PURE__ */ new Matrix3() },
@@ -35358,7 +35358,7 @@ ShaderLib.physical = {
35358
35358
  transmission: { value: 0 },
35359
35359
  transmissionMap: { value: null },
35360
35360
  transmissionMapTransform: { value: /* @__PURE__ */ new Matrix3() },
35361
- transmissionSamplerSize: { value: /* @__PURE__ */ new Vector2$1() },
35361
+ transmissionSamplerSize: { value: /* @__PURE__ */ new Vector2() },
35362
35362
  transmissionSamplerMap: { value: null },
35363
35363
  thickness: { value: 0 },
35364
35364
  thicknessMap: { value: null },
@@ -35371,7 +35371,7 @@ ShaderLib.physical = {
35371
35371
  specularIntensity: { value: 1 },
35372
35372
  specularIntensityMap: { value: null },
35373
35373
  specularIntensityMapTransform: { value: /* @__PURE__ */ new Matrix3() },
35374
- anisotropyVector: { value: /* @__PURE__ */ new Vector2$1() },
35374
+ anisotropyVector: { value: /* @__PURE__ */ new Vector2() },
35375
35375
  anisotropyMap: { value: null },
35376
35376
  anisotropyMapTransform: { value: /* @__PURE__ */ new Matrix3() }
35377
35377
  }
@@ -36142,16 +36142,16 @@ let _oldXrEnabled = false;
36142
36142
  const PHI = (1 + Math.sqrt(5)) / 2;
36143
36143
  const INV_PHI = 1 / PHI;
36144
36144
  const _axisDirections = [
36145
- /* @__PURE__ */ new Vector3$1(-PHI, INV_PHI, 0),
36146
- /* @__PURE__ */ new Vector3$1(PHI, INV_PHI, 0),
36147
- /* @__PURE__ */ new Vector3$1(-INV_PHI, 0, PHI),
36148
- /* @__PURE__ */ new Vector3$1(INV_PHI, 0, PHI),
36149
- /* @__PURE__ */ new Vector3$1(0, PHI, -INV_PHI),
36150
- /* @__PURE__ */ new Vector3$1(0, PHI, INV_PHI),
36151
- /* @__PURE__ */ new Vector3$1(-1, 1, -1),
36152
- /* @__PURE__ */ new Vector3$1(1, 1, -1),
36153
- /* @__PURE__ */ new Vector3$1(-1, 1, 1),
36154
- /* @__PURE__ */ new Vector3$1(1, 1, 1)
36145
+ /* @__PURE__ */ new Vector3(-PHI, INV_PHI, 0),
36146
+ /* @__PURE__ */ new Vector3(PHI, INV_PHI, 0),
36147
+ /* @__PURE__ */ new Vector3(-INV_PHI, 0, PHI),
36148
+ /* @__PURE__ */ new Vector3(INV_PHI, 0, PHI),
36149
+ /* @__PURE__ */ new Vector3(0, PHI, -INV_PHI),
36150
+ /* @__PURE__ */ new Vector3(0, PHI, INV_PHI),
36151
+ /* @__PURE__ */ new Vector3(-1, 1, -1),
36152
+ /* @__PURE__ */ new Vector3(1, 1, -1),
36153
+ /* @__PURE__ */ new Vector3(-1, 1, 1),
36154
+ /* @__PURE__ */ new Vector3(1, 1, 1)
36155
36155
  ];
36156
36156
  class PMREMGenerator {
36157
36157
  constructor(renderer) {
@@ -36552,7 +36552,7 @@ function _setViewport(target, x, y, width, height) {
36552
36552
  }
36553
36553
  function _getBlurShader(lodMax, width, height) {
36554
36554
  const weights = new Float32Array(MAX_SAMPLES);
36555
- const poleAxis = new Vector3$1(0, 1, 0);
36555
+ const poleAxis = new Vector3(0, 1, 0);
36556
36556
  const shaderMaterial = new ShaderMaterial({
36557
36557
  name: "SphericalGaussianBlur",
36558
36558
  defines: {
@@ -37144,7 +37144,7 @@ function WebGLMorphtargets(gl, capabilities, textures) {
37144
37144
  entry = {
37145
37145
  count: morphTargetsCount,
37146
37146
  texture,
37147
- size: new Vector2$1(width, height)
37147
+ size: new Vector2(width, height)
37148
37148
  };
37149
37149
  morphTextures.set(geometry, entry);
37150
37150
  geometry.addEventListener("dispose", disposeTexture);
@@ -37955,7 +37955,7 @@ function getToneMappingFunction(functionName2, toneMapping) {
37955
37955
  }
37956
37956
  return "vec3 " + functionName2 + "( vec3 color ) { return " + toneMappingName + "ToneMapping( color ); }";
37957
37957
  }
37958
- const _v0 = /* @__PURE__ */ new Vector3$1();
37958
+ const _v0 = /* @__PURE__ */ new Vector3();
37959
37959
  function getLuminanceFunction() {
37960
37960
  ColorManagement.getLuminanceCoefficients(_v0);
37961
37961
  const r = _v0.x.toFixed(4);
@@ -39211,14 +39211,14 @@ function UniformsCache() {
39211
39211
  switch (light.type) {
39212
39212
  case "DirectionalLight":
39213
39213
  uniforms = {
39214
- direction: new Vector3$1(),
39214
+ direction: new Vector3(),
39215
39215
  color: new Color()
39216
39216
  };
39217
39217
  break;
39218
39218
  case "SpotLight":
39219
39219
  uniforms = {
39220
- position: new Vector3$1(),
39221
- direction: new Vector3$1(),
39220
+ position: new Vector3(),
39221
+ direction: new Vector3(),
39222
39222
  color: new Color(),
39223
39223
  distance: 0,
39224
39224
  coneCos: 0,
@@ -39228,7 +39228,7 @@ function UniformsCache() {
39228
39228
  break;
39229
39229
  case "PointLight":
39230
39230
  uniforms = {
39231
- position: new Vector3$1(),
39231
+ position: new Vector3(),
39232
39232
  color: new Color(),
39233
39233
  distance: 0,
39234
39234
  decay: 0
@@ -39236,7 +39236,7 @@ function UniformsCache() {
39236
39236
  break;
39237
39237
  case "HemisphereLight":
39238
39238
  uniforms = {
39239
- direction: new Vector3$1(),
39239
+ direction: new Vector3(),
39240
39240
  skyColor: new Color(),
39241
39241
  groundColor: new Color()
39242
39242
  };
@@ -39244,9 +39244,9 @@ function UniformsCache() {
39244
39244
  case "RectAreaLight":
39245
39245
  uniforms = {
39246
39246
  color: new Color(),
39247
- position: new Vector3$1(),
39248
- halfWidth: new Vector3$1(),
39249
- halfHeight: new Vector3$1()
39247
+ position: new Vector3(),
39248
+ halfWidth: new Vector3(),
39249
+ halfHeight: new Vector3()
39250
39250
  };
39251
39251
  break;
39252
39252
  }
@@ -39270,7 +39270,7 @@ function ShadowUniformsCache() {
39270
39270
  shadowBias: 0,
39271
39271
  shadowNormalBias: 0,
39272
39272
  shadowRadius: 1,
39273
- shadowMapSize: new Vector2$1()
39273
+ shadowMapSize: new Vector2()
39274
39274
  };
39275
39275
  break;
39276
39276
  case "SpotLight":
@@ -39279,7 +39279,7 @@ function ShadowUniformsCache() {
39279
39279
  shadowBias: 0,
39280
39280
  shadowNormalBias: 0,
39281
39281
  shadowRadius: 1,
39282
- shadowMapSize: new Vector2$1()
39282
+ shadowMapSize: new Vector2()
39283
39283
  };
39284
39284
  break;
39285
39285
  case "PointLight":
@@ -39288,7 +39288,7 @@ function ShadowUniformsCache() {
39288
39288
  shadowBias: 0,
39289
39289
  shadowNormalBias: 0,
39290
39290
  shadowRadius: 1,
39291
- shadowMapSize: new Vector2$1(),
39291
+ shadowMapSize: new Vector2(),
39292
39292
  shadowCameraNear: 1,
39293
39293
  shadowCameraFar: 1e3
39294
39294
  };
@@ -39342,8 +39342,8 @@ function WebGLLights(extensions) {
39342
39342
  numSpotLightShadowsWithMaps: 0,
39343
39343
  numLightProbes: 0
39344
39344
  };
39345
- for (let i = 0; i < 9; i++) state.probe.push(new Vector3$1());
39346
- const vector3 = new Vector3$1();
39345
+ for (let i = 0; i < 9; i++) state.probe.push(new Vector3());
39346
+ const vector3 = new Vector3();
39347
39347
  const matrix4 = new Matrix4();
39348
39348
  const matrix42 = new Matrix4();
39349
39349
  function setup(lights) {
@@ -39628,7 +39628,7 @@ const vertex = "void main() {\n gl_Position = vec4( position, 1.0 );\n}";
39628
39628
  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}";
39629
39629
  function WebGLShadowMap(renderer, objects, capabilities) {
39630
39630
  let _frustum2 = new Frustum();
39631
- const _shadowMapSize = new Vector2$1(), _viewportSize = new Vector2$1(), _viewport = new Vector4(), _depthMaterial = new MeshDepthMaterial({ depthPacking: RGBADepthPacking }), _distanceMaterial = new MeshDistanceMaterial(), _materialCache = {}, _maxTextureSize = capabilities.maxTextureSize;
39631
+ const _shadowMapSize = new Vector2(), _viewportSize = new Vector2(), _viewport = new Vector4(), _depthMaterial = new MeshDepthMaterial({ depthPacking: RGBADepthPacking }), _distanceMaterial = new MeshDistanceMaterial(), _materialCache = {}, _maxTextureSize = capabilities.maxTextureSize;
39632
39632
  const shadowSide = { [FrontSide]: BackSide, [BackSide]: FrontSide, [DoubleSide]: DoubleSide };
39633
39633
  const shadowMaterialVertical = new ShaderMaterial({
39634
39634
  defines: {
@@ -39636,7 +39636,7 @@ function WebGLShadowMap(renderer, objects, capabilities) {
39636
39636
  },
39637
39637
  uniforms: {
39638
39638
  shadow_pass: { value: null },
39639
- resolution: { value: new Vector2$1() },
39639
+ resolution: { value: new Vector2() },
39640
39640
  radius: { value: 4 }
39641
39641
  },
39642
39642
  vertexShader: vertex,
@@ -40612,7 +40612,7 @@ function WebGLState(gl, extensions) {
40612
40612
  function WebGLTextures(_gl, extensions, state, properties, capabilities, utils, info) {
40613
40613
  const multisampledRTTExt = extensions.has("WEBGL_multisampled_render_to_texture") ? extensions.get("WEBGL_multisampled_render_to_texture") : null;
40614
40614
  const supportsInvalidateFramebuffer = typeof navigator === "undefined" ? false : /OculusBrowser/g.test(navigator.userAgent);
40615
- const _imageDimensions = new Vector2$1();
40615
+ const _imageDimensions = new Vector2();
40616
40616
  const _videoTextures = /* @__PURE__ */ new WeakMap();
40617
40617
  let _canvas2;
40618
40618
  const _sources = /* @__PURE__ */ new WeakMap();
@@ -41886,9 +41886,9 @@ class WebXRController {
41886
41886
  this._targetRay.matrixAutoUpdate = false;
41887
41887
  this._targetRay.visible = false;
41888
41888
  this._targetRay.hasLinearVelocity = false;
41889
- this._targetRay.linearVelocity = new Vector3$1();
41889
+ this._targetRay.linearVelocity = new Vector3();
41890
41890
  this._targetRay.hasAngularVelocity = false;
41891
- this._targetRay.angularVelocity = new Vector3$1();
41891
+ this._targetRay.angularVelocity = new Vector3();
41892
41892
  }
41893
41893
  return this._targetRay;
41894
41894
  }
@@ -41898,9 +41898,9 @@ class WebXRController {
41898
41898
  this._grip.matrixAutoUpdate = false;
41899
41899
  this._grip.visible = false;
41900
41900
  this._grip.hasLinearVelocity = false;
41901
- this._grip.linearVelocity = new Vector3$1();
41901
+ this._grip.linearVelocity = new Vector3();
41902
41902
  this._grip.hasAngularVelocity = false;
41903
- this._grip.angularVelocity = new Vector3$1();
41903
+ this._grip.angularVelocity = new Vector3();
41904
41904
  }
41905
41905
  return this._grip;
41906
41906
  }
@@ -42144,7 +42144,7 @@ class WebXRManager extends EventDispatcher {
42144
42144
  let newRenderTarget = null;
42145
42145
  const controllers = [];
42146
42146
  const controllerInputSources = [];
42147
- const currentSize = new Vector2$1();
42147
+ const currentSize = new Vector2();
42148
42148
  let currentPixelRatio = null;
42149
42149
  const cameraL = new PerspectiveCamera();
42150
42150
  cameraL.viewport = new Vector4();
@@ -42374,8 +42374,8 @@ class WebXRManager extends EventDispatcher {
42374
42374
  }
42375
42375
  }
42376
42376
  }
42377
- const cameraLPos = new Vector3$1();
42378
- const cameraRPos = new Vector3$1();
42377
+ const cameraLPos = new Vector3();
42378
+ const cameraRPos = new Vector3();
42379
42379
  function setProjectionFromUnion(camera2, cameraL2, cameraR2) {
42380
42380
  cameraLPos.setFromMatrixPosition(cameraL2.matrixWorld);
42381
42381
  cameraRPos.setFromMatrixPosition(cameraR2.matrixWorld);
@@ -43168,7 +43168,7 @@ let WebGLRenderer$1 = class WebGLRenderer {
43168
43168
  let _localClippingEnabled = false;
43169
43169
  const _currentProjectionMatrix = new Matrix4();
43170
43170
  const _projScreenMatrix2 = new Matrix4();
43171
- const _vector32 = new Vector3$1();
43171
+ const _vector32 = new Vector3();
43172
43172
  const _vector4 = new Vector4();
43173
43173
  const _emptyScene = { background: null, fog: null, environment: null, overrideMaterial: null, isScene: true };
43174
43174
  let _renderBackground = false;
@@ -44642,7 +44642,7 @@ const three_module = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.define
44642
44642
  Bone,
44643
44643
  BooleanKeyframeTrack,
44644
44644
  Box2,
44645
- Box3: Box3$1,
44645
+ Box3,
44646
44646
  Box3Helper,
44647
44647
  BoxGeometry,
44648
44648
  BoxHelper,
@@ -45002,8 +45002,8 @@ const three_module = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.define
45002
45002
  UnsignedShort5551Type,
45003
45003
  UnsignedShortType,
45004
45004
  VSMShadowMap,
45005
- Vector2: Vector2$1,
45006
- Vector3: Vector3$1,
45005
+ Vector2,
45006
+ Vector3,
45007
45007
  Vector4,
45008
45008
  VectorKeyframeTrack,
45009
45009
  VideoTexture,
@@ -45178,7 +45178,7 @@ var Geometry;
45178
45178
  let vertex2 = 0;
45179
45179
  let offset = 0;
45180
45180
  const matrix = new Matrix4();
45181
- const vector = new Vector3$1();
45181
+ const vector = new Vector3();
45182
45182
  for (let i = 0; i < info.instances.length; i++) {
45183
45183
  const instance = info.instances[i];
45184
45184
  const mesh = g3d2.getInstanceMesh(instance);
@@ -45209,7 +45209,7 @@ var Geometry;
45209
45209
  vector.applyMatrix4(matrix);
45210
45210
  vector.toArray(buffer.vertices, vertex2);
45211
45211
  vertex2 += distExports$2.G3d.POSITION_SIZE;
45212
- buffer.boxes[i] = new Box3$1(vector.clone(), vector.clone());
45212
+ buffer.boxes[i] = new Box3(vector.clone(), vector.clone());
45213
45213
  }
45214
45214
  for (let p = vertexStart + 1; p < vertexEnd; p++) {
45215
45215
  vector.fromArray(g3d2.positions, p * distExports$2.G3d.POSITION_SIZE);
@@ -45281,8 +45281,8 @@ var Geometry;
45281
45281
  Geometry2.MergeResult = MergeResult;
45282
45282
  })(Geometry || (Geometry = {}));
45283
45283
  const defaultConfig = {
45284
- position: new Vector3$1(),
45285
- rotation: new Vector3$1(),
45284
+ position: new Vector3(),
45285
+ rotation: new Vector3(),
45286
45286
  scale: 1,
45287
45287
  matrix: void 0,
45288
45288
  transparency: "all",
@@ -45304,7 +45304,7 @@ function getFullSettings$1(options) {
45304
45304
  merge.rotation.z * Math.PI / 180
45305
45305
  )
45306
45306
  ),
45307
- new Vector3$1(merge.scale, merge.scale, merge.scale)
45307
+ new Vector3(merge.scale, merge.scale, merge.scale)
45308
45308
  );
45309
45309
  return merge;
45310
45310
  }
@@ -45765,7 +45765,7 @@ class Object3D2 {
45765
45765
  * A new instance is created if none is provided.
45766
45766
  * @returns {THREE.Vector3 | undefined} The center position of the object, or undefined if the object has no geometry.
45767
45767
  */
45768
- getCenter(target = new Vector3$1()) {
45768
+ getCenter(target = new Vector3()) {
45769
45769
  var _a2;
45770
45770
  return (_a2 = this.getBoundingBox()) == null ? void 0 : _a2.getCenter(target);
45771
45771
  }
@@ -47308,12 +47308,12 @@ function estimateBytesUsed(geometry) {
47308
47308
  }
47309
47309
  function getAverageBoundingBox(positions, thresholdSpan = 1e3, framingDistanceMultiplier = 2) {
47310
47310
  if (positions.length === 0) {
47311
- return new Box3$1();
47311
+ return new Box3();
47312
47312
  }
47313
47313
  const { centroid, aabb } = calculateCentroidAndBoundingBox(positions);
47314
- const span = aabb.getSize(new Vector3$1()).length();
47315
- const center = span > thresholdSpan ? centroid : aabb.getCenter(new Vector3$1());
47316
- const avgDist = new Vector3$1();
47314
+ const span = aabb.getSize(new Vector3()).length();
47315
+ const center = span > thresholdSpan ? centroid : aabb.getCenter(new Vector3());
47316
+ const avgDist = new Vector3();
47317
47317
  for (const pos of positions) {
47318
47318
  avgDist.set(
47319
47319
  avgDist.x + Math.abs(pos.x - center.x),
@@ -47322,14 +47322,14 @@ function getAverageBoundingBox(positions, thresholdSpan = 1e3, framingDistanceMu
47322
47322
  );
47323
47323
  }
47324
47324
  const scaledDist = avgDist.multiplyScalar(framingDistanceMultiplier / positions.length);
47325
- return new Box3$1(
47325
+ return new Box3(
47326
47326
  center.clone().sub(scaledDist),
47327
47327
  center.clone().add(scaledDist)
47328
47328
  );
47329
47329
  }
47330
47330
  function calculateCentroidAndBoundingBox(positions) {
47331
- const sum = new Vector3$1();
47332
- const aabb = new Box3$1();
47331
+ const sum = new Vector3();
47332
+ const aabb = new Box3();
47333
47333
  for (const pos of positions) {
47334
47334
  sum.add(pos);
47335
47335
  aabb.expandByPoint(pos);
@@ -47374,7 +47374,7 @@ class Scene2 {
47374
47374
  /**
47375
47375
  * Returns the scene bounding box. Returns undefined if scene is empty.
47376
47376
  */
47377
- getBoundingBox(target = new Box3$1()) {
47377
+ getBoundingBox(target = new Box3()) {
47378
47378
  return this._boundingBox ? target.copy(this._boundingBox) : void 0;
47379
47379
  }
47380
47380
  /**
@@ -47389,7 +47389,7 @@ class Scene2 {
47389
47389
  this.meshes.forEach((m) => {
47390
47390
  const subs = m.getSubmeshes();
47391
47391
  subs.forEach((s) => {
47392
- const p = s.boundingBox.getCenter(new Vector3$1());
47392
+ const p = s.boundingBox.getCenter(new Vector3());
47393
47393
  p.applyMatrix4(this._matrix);
47394
47394
  points.push(p);
47395
47395
  });
@@ -47565,11 +47565,11 @@ class GeometrySubmesh {
47565
47565
  __publicField(this, "instance");
47566
47566
  __publicField(this, "start");
47567
47567
  __publicField(this, "end");
47568
- __publicField(this, "boundingBox", new Box3$1());
47568
+ __publicField(this, "boundingBox", new Box3());
47569
47569
  }
47570
47570
  expandBox(point) {
47571
47571
  var _a2;
47572
- this.boundingBox = ((_a2 = this.boundingBox) == null ? void 0 : _a2.expandByPoint(point)) ?? new Box3$1().set(point, point);
47572
+ this.boundingBox = ((_a2 = this.boundingBox) == null ? void 0 : _a2.expandByPoint(point)) ?? new Box3().set(point, point);
47573
47573
  }
47574
47574
  }
47575
47575
  class InsertableGeometry {
@@ -47629,7 +47629,7 @@ class InsertableGeometry {
47629
47629
  return added;
47630
47630
  }
47631
47631
  const matrix = new Matrix4();
47632
- const vector = new Vector3$1();
47632
+ const vector = new Vector3();
47633
47633
  const vertexStart = mesh.getVertexStart(section);
47634
47634
  const vertexEnd = mesh.getVertexEnd(section);
47635
47635
  const vertexCount = vertexEnd - vertexStart;
@@ -47703,7 +47703,7 @@ class InsertableGeometry {
47703
47703
  return added;
47704
47704
  }
47705
47705
  const matrix = new Matrix4();
47706
- const vector = new Vector3$1();
47706
+ const vector = new Vector3();
47707
47707
  const indexOffset = this.offsets.getIndexOffset(mesh);
47708
47708
  const vertexOffset = this.offsets.getVertexOffset(mesh);
47709
47709
  const vertexStart = g3d2.getMeshVertexStart(meshG3dIndex);
@@ -48075,7 +48075,7 @@ function createGhostMaterial() {
48075
48075
  // Uniform controlling the overall transparency of the non-visible objects.
48076
48076
  opacity: { value: 1e-3 },
48077
48077
  // Uniform specifying the fill color for non-visible objects.
48078
- fillColor: { value: new Vector3$1(0, 0, 0) }
48078
+ fillColor: { value: new Vector3(0, 0, 0) }
48079
48079
  },
48080
48080
  // Render only the front side of faces to prevent drawing internal geometry.
48081
48081
  side: FrontSide,
@@ -48142,7 +48142,7 @@ class OutlineMaterial {
48142
48142
  this.material = createOutlineMaterial();
48143
48143
  this._antialias = (options == null ? void 0 : options.antialias) ?? false;
48144
48144
  this._precision = (options == null ? void 0 : options.precision) ?? 1;
48145
- this._resolution = (options == null ? void 0 : options.resolution) ?? new Vector2$1(1, 1);
48145
+ this._resolution = (options == null ? void 0 : options.resolution) ?? new Vector2(1, 1);
48146
48146
  this.resolution = this._resolution;
48147
48147
  if (options == null ? void 0 : options.sceneBuffer) {
48148
48148
  this.sceneBuffer = options.sceneBuffer;
@@ -48583,7 +48583,7 @@ class SkyboxMaterial extends ShaderMaterial {
48583
48583
 
48584
48584
  void main() {
48585
48585
  // Define the up vector
48586
- vec3 up = vec3(0.0, 1.0, 0.0);
48586
+ vec3 up = vec3(0.0, 0.0, 1.0);
48587
48587
 
48588
48588
  // Calculate the direction from the pixel to the camera
48589
48589
  vec3 directionToCamera = normalize(vCameraPosition - vPosition);
@@ -49099,7 +49099,7 @@ class InstancedMesh2 {
49099
49099
  this.bimInstances = g3d2 instanceof distExports$2.G3dMesh ? instances.map((i) => g3d2.scene.instanceNodes[i]) : instances;
49100
49100
  this.meshInstances = instances;
49101
49101
  this.boxes = g3d2 instanceof distExports$2.G3dMesh ? this.importBoundingBoxes() : this.computeBoundingBoxes();
49102
- this.size = ((_a2 = this.boxes[0]) == null ? void 0 : _a2.getSize(new Vector3$1()).length()) ?? 0;
49102
+ this.size = ((_a2 = this.boxes[0]) == null ? void 0 : _a2.getSize(new Vector3()).length()) ?? 0;
49103
49103
  this.boundingBox = this.computeBoundingBox(this.boxes);
49104
49104
  this._material = this.mesh.material;
49105
49105
  }
@@ -49147,7 +49147,7 @@ class InstancedMesh2 {
49147
49147
  if (this.g3dMesh instanceof distExports$2.G3d) throw new Error("Wrong type");
49148
49148
  const boxes = new Array(this.meshInstances.length);
49149
49149
  for (let i = 0; i < this.meshInstances.length; i++) {
49150
- const box = new Box3$1();
49150
+ const box = new Box3();
49151
49151
  const instance = this.meshInstances[i];
49152
49152
  box.min.fromArray(this.g3dMesh.scene.getInstanceMin(instance));
49153
49153
  box.max.fromArray(this.g3dMesh.scene.getInstanceMax(instance));
@@ -49692,8 +49692,8 @@ class G3dSubset {
49692
49692
  if (this._source instanceof distExports$2.G3d) {
49693
49693
  throw new Error("Feature requires a vimx file");
49694
49694
  }
49695
- const min2 = new Vector3$1();
49696
- const max2 = new Vector3$1();
49695
+ const min2 = new Vector3();
49696
+ const max2 = new Vector3();
49697
49697
  const values = new Array(this._instances.length);
49698
49698
  for (let i = 0; i < this._instances.length; i++) {
49699
49699
  const instance = this._instances[i];
@@ -49808,7 +49808,7 @@ class G3dSubset {
49808
49808
  getBoundingBox() {
49809
49809
  if (this._instances.length === 0) return;
49810
49810
  if (this._source instanceof distExports$2.G3dScene) {
49811
- const box = new Box3$1();
49811
+ const box = new Box3();
49812
49812
  const first = this._instances[0];
49813
49813
  box.min.fromArray(this._source.getInstanceMin(first));
49814
49814
  box.max.fromArray(this._source.getInstanceMax(first));
@@ -50245,14 +50245,14 @@ const defaultViewerSettings = {
50245
50245
  },
50246
50246
  camera: {
50247
50247
  orthographic: false,
50248
- allowedMovement: new Vector3$1(1, 1, 1),
50249
- allowedRotation: new Vector2$1(1, 1),
50248
+ allowedMovement: new Vector3(1, 1, 1),
50249
+ allowedRotation: new Vector2(1, 1),
50250
50250
  near: 1e-3,
50251
50251
  far: 15e3,
50252
50252
  fov: 50,
50253
50253
  zoom: 1,
50254
50254
  // 45 deg down looking down z.
50255
- forward: new Vector3$1(1, -1, -1),
50255
+ forward: new Vector3(1, -1, -1),
50256
50256
  controls: {
50257
50257
  orbit: true,
50258
50258
  rotateSpeed: 1,
@@ -50285,13 +50285,13 @@ const defaultViewerSettings = {
50285
50285
  sunlights: [
50286
50286
  {
50287
50287
  followCamera: true,
50288
- position: new Vector3$1(1e3, 1e3, 1e3),
50288
+ position: new Vector3(1e3, 1e3, 1e3),
50289
50289
  color: new Color(16777215),
50290
50290
  intensity: 0.8
50291
50291
  },
50292
50292
  {
50293
50293
  followCamera: true,
50294
- position: new Vector3$1(-1e3, -1e3, -1e3),
50294
+ position: new Vector3(-1e3, -1e3, -1e3),
50295
50295
  color: new Color(16777215),
50296
50296
  intensity: 0.2
50297
50297
  }
@@ -50364,7 +50364,7 @@ class PerspectiveWrapper {
50364
50364
  frustrumSizeAt(point) {
50365
50365
  const dist2 = this.camera.position.distanceTo(point);
50366
50366
  const size = 2 * dist2 * Math.tan(this.camera.fov / 2 * (Math.PI / 180));
50367
- return new Vector2$1(size * this.camera.aspect, size);
50367
+ return new Vector2(size * this.camera.aspect, size);
50368
50368
  }
50369
50369
  }
50370
50370
  class OrthographicWrapper {
@@ -50373,7 +50373,7 @@ class OrthographicWrapper {
50373
50373
  this.camera = camera2;
50374
50374
  }
50375
50375
  frustrumSizeAt(point) {
50376
- return new Vector2$1(
50376
+ return new Vector2(
50377
50377
  this.camera.right - this.camera.left,
50378
50378
  this.camera.top - this.camera.bottom
50379
50379
  );
@@ -50462,14 +50462,14 @@ class GizmoMarker {
50462
50462
  /** Sets the position of the marker in the 3d scene */
50463
50463
  set position(value) {
50464
50464
  const m = new Matrix4();
50465
- m.compose(value, new Quaternion(), new Vector3$1(1, 1, 1));
50465
+ m.compose(value, new Quaternion(), new Vector3(1, 1, 1));
50466
50466
  this._submesh.mesh.setMatrixAt(this._submesh.index, m);
50467
50467
  this._submesh.mesh.instanceMatrix.needsUpdate = true;
50468
50468
  }
50469
50469
  get position() {
50470
50470
  const m = new Matrix4();
50471
50471
  this._submesh.mesh.getMatrixAt(0, m);
50472
- return new Vector3$1().setFromMatrixPosition(m);
50472
+ return new Vector3().setFromMatrixPosition(m);
50473
50473
  }
50474
50474
  /**
50475
50475
  * Always false
@@ -50539,7 +50539,7 @@ class GizmoMarker {
50539
50539
  * @returns {THREE.Box3 | undefined} The bounding box of the object.
50540
50540
  */
50541
50541
  getBoundingBox() {
50542
- return new Box3$1().setFromCenterAndSize(this.position.clone(), new Vector3$1(1, 1, 1));
50542
+ return new Box3().setFromCenterAndSize(this.position.clone(), new Vector3(1, 1, 1));
50543
50543
  }
50544
50544
  }
50545
50545
  class CameraMovement {
@@ -50553,7 +50553,7 @@ class CameraMovement {
50553
50553
  * @param {'XY' | 'XZ'} axes - The axes defining the plane of movement ('XY' or 'XZ').
50554
50554
  */
50555
50555
  move2(vector, axes) {
50556
- const direction = axes === "XY" ? new Vector3$1(-vector.x, vector.y, 0) : axes === "XZ" ? new Vector3$1(-vector.x, 0, vector.y) : void 0;
50556
+ const direction = axes === "XY" ? new Vector3(-vector.x, vector.y, 0) : axes === "XZ" ? new Vector3(-vector.x, 0, vector.y) : void 0;
50557
50557
  if (direction) this.move3(direction);
50558
50558
  }
50559
50559
  /**
@@ -50562,7 +50562,7 @@ class CameraMovement {
50562
50562
  * @param {'X' | 'Y' | 'Z'} axis - The axis along which to move the camera ('X', 'Y', or 'Z').
50563
50563
  */
50564
50564
  move1(amount, axis) {
50565
- const direction = new Vector3$1(
50565
+ const direction = new Vector3(
50566
50566
  axis === "X" ? -amount : 0,
50567
50567
  axis === "Y" ? amount : 0,
50568
50568
  axis === "Z" ? amount : 0
@@ -50589,7 +50589,7 @@ class CameraMovement {
50589
50589
  const angleForward = flatForward.angleTo(forward) * Math.sign(forward.z);
50590
50590
  const angleDirection = flatDirection.angleTo(_direction) * Math.sign(_direction.z);
50591
50591
  const declination = angleForward - angleDirection;
50592
- const angle = new Vector2$1(-declination, azimuth);
50592
+ const angle = new Vector2(-declination, azimuth);
50593
50593
  angle.multiplyScalar(180 / Math.PI);
50594
50594
  this.orbit(angle);
50595
50595
  }
@@ -50608,7 +50608,7 @@ class CameraMovement {
50608
50608
  if (target === "all") {
50609
50609
  target = this._camera._scene.getAverageBoundingBox();
50610
50610
  }
50611
- if (target instanceof Box3$1) {
50611
+ if (target instanceof Box3) {
50612
50612
  target = target.getBoundingSphere(new Sphere());
50613
50613
  }
50614
50614
  if (target instanceof Sphere) {
@@ -50675,7 +50675,7 @@ class CameraLerp extends CameraMovement {
50675
50675
  v.applyQuaternion(this._camera.quaternion);
50676
50676
  const start = this._camera.position.clone();
50677
50677
  const end = this._camera.position.clone().add(v);
50678
- const pos = new Vector3$1();
50678
+ const pos = new Vector3();
50679
50679
  this.onProgress = (progress) => {
50680
50680
  pos.copy(start);
50681
50681
  pos.lerp(end, progress);
@@ -50714,7 +50714,7 @@ class CameraLerp extends CameraMovement {
50714
50714
  orbit(angle) {
50715
50715
  const startPos = this._camera.position.clone();
50716
50716
  const startTarget = this._camera.target.clone();
50717
- const a = new Vector2$1();
50717
+ const a = new Vector2();
50718
50718
  this.onProgress = (progress) => {
50719
50719
  a.set(0, 0);
50720
50720
  a.lerp(angle, progress);
@@ -50727,7 +50727,7 @@ class CameraLerp extends CameraMovement {
50727
50727
  const next = pos.clone().sub(this._camera.position);
50728
50728
  const start = this._camera.quaternion.clone();
50729
50729
  const rot = new Quaternion().setFromUnitVectors(
50730
- new Vector3$1(0, 0, -1),
50730
+ new Vector3(0, 0, -1),
50731
50731
  next.normalize()
50732
50732
  );
50733
50733
  this.onProgress = (progress) => {
@@ -50789,26 +50789,26 @@ class CameraMovementSnap extends CameraMovement {
50789
50789
  move3(vector) {
50790
50790
  const v = vector.clone();
50791
50791
  v.applyQuaternion(this._camera.quaternion);
50792
- const locked = this.lockVector(v, new Vector3$1());
50792
+ const locked = this.lockVector(v, new Vector3());
50793
50793
  const pos = this._camera.position.clone().add(locked);
50794
50794
  const target = this._camera.target.clone().add(locked);
50795
50795
  this.set(pos, target);
50796
50796
  }
50797
50797
  set(position, target) {
50798
50798
  target = target ?? this._camera.target;
50799
- const direction = new Vector3$1().subVectors(position, target);
50799
+ const direction = new Vector3().subVectors(position, target);
50800
50800
  const dist2 = direction.length();
50801
50801
  if (dist2 > 1e-6) {
50802
- const up = new Vector3$1(0, 0, 1);
50802
+ const up = new Vector3(0, 0, 1);
50803
50803
  const angle = direction.angleTo(up);
50804
50804
  const minAngle = MathUtils.degToRad(5);
50805
50805
  const maxAngle = MathUtils.degToRad(175);
50806
50806
  if (angle < minAngle) {
50807
- const axis = new Vector3$1().crossVectors(up, direction).normalize();
50807
+ const axis = new Vector3().crossVectors(up, direction).normalize();
50808
50808
  const delta = minAngle - angle;
50809
50809
  direction.applyQuaternion(new Quaternion().setFromAxisAngle(axis, delta));
50810
50810
  } else if (angle > maxAngle) {
50811
- const axis = new Vector3$1().crossVectors(up, direction).normalize();
50811
+ const axis = new Vector3().crossVectors(up, direction).normalize();
50812
50812
  const delta = maxAngle - angle;
50813
50813
  direction.applyQuaternion(new Quaternion().setFromAxisAngle(axis, delta));
50814
50814
  }
@@ -50824,17 +50824,17 @@ class CameraMovementSnap extends CameraMovement {
50824
50824
  const x = this._camera.allowedMovement.x === 0 ? fallback.x : position.x;
50825
50825
  const y = this._camera.allowedMovement.y === 0 ? fallback.y : position.y;
50826
50826
  const z = this._camera.allowedMovement.z === 0 ? fallback.z : position.z;
50827
- return new Vector3$1(x, y, z);
50827
+ return new Vector3(x, y, z);
50828
50828
  }
50829
50829
  predictOrbit(angle) {
50830
50830
  const rotation = this.predictRotate(angle);
50831
- const delta = new Vector3$1(0, 0, 1).applyQuaternion(rotation).multiplyScalar(this._camera.orbitDistance);
50831
+ const delta = new Vector3(0, 0, 1).applyQuaternion(rotation).multiplyScalar(this._camera.orbitDistance);
50832
50832
  const pos = this._camera.target.clone().add(delta);
50833
50833
  return pos;
50834
50834
  }
50835
50835
  predictRotate(angle) {
50836
- const xQuat = new Quaternion().setFromAxisAngle(new Vector3$1(1, 0, 0), angle.x * Math.PI / 180);
50837
- const zQuat = new Quaternion().setFromAxisAngle(new Vector3$1(0, 1, 0), angle.y * Math.PI / 180);
50836
+ const xQuat = new Quaternion().setFromAxisAngle(new Vector3(1, 0, 0), angle.x * Math.PI / 180);
50837
+ const zQuat = new Quaternion().setFromAxisAngle(new Vector3(0, 1, 0), angle.y * Math.PI / 180);
50838
50838
  const rotation = this._camera.quaternion.clone();
50839
50839
  rotation.multiply(xQuat).multiply(zQuat);
50840
50840
  return rotation;
@@ -50850,22 +50850,22 @@ let Camera$1 = class Camera2 {
50850
50850
  __publicField(this, "_lerp");
50851
50851
  __publicField(this, "_movement");
50852
50852
  // movements
50853
- __publicField(this, "_inputVelocity", new Vector3$1());
50854
- __publicField(this, "_velocity", new Vector3$1());
50853
+ __publicField(this, "_inputVelocity", new Vector3());
50854
+ __publicField(this, "_velocity", new Vector3());
50855
50855
  __publicField(this, "_speed", 0);
50856
50856
  // orbit
50857
50857
  __publicField(this, "_orthographic", false);
50858
- __publicField(this, "_target", new Vector3$1());
50858
+ __publicField(this, "_target", new Vector3());
50859
50859
  // updates
50860
- __publicField(this, "_lastPosition", new Vector3$1());
50860
+ __publicField(this, "_lastPosition", new Vector3());
50861
50861
  __publicField(this, "_lastQuaternion", new Quaternion());
50862
- __publicField(this, "_lastTarget", new Vector3$1());
50862
+ __publicField(this, "_lastTarget", new Vector3());
50863
50863
  // Reuseable vectors for calculations
50864
- __publicField(this, "_tmp1", new Vector3$1());
50865
- __publicField(this, "_tmp2", new Vector3$1());
50864
+ __publicField(this, "_tmp1", new Vector3());
50865
+ __publicField(this, "_tmp2", new Vector3());
50866
50866
  // saves
50867
- __publicField(this, "_savedPosition", new Vector3$1(0, 0, -5));
50868
- __publicField(this, "_savedTarget", new Vector3$1(0, 0, 0));
50867
+ __publicField(this, "_savedPosition", new Vector3(0, 0, -5));
50868
+ __publicField(this, "_savedTarget", new Vector3(0, 0, 0));
50869
50869
  __publicField(this, "_onValueChanged", new distExports$1.SignalDispatcher());
50870
50870
  __publicField(this, "_hasMoved");
50871
50871
  __publicField(this, "_onMoved", new distExports$1.SignalDispatcher());
@@ -50875,18 +50875,18 @@ let Camera$1 = class Camera2 {
50875
50875
  * Represents allowed movement along each axis using a Vector3 object.
50876
50876
  * Each component of the Vector3 should be either 0 or 1 to enable/disable movement along the corresponding axis.
50877
50877
  */
50878
- __publicField(this, "_allowedMovement", new Vector3$1(1, 1, 1));
50879
- __publicField(this, "_allowedRotation", new Vector2$1(1, 1));
50878
+ __publicField(this, "_allowedMovement", new Vector3(1, 1, 1));
50879
+ __publicField(this, "_allowedRotation", new Vector2(1, 1));
50880
50880
  /**
50881
50881
  * The default forward direction that can be used to initialize the camera.
50882
50882
  */
50883
- __publicField(this, "_defaultForward", new Vector3$1(1, -1, 1).normalize());
50883
+ __publicField(this, "_defaultForward", new Vector3(1, -1, 1).normalize());
50884
50884
  // Settings
50885
50885
  __publicField(this, "_velocityBlendFactor", 1e-4);
50886
50886
  __publicField(this, "_moveSpeed", 1);
50887
50887
  this.camPerspective = new PerspectiveWrapper(new PerspectiveCamera());
50888
- this.camPerspective.camera.up = new Vector3$1(0, 0, 1);
50889
- this.camPerspective.camera.lookAt(new Vector3$1(0, 1, 0));
50888
+ this.camPerspective.camera.up = new Vector3(0, 0, 1);
50889
+ this.camPerspective.camera.lookAt(new Vector3(0, 1, 0));
50890
50890
  this.camOrthographic = new OrthographicWrapper(
50891
50891
  new OrthographicCamera()
50892
50892
  );
@@ -50922,7 +50922,7 @@ let Camera$1 = class Camera2 {
50922
50922
  return this._onMoved.asEvent();
50923
50923
  }
50924
50924
  get allowedMovement() {
50925
- return this._force ? new Vector3$1(1, 1, 1) : this._allowedMovement;
50925
+ return this._force ? new Vector3(1, 1, 1) : this._allowedMovement;
50926
50926
  }
50927
50927
  set allowedMovement(axes) {
50928
50928
  this._allowedMovement.copy(axes);
@@ -50935,7 +50935,7 @@ let Camera$1 = class Camera2 {
50935
50935
  * Each component of the Vector2 should be either 0 or 1 to enable/disable rotation around the corresponding axis.
50936
50936
  */
50937
50937
  get allowedRotation() {
50938
- return this._force ? new Vector2$1(1, 1) : this._allowedRotation;
50938
+ return this._force ? new Vector2(1, 1) : this._allowedRotation;
50939
50939
  }
50940
50940
  set allowedRotation(axes) {
50941
50941
  this._allowedRotation.copy(axes);
@@ -51011,7 +51011,7 @@ let Camera$1 = class Camera2 {
51011
51011
  * The forward direction of the camera.
51012
51012
  */
51013
51013
  get forward() {
51014
- return this.camPerspective.camera.getWorldDirection(new Vector3$1());
51014
+ return this.camPerspective.camera.getWorldDirection(new Vector3());
51015
51015
  }
51016
51016
  /**
51017
51017
  * The camera speed factor.
@@ -51376,7 +51376,7 @@ class KeyboardHandler extends InputHandler$1 {
51376
51376
  }
51377
51377
  }
51378
51378
  applyMove() {
51379
- const move = new Vector3$1(
51379
+ const move = new Vector3(
51380
51380
  (this.isRightPressed ? 1 : 0) - (this.isLeftPressed ? 1 : 0),
51381
51381
  (this.isEPressed ? 1 : 0) - (this.isQPressed ? 1 : 0),
51382
51382
  (this.isUpPressed ? 1 : 0) - (this.isDownPressed ? 1 : 0)
@@ -51591,7 +51591,7 @@ class Raycaster2 {
51591
51591
  const size = this._viewport.getSize();
51592
51592
  const x = position.x / size.x * 2 - 1;
51593
51593
  const y = -(position.y / size.y) * 2 + 1;
51594
- target.setFromCamera(new Vector2$1(x, y), this._camera.three);
51594
+ target.setFromCamera(new Vector2(x, y), this._camera.three);
51595
51595
  return target;
51596
51596
  }
51597
51597
  /**
@@ -51719,7 +51719,7 @@ class TouchHandler extends InputHandler$1 {
51719
51719
  if (event.touches.length === 1) {
51720
51720
  const pos = this.touchToVector(event.touches[0]);
51721
51721
  const size = this.viewport.getSize();
51722
- const delta = pos.clone().sub(this._touch).multiply(new Vector2$1(1 / size.x, 1 / size.y));
51722
+ const delta = pos.clone().sub(this._touch).multiply(new Vector2(1 / size.x, 1 / size.y));
51723
51723
  this._touch = pos;
51724
51724
  this.onDrag(delta);
51725
51725
  return;
@@ -51732,7 +51732,7 @@ class TouchHandler extends InputHandler$1 {
51732
51732
  const size = this.viewport.getSize();
51733
51733
  const moveDelta = this._touch.clone().sub(p).multiply(
51734
51734
  // -1 to invert movement
51735
- new Vector2$1(-1 / size.x, -1 / size.y)
51735
+ new Vector2(-1 / size.x, -1 / size.y)
51736
51736
  );
51737
51737
  const zoom2 = p1.distanceTo(p2);
51738
51738
  const prevZoom = this._touch1.distanceTo(this._touch2);
@@ -51774,7 +51774,7 @@ class TouchHandler extends InputHandler$1 {
51774
51774
  this.reg(canvas, "touchmove", this.onTouchMove);
51775
51775
  }
51776
51776
  toRotation(delta, speed) {
51777
- const rotation = new Vector2$1();
51777
+ const rotation = new Vector2();
51778
51778
  rotation.x = delta.y;
51779
51779
  rotation.y = delta.x;
51780
51780
  rotation.multiplyScalar(-180 * speed);
@@ -51784,7 +51784,7 @@ class TouchHandler extends InputHandler$1 {
51784
51784
  return this._touch !== void 0 && this._touchStartTime !== void 0 && this._touch1 === void 0 && this._touch2 === void 0;
51785
51785
  }
51786
51786
  touchToVector(touch) {
51787
- return new Vector2$1(touch.pageX, touch.pageY);
51787
+ return new Vector2(touch.pageX, touch.pageY);
51788
51788
  }
51789
51789
  average(p1, p2) {
51790
51790
  return p1.clone().lerp(p2, 0.5);
@@ -51837,7 +51837,7 @@ class MouseHandler extends InputHandler$1 {
51837
51837
  this.gizmoRect.visible = false;
51838
51838
  });
51839
51839
  __publicField(this, "onMouseMove", (event) => {
51840
- this._lastPosition = new Vector2$1(event.offsetX, event.offsetY);
51840
+ this._lastPosition = new Vector2(event.offsetX, event.offsetY);
51841
51841
  if (!this._idlePosition || this._lastPosition.distanceTo(this._idlePosition) > 5) {
51842
51842
  this.resetIdle();
51843
51843
  }
@@ -51850,7 +51850,7 @@ class MouseHandler extends InputHandler$1 {
51850
51850
  if (this._buttonDown) return;
51851
51851
  this.inputs.ContextMenu(void 0);
51852
51852
  this._hasCameraMoved = false;
51853
- this._downPosition = new Vector2$1(event.offsetX, event.offsetY);
51853
+ this._downPosition = new Vector2(event.offsetX, event.offsetY);
51854
51854
  this._hasMouseMoved = false;
51855
51855
  this.viewport.canvas.focus();
51856
51856
  this._buttonDown = this.getButton(event);
@@ -51879,12 +51879,12 @@ class MouseHandler extends InputHandler$1 {
51879
51879
  this.onRectEnd();
51880
51880
  } else if (event.button === 0 && !this._hasMouseMoved) {
51881
51881
  this.onMouseClick(
51882
- new Vector2$1(event.offsetX, event.offsetY),
51882
+ new Vector2(event.offsetX, event.offsetY),
51883
51883
  false,
51884
51884
  this.getModifier(event)
51885
51885
  );
51886
51886
  } else if (event.button === 2 && !this._hasMouseMoved) {
51887
- this.inputs.ContextMenu(new Vector2$1(event.clientX, event.clientY));
51887
+ this.inputs.ContextMenu(new Vector2(event.clientX, event.clientY));
51888
51888
  }
51889
51889
  this._buttonDown = void 0;
51890
51890
  this.inputs.pointerOverride = void 0;
@@ -51892,7 +51892,7 @@ class MouseHandler extends InputHandler$1 {
51892
51892
  __publicField(this, "onDoubleClick", (event) => {
51893
51893
  event.stopImmediatePropagation();
51894
51894
  this.onMouseClick(
51895
- new Vector2$1(event.offsetX, event.offsetY),
51895
+ new Vector2(event.offsetX, event.offsetY),
51896
51896
  true,
51897
51897
  this.getModifier(event)
51898
51898
  );
@@ -51967,8 +51967,8 @@ class MouseHandler extends InputHandler$1 {
51967
51967
  const deltaX = event.movementX || event.mozMovementX || event.webkitMovementX || 0;
51968
51968
  const deltaY = event.movementY || event.mozMovementY || event.webkitMovementY || 0;
51969
51969
  const size = this.viewport.getSize();
51970
- const delta = new Vector2$1(deltaX / size.x, deltaY / size.y);
51971
- const position = new Vector2$1(event.offsetX, event.offsetY);
51970
+ const delta = new Vector2(deltaX / size.x, deltaY / size.y);
51971
+ const position = new Vector2(event.offsetX, event.offsetY);
51972
51972
  this._hasMouseMoved = this._hasMouseMoved || this._downPosition && ((_a2 = this._downPosition) == null ? void 0 : _a2.distanceTo(position)) > 4;
51973
51973
  switch (this._buttonDown) {
51974
51974
  case "main":
@@ -52028,8 +52028,8 @@ class MouseHandler extends InputHandler$1 {
52028
52028
  onRectEnd() {
52029
52029
  const box = this.gizmoRect.getBoundingBox();
52030
52030
  if (!box) return;
52031
- const center = box.getCenter(new Vector3$1());
52032
- const size = box.getSize(new Vector3$1());
52031
+ const center = box.getCenter(new Vector3());
52032
+ const size = box.getSize(new Vector3());
52033
52033
  size.multiplyScalar(0.5);
52034
52034
  box.setFromCenterAndSize(center, size);
52035
52035
  this._viewer.camera.lerp(1).frame(box);
@@ -52237,7 +52237,7 @@ class DefaultInputScheme {
52237
52237
  }
52238
52238
  }
52239
52239
  onIdleAction(hit) {
52240
- if (!this._viewer.gizmos.section.interactive) {
52240
+ if (!this._viewer.gizmos.sectionBox.interactive) {
52241
52241
  this._viewer.selection.focus(hit == null ? void 0 : hit.object);
52242
52242
  }
52243
52243
  }
@@ -52459,7 +52459,7 @@ class Selection {
52459
52459
  * @param {THREE.Box3} [target] Optional parameter to specify a box to use for the result.
52460
52460
  * @returns {THREE.Box3 | undefined} The bounding box of the selection or `undefined` if no selection exists.
52461
52461
  */
52462
- getBoundingBox(target = new Box3$1()) {
52462
+ getBoundingBox(target = new Box3()) {
52463
52463
  if (this._objects.size === 0) return;
52464
52464
  let initialized = false;
52465
52465
  for (const o of this._objects) {
@@ -52814,7 +52814,7 @@ class CSS2DObject extends Object3D$1 {
52814
52814
  this.element.style.position = "absolute";
52815
52815
  this.element.style.userSelect = "none";
52816
52816
  this.element.setAttribute("draggable", false);
52817
- this.center = new Vector2$1(0.5, 0.5);
52817
+ this.center = new Vector2(0.5, 0.5);
52818
52818
  this.addEventListener("removed", function() {
52819
52819
  this.traverse(function(object) {
52820
52820
  if (object.element instanceof object.element.ownerDocument.defaultView.Element && object.element.parentNode !== null) {
@@ -52830,11 +52830,11 @@ class CSS2DObject extends Object3D$1 {
52830
52830
  return this;
52831
52831
  }
52832
52832
  }
52833
- const _vector = new Vector3$1();
52833
+ const _vector = new Vector3();
52834
52834
  const _viewMatrix = new Matrix4();
52835
52835
  const _viewProjectionMatrix = new Matrix4();
52836
- const _a = new Vector3$1();
52837
- const _b = new Vector3$1();
52836
+ const _a = new Vector3();
52837
+ const _b = new Vector3();
52838
52838
  class CSS2DRenderer {
52839
52839
  constructor(parameters = {}) {
52840
52840
  const _this = this;
@@ -52967,8 +52967,8 @@ class RenderScene {
52967
52967
  * Returns the bounding box encompasing all rendererd objects.
52968
52968
  * @param target box in which to copy result, a new instance is created if undefined.
52969
52969
  */
52970
- getBoundingBox(target = new Box3$1()) {
52971
- return this._boundingBox ? target.copy(this._boundingBox) : target.set(new Vector3$1(-1, -1, -1), new Vector3$1(1, 1, 1));
52970
+ getBoundingBox(target = new Box3()) {
52971
+ return this._boundingBox ? target.copy(this._boundingBox) : target.set(new Vector3(-1, -1, -1), new Vector3(1, 1, 1));
52972
52972
  }
52973
52973
  /**
52974
52974
  * Returns the bounding box of the average center of all meshes.
@@ -52976,9 +52976,9 @@ class RenderScene {
52976
52976
  */
52977
52977
  getAverageBoundingBox() {
52978
52978
  if (this._vimScenes.length === 0) {
52979
- return new Box3$1();
52979
+ return new Box3();
52980
52980
  }
52981
- const result = new Box3$1();
52981
+ const result = new Box3();
52982
52982
  result.copy(this._vimScenes[0].getAverageBoundingBox());
52983
52983
  for (let i = 1; i < this._vimScenes.length; i++) {
52984
52984
  result.union(this._vimScenes[i].getAverageBoundingBox());
@@ -53180,7 +53180,7 @@ let Viewport$1 = class Viewport {
53180
53180
  * @returns {THREE.Vector2} The pixel size of the parent element.
53181
53181
  */
53182
53182
  getParentSize() {
53183
- return new Vector2$1(
53183
+ return new Vector2(
53184
53184
  this.getParentWidth(),
53185
53185
  this.getParentHeight()
53186
53186
  );
@@ -53198,7 +53198,7 @@ let Viewport$1 = class Viewport {
53198
53198
  * @returns {THREE.Vector2} The pixel size of the canvas.
53199
53199
  */
53200
53200
  getSize() {
53201
- return new Vector2$1(this.canvas.clientWidth, this.canvas.clientHeight);
53201
+ return new Vector2(this.canvas.clientWidth, this.canvas.clientHeight);
53202
53202
  }
53203
53203
  /**
53204
53204
  * Calculates and returns the aspect ratio of the parent element.
@@ -53260,64 +53260,64 @@ function createAxes(settings2) {
53260
53260
  return [
53261
53261
  new Axis({
53262
53262
  axis: "x",
53263
- direction: new Vector3$1(1, 0, 0),
53263
+ direction: new Vector3(1, 0, 0),
53264
53264
  size: settings2.bubbleSizePrimary,
53265
53265
  color: settings2.colorX,
53266
53266
  colorSub: settings2.colorXSub,
53267
53267
  line: settings2.lineWidth,
53268
53268
  label: "X",
53269
- position: new Vector3$1(0, 0, 0)
53269
+ position: new Vector3(0, 0, 0)
53270
53270
  }),
53271
53271
  new Axis({
53272
53272
  axis: "y",
53273
- direction: new Vector3$1(0, 1, 0),
53273
+ direction: new Vector3(0, 1, 0),
53274
53274
  size: settings2.bubbleSizePrimary,
53275
53275
  color: settings2.colorY,
53276
53276
  colorSub: settings2.colorYSub,
53277
53277
  line: settings2.lineWidth,
53278
53278
  label: "Y",
53279
- position: new Vector3$1(0, 0, 0)
53279
+ position: new Vector3(0, 0, 0)
53280
53280
  }),
53281
53281
  new Axis({
53282
53282
  axis: "z",
53283
- direction: new Vector3$1(0, 0, 1),
53283
+ direction: new Vector3(0, 0, 1),
53284
53284
  size: settings2.bubbleSizePrimary,
53285
53285
  color: settings2.colorZ,
53286
53286
  colorSub: settings2.colorZSub,
53287
53287
  line: settings2.lineWidth,
53288
53288
  label: "Z",
53289
- position: new Vector3$1(0, 0, 0)
53289
+ position: new Vector3(0, 0, 0)
53290
53290
  }),
53291
53291
  new Axis({
53292
53292
  axis: "-x",
53293
- direction: new Vector3$1(-1, 0, 0),
53293
+ direction: new Vector3(-1, 0, 0),
53294
53294
  size: settings2.bubbleSizeSecondary,
53295
53295
  color: settings2.colorX,
53296
53296
  colorSub: settings2.colorXSub,
53297
53297
  line: void 0,
53298
53298
  label: void 0,
53299
- position: new Vector3$1(0, 0, 0)
53299
+ position: new Vector3(0, 0, 0)
53300
53300
  }),
53301
53301
  new Axis({
53302
53302
  axis: "-y",
53303
- direction: new Vector3$1(0, -1, 0),
53303
+ direction: new Vector3(0, -1, 0),
53304
53304
  size: settings2.bubbleSizeSecondary,
53305
53305
  color: settings2.colorY,
53306
53306
  colorSub: settings2.colorYSub,
53307
53307
  line: void 0,
53308
53308
  label: void 0,
53309
- position: new Vector3$1(0, 0, 0)
53309
+ position: new Vector3(0, 0, 0)
53310
53310
  }),
53311
53311
  new Axis({
53312
53312
  axis: "-z",
53313
53313
  // inverted Z
53314
- direction: new Vector3$1(0, 0, -1),
53314
+ direction: new Vector3(0, 0, -1),
53315
53315
  size: settings2.bubbleSizeSecondary,
53316
53316
  color: settings2.colorZ,
53317
53317
  colorSub: settings2.colorZSub,
53318
53318
  line: void 0,
53319
53319
  label: void 0,
53320
- position: new Vector3$1(0, 0, 0)
53320
+ position: new Vector3(0, 0, 0)
53321
53321
  })
53322
53322
  ];
53323
53323
  }
@@ -53338,9 +53338,9 @@ class GizmoAxes {
53338
53338
  __publicField(this, "_pointerInside", false);
53339
53339
  __publicField(this, "_isDragging", false);
53340
53340
  __publicField(this, "_isDragSignificant", false);
53341
- __publicField(this, "_dragStart", new Vector2$1());
53342
- __publicField(this, "_dragLast", new Vector2$1());
53343
- __publicField(this, "_pointer", new Vector3$1());
53341
+ __publicField(this, "_dragStart", new Vector2());
53342
+ __publicField(this, "_dragLast", new Vector2());
53343
+ __publicField(this, "_pointer", new Vector3());
53344
53344
  __publicField(this, "_center");
53345
53345
  __publicField(this, "_invRotMat", new Matrix4());
53346
53346
  __publicField(this, "_selectedAxis", null);
@@ -53438,7 +53438,7 @@ class GizmoAxes {
53438
53438
  const margin = 24 * ratio;
53439
53439
  this._canvas.style.top = `${margin}px`;
53440
53440
  this._canvas.style.right = `${margin}px`;
53441
- this._center = new Vector3$1(size / 2, size / 2, 0);
53441
+ this._center = new Vector3(size / 2, size / 2, 0);
53442
53442
  this._axes = createAxes(this._options);
53443
53443
  }
53444
53444
  createCanvas() {
@@ -53464,14 +53464,14 @@ class GizmoAxes {
53464
53464
  }
53465
53465
  }
53466
53466
  updateDrag(x, y) {
53467
- if (new Vector2$1(x, y).sub(this._dragStart).length() > 3) {
53467
+ if (new Vector2(x, y).sub(this._dragStart).length() > 3) {
53468
53468
  this._isDragSignificant = true;
53469
53469
  }
53470
- const drag = new Vector2$1(x, y).sub(this._dragLast);
53470
+ const drag = new Vector2(x, y).sub(this._dragLast);
53471
53471
  this._dragLast.set(x, y);
53472
53472
  const rotX = drag.y / this._canvas.height;
53473
53473
  const rotY = drag.x / this._canvas.width;
53474
- this._camera.snap().orbit(new Vector2$1(rotX * -180, rotY * -180));
53474
+ this._camera.snap().orbit(new Vector2(rotX * -180, rotY * -180));
53475
53475
  }
53476
53476
  endDrag() {
53477
53477
  this._isDragging = false;
@@ -53489,8 +53489,8 @@ class GizmoAxes {
53489
53489
  const axis = this._axes[i];
53490
53490
  const highlight = this._selectedAxis === axis;
53491
53491
  const color = axis.position.z >= -0.01 ? axis.color : axis.colorSub;
53492
- const center2 = new Vector2$1(this._center.x, this._center.y);
53493
- const pos2 = new Vector2$1(axis.position.x, axis.position.y);
53492
+ const center2 = new Vector2(this._center.x, this._center.y);
53493
+ const pos2 = new Vector2(axis.position.x, axis.position.y);
53494
53494
  if (axis.line) this.drawLine(center2, pos2, axis.line, color);
53495
53495
  const circleColor = new Color(color);
53496
53496
  circleColor.multiplyScalar(highlight ? 1.5 : 1);
@@ -53854,14 +53854,14 @@ class GizmoRectangle {
53854
53854
  const center = A.clone().add(B).multiplyScalar(0.5);
53855
53855
  const [dx, dy] = this.getBoxSize(A, B);
53856
53856
  this.updateRect(center, dx, dy);
53857
- const AB = this.getIntersection(plane, new Vector2$1(posA.x, posB.y));
53858
- const BA = this.getIntersection(plane, new Vector2$1(posB.x, posA.y));
53857
+ const AB = this.getIntersection(plane, new Vector2(posA.x, posB.y));
53858
+ const BA = this.getIntersection(plane, new Vector2(posB.x, posA.y));
53859
53859
  if (!AB || !BA) return;
53860
53860
  this.points = [A, B, AB, BA, center];
53861
53861
  }
53862
53862
  getIntersection(plane, position) {
53863
53863
  const raycaster = this.viewer.raycaster.fromPoint2(position);
53864
- return raycaster.ray.intersectPlane(plane, new Vector3$1()) ?? void 0;
53864
+ return raycaster.ray.intersectPlane(plane, new Vector3()) ?? void 0;
53865
53865
  }
53866
53866
  updateRect(position, dx, dy) {
53867
53867
  this.line.quaternion.copy(this.viewer.camera.quaternion);
@@ -53872,8 +53872,8 @@ class GizmoRectangle {
53872
53872
  }
53873
53873
  getBoxSize(A, B) {
53874
53874
  const cam = this.viewer.camera;
53875
- const up = new Vector3$1(0, 1, 0).applyQuaternion(cam.quaternion);
53876
- const right = new Vector3$1(1, 0, 0).applyQuaternion(cam.quaternion);
53875
+ const up = new Vector3(0, 1, 0).applyQuaternion(cam.quaternion);
53876
+ const right = new Vector3(1, 0, 0).applyQuaternion(cam.quaternion);
53877
53877
  const Ax = A.dot(right);
53878
53878
  const Ay = A.dot(up);
53879
53879
  const Bx = B.dot(right);
@@ -53891,7 +53891,7 @@ class GizmoRectangle {
53891
53891
  * X-----X
53892
53892
  * @returns {THREE.Box3} The bounding box of the selection.
53893
53893
  */
53894
- getBoundingBox(target = new Box3$1()) {
53894
+ getBoundingBox(target = new Box3()) {
53895
53895
  const position = this.getClosestHit();
53896
53896
  const projections = position ? this.projectPoints(position) : this.points;
53897
53897
  if (!projections) return;
@@ -53923,7 +53923,7 @@ class GizmoRectangle {
53923
53923
  this.viewer.camera.forward,
53924
53924
  position
53925
53925
  );
53926
- return (_a2 = this.points) == null ? void 0 : _a2.map((p) => plane.projectPoint(p, new Vector3$1()));
53926
+ return (_a2 = this.points) == null ? void 0 : _a2.map((p) => plane.projectPoint(p, new Vector3()));
53927
53927
  }
53928
53928
  }
53929
53929
  class MeasureFlow {
@@ -54057,7 +54057,7 @@ MeshLine.prototype.setPoints = function(points, wcb) {
54057
54057
  this.widthCallback = wcb;
54058
54058
  this.positions = [];
54059
54059
  this.counters = [];
54060
- if (points.length && points[0] instanceof Vector3$1) {
54060
+ if (points.length && points[0] instanceof Vector3) {
54061
54061
  for (let j = 0; j < points.length; j++) {
54062
54062
  const p = points[j];
54063
54063
  const c = j / points.length;
@@ -54081,7 +54081,7 @@ function MeshLineRaycast(raycaster, intersects2) {
54081
54081
  const inverseMatrix = new Matrix4();
54082
54082
  const ray = new Ray();
54083
54083
  const sphere = new Sphere();
54084
- const interRay = new Vector3$1();
54084
+ const interRay = new Vector3();
54085
54085
  const geometry = this.geometry;
54086
54086
  if (!geometry.boundingSphere) geometry.computeBoundingSphere();
54087
54087
  sphere.copy(geometry.boundingSphere);
@@ -54091,9 +54091,9 @@ function MeshLineRaycast(raycaster, intersects2) {
54091
54091
  }
54092
54092
  inverseMatrix.copy(this.matrixWorld).invert();
54093
54093
  ray.copy(raycaster.ray).applyMatrix4(inverseMatrix);
54094
- const vStart = new Vector3$1();
54095
- const vEnd = new Vector3$1();
54096
- const interSegment = new Vector3$1();
54094
+ const vStart = new Vector3();
54095
+ const vEnd = new Vector3();
54096
+ const interSegment = new Vector3();
54097
54097
  const step = this instanceof LineSegments ? 2 : 1;
54098
54098
  const index2 = geometry.index;
54099
54099
  const attributes = geometry.attributes;
@@ -54396,7 +54396,7 @@ class MeshLineMaterial extends ShaderMaterial {
54396
54396
  useAlphaMap: { value: 0 },
54397
54397
  color: { value: new Color(16777215) },
54398
54398
  opacity: { value: 1 },
54399
- resolution: { value: new Vector2$1(1, 1) },
54399
+ resolution: { value: new Vector2(1, 1) },
54400
54400
  sizeAttenuation: { value: 1 },
54401
54401
  dashArray: { value: 0 },
54402
54402
  dashOffset: { value: 0 },
@@ -54404,7 +54404,7 @@ class MeshLineMaterial extends ShaderMaterial {
54404
54404
  useDash: { value: 0 },
54405
54405
  visibility: { value: 1 },
54406
54406
  alphaTest: { value: 0 },
54407
- repeat: { value: new Vector2$1(1, 1) }
54407
+ repeat: { value: new Vector2(1, 1) }
54408
54408
  }),
54409
54409
  vertexShader: ShaderChunk.meshline_vert,
54410
54410
  fragmentShader: ShaderChunk.meshline_frag
@@ -54795,12 +54795,12 @@ class MeasureGizmo {
54795
54795
  const xz = this.screenDist(this._lineX.position, this._lineZ.position);
54796
54796
  const yz = this.screenDist(this._lineY.position, this._lineZ.position);
54797
54797
  let conflicts = 0;
54798
- if (lx !== void 0 && lx < 0.1) conflicts++;
54799
- if (ly !== void 0 && ly < 0.1) conflicts++;
54800
- if (lz !== void 0 && lz < 0.1) conflicts++;
54801
- if (xy !== void 0 && xy < 0.1) conflicts++;
54802
- if (xz !== void 0 && xz < 0.1) conflicts++;
54803
- if (yz !== void 0 && yz < 0.1) conflicts++;
54798
+ if (lx !== void 0 && lx < 0.3) conflicts++;
54799
+ if (ly !== void 0 && ly < 0.3) conflicts++;
54800
+ if (lz !== void 0 && lz < 0.3) conflicts++;
54801
+ if (xy !== void 0 && xy < 0.3) conflicts++;
54802
+ if (xz !== void 0 && xz < 0.3) conflicts++;
54803
+ if (yz !== void 0 && yz < 0.3) conflicts++;
54804
54804
  const collapse2 = conflicts > 1;
54805
54805
  this._label.visible = collapse2;
54806
54806
  this._line.label.visible = !collapse2;
@@ -54830,6 +54830,7 @@ class MeasureGizmo {
54830
54830
  this._line.mesh.visible = false;
54831
54831
  this._line.label.visible = false;
54832
54832
  }
54833
+ this._label.visible = false;
54833
54834
  this._viewer.renderer.needsUpdate = true;
54834
54835
  }
54835
54836
  /**
@@ -54879,7 +54880,9 @@ class MeasureGizmo {
54879
54880
  * Disposes all resources.
54880
54881
  */
54881
54882
  dispose() {
54883
+ console.log("dispose");
54882
54884
  if (this._animId !== void 0) cancelAnimationFrame(this._animId);
54885
+ this._html.div.remove();
54883
54886
  this._viewer.renderer.remove(this._group);
54884
54887
  this._startMarker.dispose();
54885
54888
  this._endMarker.dispose();
@@ -55062,7 +55065,7 @@ class BoxInputs {
55062
55065
  /** The currently hovered/dragged handle, if any. */
55063
55066
  __publicField(this, "_handle");
55064
55067
  /** The origin point for dragging, updated on pointer down. */
55065
- __publicField(this, "_dragOrigin", new Vector3$1());
55068
+ __publicField(this, "_dragOrigin", new Vector3());
55066
55069
  /** The plane used for drag intersection (perpendicular to the camera direction). */
55067
55070
  __publicField(this, "_dragPlane", new Plane());
55068
55071
  /** Whether a pointer is currently down on a handle. */
@@ -55070,7 +55073,7 @@ class BoxInputs {
55070
55073
  /** A reusable Raycaster for picking and plane intersection. */
55071
55074
  __publicField(this, "_raycaster", new Raycaster$1());
55072
55075
  /** The box state before the current drag. */
55073
- __publicField(this, "_lastBox", new Box3$1());
55076
+ __publicField(this, "_lastBox", new Box3());
55074
55077
  /** A collection of unregister callbacks for event listeners. */
55075
55078
  __publicField(this, "_unregisters", []);
55076
55079
  /** The ID of the pointer that is captured, if any. */
@@ -55155,7 +55158,7 @@ class BoxInputs {
55155
55158
  onPointerLeave(event) {
55156
55159
  var _a2, _b2;
55157
55160
  if (!this.pointerCaptured) {
55158
- (_b2 = this.onFaceEnter) == null ? void 0 : _b2.call(this, ((_a2 = this._handle) == null ? void 0 : _a2.forward) ?? new Vector3$1());
55161
+ (_b2 = this.onFaceEnter) == null ? void 0 : _b2.call(this, ((_a2 = this._handle) == null ? void 0 : _a2.forward) ?? new Vector3());
55159
55162
  }
55160
55163
  }
55161
55164
  /**
@@ -55190,13 +55193,13 @@ class BoxInputs {
55190
55193
  this.onDrag(event);
55191
55194
  return;
55192
55195
  }
55193
- const hits = this.raycast(new Vector2$1(event.offsetX, event.offsetY));
55196
+ const hits = this.raycast(new Vector2(event.offsetX, event.offsetY));
55194
55197
  const handle = (_b2 = (_a2 = hits == null ? void 0 : hits[0]) == null ? void 0 : _a2.object) == null ? void 0 : _b2.userData.handle;
55195
55198
  if (handle !== this._handle) {
55196
55199
  (_c = this._handle) == null ? void 0 : _c.highlight(false);
55197
55200
  handle == null ? void 0 : handle.highlight(true);
55198
55201
  this._handle = handle;
55199
- (_d = this.onFaceEnter) == null ? void 0 : _d.call(this, (handle == null ? void 0 : handle.forward) ?? new Vector3$1());
55202
+ (_d = this.onFaceEnter) == null ? void 0 : _d.call(this, (handle == null ? void 0 : handle.forward) ?? new Vector3());
55200
55203
  }
55201
55204
  }
55202
55205
  /**
@@ -55214,7 +55217,7 @@ class BoxInputs {
55214
55217
  this.onMouseMove(event);
55215
55218
  } else {
55216
55219
  this._handle = void 0;
55217
- (_a2 = this.onFaceEnter) == null ? void 0 : _a2.call(this, new Vector3$1());
55220
+ (_a2 = this.onFaceEnter) == null ? void 0 : _a2.call(this, new Vector3());
55218
55221
  }
55219
55222
  (_b2 = this.onBoxConfirm) == null ? void 0 : _b2.call(this, this._sharedBox);
55220
55223
  }
@@ -55226,7 +55229,7 @@ class BoxInputs {
55226
55229
  */
55227
55230
  onMouseDown(event) {
55228
55231
  var _a2, _b2, _c, _d;
55229
- const hits = this.raycast(new Vector2$1(event.offsetX, event.offsetY));
55232
+ const hits = this.raycast(new Vector2(event.offsetX, event.offsetY));
55230
55233
  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;
55231
55234
  if (!handle) return;
55232
55235
  this._handle = handle;
@@ -55248,7 +55251,7 @@ class BoxInputs {
55248
55251
  onDrag(event) {
55249
55252
  var _a2;
55250
55253
  if (!this._handle) return;
55251
- const point = this.raycastPlane(new Vector2$1(event.offsetX, event.offsetY)) ?? this._dragOrigin.clone();
55254
+ const point = this.raycastPlane(new Vector2(event.offsetX, event.offsetY)) ?? this._dragOrigin.clone();
55252
55255
  const delta = point.sub(this._dragOrigin);
55253
55256
  const amount = delta.dot(this._handle.forward);
55254
55257
  const box = this.stretch(this._handle.axis, this._handle.sign, amount);
@@ -55302,7 +55305,7 @@ class BoxInputs {
55302
55305
  raycastPlane(position) {
55303
55306
  return this.getRaycaster(position).ray.intersectPlane(
55304
55307
  this._dragPlane,
55305
- new Vector3$1()
55308
+ new Vector3()
55306
55309
  );
55307
55310
  }
55308
55311
  }
@@ -55450,15 +55453,24 @@ class SectionBoxHandle extends Mesh {
55450
55453
  __publicField(this, "_color");
55451
55454
  __publicField(this, "_highlightColor");
55452
55455
  __publicField(this, "_materials");
55456
+ __publicField(this, "_camSub");
55453
55457
  this._materials = [matAlways, matBehind];
55454
- this._forward = new Vector3$1();
55458
+ this._forward = new Vector3();
55455
55459
  this.forward[axes] = sign2;
55456
55460
  this.axis = axes;
55457
55461
  this.sign = sign2;
55458
55462
  this._color = color ?? new Color(0);
55459
55463
  this._highlightColor = this._color.clone().lerp(new Color(13421772), 0.8);
55460
55464
  this.userData.handle = this;
55461
- this.quaternion.setFromUnitVectors(new Vector3$1(0, -1, 0), this._forward);
55465
+ this.quaternion.setFromUnitVectors(new Vector3(0, -1, 0), this._forward);
55466
+ }
55467
+ trackCamera(camera2) {
55468
+ const rescale = () => {
55469
+ const size = camera2.frustrumSizeAt(this.position);
55470
+ this.scale.set(size.x * 3e-3, size.x * 3e-3, size.x * 3e-3);
55471
+ };
55472
+ this._camSub = camera2.onMoved.subscribe(() => rescale());
55473
+ rescale();
55462
55474
  }
55463
55475
  setPosition(position) {
55464
55476
  this.position.copy(position);
@@ -55471,8 +55483,10 @@ class SectionBoxHandle extends Mesh {
55471
55483
  this.material[1].color.set(value ? this._highlightColor : this._color);
55472
55484
  }
55473
55485
  dispose() {
55486
+ var _a2;
55474
55487
  this.geometry.dispose();
55475
55488
  this._materials.forEach((m) => m.dispose());
55489
+ (_a2 = this._camSub) == null ? void 0 : _a2.call(this);
55476
55490
  }
55477
55491
  }
55478
55492
  function createDoubleCone(size) {
@@ -55488,7 +55502,7 @@ function createDoubleCone(size) {
55488
55502
  return mergedGeo;
55489
55503
  }
55490
55504
  class SectionBoxHandles {
55491
- constructor() {
55505
+ constructor(camera2) {
55492
55506
  __publicField(this, "up");
55493
55507
  __publicField(this, "down");
55494
55508
  __publicField(this, "left");
@@ -55503,6 +55517,12 @@ class SectionBoxHandles {
55503
55517
  this.right = new SectionBoxHandle("x", 1, size, new Color(16711680));
55504
55518
  this.front = new SectionBoxHandle("z", 1, size, new Color(255));
55505
55519
  this.back = new SectionBoxHandle("z", -1, size, new Color(255));
55520
+ this.up.trackCamera(camera2);
55521
+ this.down.trackCamera(camera2);
55522
+ this.left.trackCamera(camera2);
55523
+ this.right.trackCamera(camera2);
55524
+ this.front.trackCamera(camera2);
55525
+ this.back.trackCamera(camera2);
55506
55526
  this.meshes = new Group();
55507
55527
  this.meshes.add(this.up);
55508
55528
  this.meshes.add(this.down);
@@ -55518,13 +55538,13 @@ class SectionBoxHandles {
55518
55538
  this.meshes.visible = value;
55519
55539
  }
55520
55540
  fitBox(box) {
55521
- const center = box.getCenter(new Vector3$1());
55522
- this.up.setPosition(new Vector3$1(center.x, box.max.y, center.z));
55523
- this.down.setPosition(new Vector3$1(center.x, box.min.y, center.z));
55524
- this.left.setPosition(new Vector3$1(box.min.x, center.y, center.z));
55525
- this.right.setPosition(new Vector3$1(box.max.x, center.y, center.z));
55526
- this.front.setPosition(new Vector3$1(center.x, center.y, box.max.z));
55527
- this.back.setPosition(new Vector3$1(center.x, center.y, box.min.z));
55541
+ const center = box.getCenter(new Vector3());
55542
+ this.up.setPosition(new Vector3(center.x, box.max.y, center.z));
55543
+ this.down.setPosition(new Vector3(center.x, box.min.y, center.z));
55544
+ this.left.setPosition(new Vector3(box.min.x, center.y, center.z));
55545
+ this.right.setPosition(new Vector3(box.max.x, center.y, center.z));
55546
+ this.front.setPosition(new Vector3(center.x, center.y, box.max.z));
55547
+ this.back.setPosition(new Vector3(center.x, center.y, box.min.z));
55528
55548
  }
55529
55549
  dispose() {
55530
55550
  this.up.dispose();
@@ -55536,7 +55556,7 @@ class SectionBoxHandles {
55536
55556
  }
55537
55557
  }
55538
55558
  class SectionBoxGizmo {
55539
- constructor(renderer) {
55559
+ constructor(renderer, camera2) {
55540
55560
  __publicField(this, "_renderer");
55541
55561
  __publicField(this, "cube");
55542
55562
  __publicField(this, "outline");
@@ -55545,7 +55565,7 @@ class SectionBoxGizmo {
55545
55565
  this._renderer = renderer;
55546
55566
  this.cube = new SectionBoxMesh();
55547
55567
  this.outline = new SectionBoxOutline(new Color(8882833));
55548
- this.handles = new SectionBoxHandles();
55568
+ this.handles = new SectionBoxHandles(camera2);
55549
55569
  this._renderer.add(this.outline);
55550
55570
  this._renderer.add(this.handles.meshes);
55551
55571
  this.visible = false;
@@ -55596,7 +55616,7 @@ let SectionBox$1 = class SectionBox {
55596
55616
  __publicField(this, "_onBoxConfirm", new distExports.SimpleEventDispatcher());
55597
55617
  __publicField(this, "_onHover", new distExports.SimpleEventDispatcher());
55598
55618
  this._viewer = viewer;
55599
- this._gizmos = new SectionBoxGizmo(viewer.renderer);
55619
+ this._gizmos = new SectionBoxGizmo(viewer.renderer, viewer.camera);
55600
55620
  this._inputs = new BoxInputs(
55601
55621
  viewer,
55602
55622
  this._gizmos.handles,
@@ -55611,6 +55631,9 @@ let SectionBox$1 = class SectionBox {
55611
55631
  this.update();
55612
55632
  };
55613
55633
  this._inputs.onBoxConfirm = (box) => this._onBoxConfirm.dispatch(box);
55634
+ viewer.renderer.onBoxUpdated.subscribe(() => {
55635
+ this.fitBox(viewer.renderer.getBoundingBox());
55636
+ });
55614
55637
  this.clip = false;
55615
55638
  this.visible = false;
55616
55639
  this.interactive = false;
@@ -55711,6 +55734,7 @@ let SectionBox$1 = class SectionBox {
55711
55734
  set visible(value) {
55712
55735
  if (value === this._visible) return;
55713
55736
  this._gizmos.visible = value;
55737
+ this._visible = value;
55714
55738
  if (value) {
55715
55739
  this.update();
55716
55740
  }
@@ -55727,11 +55751,10 @@ let SectionBox$1 = class SectionBox {
55727
55751
  * @param box - The bounding box to match (required).
55728
55752
  * @param padding - The scalar amount by which to expand the bounding box. Default is `1`.
55729
55753
  */
55730
- fitBox(box, padding = 1) {
55754
+ fitBox(box) {
55731
55755
  if (!box) return;
55732
- const b = box.expandByScalar(padding);
55733
- this._gizmos.fitBox(b);
55734
- this.renderer.section.fitBox(b);
55756
+ this._gizmos.fitBox(box);
55757
+ this.renderer.section.fitBox(box);
55735
55758
  this._onBoxConfirm.dispatch(this.box);
55736
55759
  this.renderer.needsUpdate = true;
55737
55760
  }
@@ -55741,7 +55764,7 @@ let SectionBox$1 = class SectionBox {
55741
55764
  * Call this if the renderer's section box is changed by code outside this class.
55742
55765
  */
55743
55766
  update() {
55744
- this.fitBox(this.section.box, 0);
55767
+ this.fitBox(this.section.box);
55745
55768
  this.renderer.needsUpdate = true;
55746
55769
  }
55747
55770
  /**
@@ -55763,7 +55786,7 @@ class Gizmos {
55763
55786
  /**
55764
55787
  * The section box gizmo.
55765
55788
  */
55766
- __publicField(this, "section");
55789
+ __publicField(this, "sectionBox");
55767
55790
  /**
55768
55791
  * The loading indicator gizmo.
55769
55792
  */
@@ -55787,7 +55810,7 @@ class Gizmos {
55787
55810
  var _a2;
55788
55811
  this.viewer = viewer;
55789
55812
  this._measure = new Measure(viewer);
55790
- this.section = new SectionBox$1(viewer);
55813
+ this.sectionBox = new SectionBox$1(viewer);
55791
55814
  this.loading = new GizmoLoading(viewer);
55792
55815
  this.orbit = new GizmoOrbit(
55793
55816
  viewer.renderer,
@@ -55816,7 +55839,7 @@ class Gizmos {
55816
55839
  var _a2;
55817
55840
  (_a2 = this.viewer.viewport.canvas.parentElement) == null ? void 0 : _a2.removeChild(this.axes.canvas);
55818
55841
  this._measure.clear();
55819
- this.section.dispose();
55842
+ this.sectionBox.dispose();
55820
55843
  this.loading.dispose();
55821
55844
  this.orbit.dispose();
55822
55845
  this.rectangle.dispose();
@@ -55831,16 +55854,16 @@ class RenderingSection {
55831
55854
  /**
55832
55855
  * Current section box. To update the box use fitbox.
55833
55856
  */
55834
- __publicField(this, "box", new Box3$1(
55835
- new Vector3$1(-100, -100, -100),
55836
- new Vector3$1(100, 100, 100)
55857
+ __publicField(this, "box", new Box3(
55858
+ new Vector3(-100, -100, -100),
55859
+ new Vector3(100, 100, 100)
55837
55860
  ));
55838
- __publicField(this, "maxX", new Plane(new Vector3$1(-1, 0, 0)));
55839
- __publicField(this, "minX", new Plane(new Vector3$1(1, 0, 0)));
55840
- __publicField(this, "maxY", new Plane(new Vector3$1(0, -1, 0)));
55841
- __publicField(this, "minY", new Plane(new Vector3$1(0, 1, 0)));
55842
- __publicField(this, "maxZ", new Plane(new Vector3$1(0, 0, -1)));
55843
- __publicField(this, "minZ", new Plane(new Vector3$1(0, 0, 1)));
55861
+ __publicField(this, "maxX", new Plane(new Vector3(-1, 0, 0)));
55862
+ __publicField(this, "minX", new Plane(new Vector3(1, 0, 0)));
55863
+ __publicField(this, "maxY", new Plane(new Vector3(0, -1, 0)));
55864
+ __publicField(this, "minY", new Plane(new Vector3(0, 1, 0)));
55865
+ __publicField(this, "maxZ", new Plane(new Vector3(0, 0, -1)));
55866
+ __publicField(this, "minZ", new Plane(new Vector3(0, 0, 1)));
55844
55867
  __publicField(this, "planes", [
55845
55868
  this.maxX,
55846
55869
  this.minX,
@@ -56057,7 +56080,7 @@ class EffectComposer {
56057
56080
  this.renderer = renderer;
56058
56081
  this._pixelRatio = renderer.getPixelRatio();
56059
56082
  if (renderTarget === void 0) {
56060
- const size = renderer.getSize(new Vector2$1());
56083
+ const size = renderer.getSize(new Vector2());
56061
56084
  this._width = size.width;
56062
56085
  this._height = size.height;
56063
56086
  renderTarget = new WebGLRenderTarget(this._width * this._pixelRatio, this._height * this._pixelRatio, { type: HalfFloatType });
@@ -56137,7 +56160,7 @@ class EffectComposer {
56137
56160
  }
56138
56161
  reset(renderTarget) {
56139
56162
  if (renderTarget === void 0) {
56140
- const size = this.renderer.getSize(new Vector2$1());
56163
+ const size = this.renderer.getSize(new Vector2());
56141
56164
  this._pixelRatio = this.renderer.getPixelRatio();
56142
56165
  this._width = size.width;
56143
56166
  this._height = size.height;
@@ -56225,7 +56248,7 @@ const FXAAShader = {
56225
56248
  name: "FXAAShader",
56226
56249
  uniforms: {
56227
56250
  "tDiffuse": { value: null },
56228
- "resolution": { value: new Vector2$1(1 / 1024, 1 / 512) }
56251
+ "resolution": { value: new Vector2(1 / 1024, 1 / 512) }
56229
56252
  },
56230
56253
  vertexShader: (
56231
56254
  /* glsl */
@@ -56512,7 +56535,7 @@ class OutlinePass extends Pass {
56512
56535
  this.needsSwap = true;
56513
56536
  }
56514
56537
  setSize(width, height) {
56515
- this.material.resolution = new Vector2$1(width, height);
56538
+ this.material.resolution = new Vector2(width, height);
56516
56539
  }
56517
56540
  get camera() {
56518
56541
  return this.material.camera;
@@ -56752,7 +56775,7 @@ class RenderingComposer {
56752
56775
  * @param height - New height in pixels
56753
56776
  */
56754
56777
  setSize(width, height) {
56755
- this._size = new Vector2$1(width, height);
56778
+ this._size = new Vector2(width, height);
56756
56779
  this._sceneTarget.setSize(width, height);
56757
56780
  this._renderPass.setSize(width, height);
56758
56781
  this._composer.setSize(width, height);
@@ -56945,7 +56968,7 @@ let Renderer$1 = class Renderer {
56945
56968
  * @param target - Box in which to copy the result. A new instance is created if undefined.
56946
56969
  * @returns The bounding box encompassing all rendered objects.
56947
56970
  */
56948
- getBoundingBox(target = new Box3$1()) {
56971
+ getBoundingBox(target = new Box3()) {
56949
56972
  return this._scene.getBoundingBox(target);
56950
56973
  }
56951
56974
  /**
@@ -57308,7 +57331,7 @@ function strToVector3(str) {
57308
57331
  const x = Number.parseFloat(split2[0]);
57309
57332
  const y = Number.parseFloat(split2[1]);
57310
57333
  const z = Number.parseFloat(split2[2]);
57311
- return new Vector3$1(x, y, z);
57334
+ return new Vector3(x, y, z);
57312
57335
  } catch {
57313
57336
  }
57314
57337
  }
@@ -57320,7 +57343,7 @@ function strToVector2(str) {
57320
57343
  try {
57321
57344
  const x = Number.parseFloat(split2[0]);
57322
57345
  const y = Number.parseFloat(split2[1]);
57323
- return new Vector2$1(x, y);
57346
+ return new Vector2(x, y);
57324
57347
  } catch {
57325
57348
  }
57326
57349
  }
@@ -57353,8 +57376,8 @@ function removeUndefinedProperties(obj) {
57353
57376
  return result;
57354
57377
  }
57355
57378
  function createBoxes(boxes) {
57356
- const center = new Vector3$1();
57357
- const size = new Vector3$1();
57379
+ const center = new Vector3();
57380
+ const size = new Vector3();
57358
57381
  const quaternion = new Quaternion();
57359
57382
  const matrices = boxes.map((b) => {
57360
57383
  b.getCenter(center);
@@ -57430,134 +57453,11 @@ class InputHandler2 {
57430
57453
  });
57431
57454
  }
57432
57455
  }
57433
- class Vector32 {
57434
- constructor(x = 0, y = 0, z = 0) {
57435
- __publicField(this, "x");
57436
- __publicField(this, "y");
57437
- __publicField(this, "z");
57438
- this.x = x;
57439
- this.y = y;
57440
- this.z = z;
57441
- }
57442
- set(x, y, z) {
57443
- this.x = x;
57444
- this.y = y;
57445
- this.z = z;
57446
- return this;
57447
- }
57448
- copy(v) {
57449
- this.x = v.x;
57450
- this.y = v.y;
57451
- this.z = v.z;
57452
- return this;
57453
- }
57454
- add(v) {
57455
- this.x += v.x;
57456
- this.y += v.y;
57457
- this.z += v.z;
57458
- return this;
57459
- }
57460
- sub(v) {
57461
- this.x -= v.x;
57462
- this.y -= v.y;
57463
- this.z -= v.z;
57464
- return this;
57465
- }
57466
- multiplyScalar(scalar) {
57467
- this.x *= scalar;
57468
- this.y *= scalar;
57469
- this.z *= scalar;
57470
- return this;
57471
- }
57472
- min(v) {
57473
- this.x = Math.min(this.x, v.x);
57474
- this.y = Math.min(this.y, v.y);
57475
- this.z = Math.min(this.z, v.z);
57476
- return this;
57477
- }
57478
- max(v) {
57479
- this.x = Math.max(this.x, v.x);
57480
- this.y = Math.max(this.y, v.y);
57481
- this.z = Math.max(this.z, v.z);
57482
- return this;
57483
- }
57484
- isValid() {
57485
- return Number.isFinite(this.x) && Number.isFinite(this.y) && Number.isFinite(this.z);
57486
- }
57487
- equals(v) {
57488
- return this.x === v.x && this.y === v.y && this.z === v.z;
57489
- }
57490
- toArray() {
57491
- return [this.x, this.y, this.z];
57492
- }
57493
- }
57494
- class Vector22 {
57495
- constructor(x = 0, y = 0) {
57496
- __publicField(this, "x");
57497
- __publicField(this, "y");
57498
- this.x = x;
57499
- this.y = y;
57500
- }
57501
- set(x, y) {
57502
- this.x = x;
57503
- this.y = y;
57504
- return this;
57505
- }
57506
- copy(v) {
57507
- this.x = v.x;
57508
- this.y = v.y;
57509
- return this;
57510
- }
57511
- add(v) {
57512
- this.x += v.x;
57513
- this.y += v.y;
57514
- return this;
57515
- }
57516
- sub(v) {
57517
- this.x -= v.x;
57518
- this.y -= v.y;
57519
- return this;
57520
- }
57521
- multiplyScalar(scalar) {
57522
- this.x *= scalar;
57523
- this.y *= scalar;
57524
- return this;
57525
- }
57526
- min(v) {
57527
- this.x = Math.min(this.x, v.x);
57528
- this.y = Math.min(this.y, v.y);
57529
- return this;
57530
- }
57531
- max(v) {
57532
- this.x = Math.max(this.x, v.x);
57533
- this.y = Math.max(this.y, v.y);
57534
- return this;
57535
- }
57536
- equals(v) {
57537
- return this.x === v.x && this.y === v.y;
57538
- }
57539
- isValid() {
57540
- return Number.isFinite(this.x) && Number.isFinite(this.y);
57541
- }
57542
- almostEquals(v, tolerance = Number.EPSILON) {
57543
- return Math.abs(this.x - v.x) < tolerance && Math.abs(this.y - v.y) < tolerance;
57544
- }
57545
- toArray() {
57546
- return [this.x, this.y];
57547
- }
57548
- distanceTo(v) {
57549
- const dx = this.x - v.x;
57550
- const dy = this.y - v.y;
57551
- return Math.sqrt(dx * dx + dy * dy);
57552
- }
57553
- clamp01() {
57554
- this.x = clamp$1(this.x, 0, 1);
57555
- this.y = clamp$1(this.y, 0, 1);
57556
- return this;
57557
- }
57456
+ function almostEqual(v1, v2, epsilon = 1e-6) {
57457
+ return Math.abs(v1.x - v2.x) < epsilon && Math.abs(v1.y - v2.y) < epsilon;
57558
57458
  }
57559
57459
  class Segment {
57560
- constructor(origin = new Vector32(), target = new Vector32()) {
57460
+ constructor(origin = new Vector3(), target = new Vector3()) {
57561
57461
  __publicField(this, "origin");
57562
57462
  __publicField(this, "target");
57563
57463
  this.origin = origin;
@@ -57565,8 +57465,8 @@ class Segment {
57565
57465
  }
57566
57466
  static fromArray(array) {
57567
57467
  return new Segment(
57568
- new Vector32(array[0], array[1], array[2]),
57569
- new Vector32(array[3], array[4], array[5])
57468
+ new Vector3(array[0], array[1], array[2]),
57469
+ new Vector3(array[3], array[4], array[5])
57570
57470
  );
57571
57471
  }
57572
57472
  toArray() {
@@ -57579,62 +57479,6 @@ class Segment {
57579
57479
  return this.origin.equals(segment.origin) && this.target.equals(segment.target);
57580
57480
  }
57581
57481
  }
57582
- class Box32 {
57583
- constructor(min2 = new Vector32(Infinity, Infinity, Infinity), max2 = new Vector32(-Infinity, -Infinity, -Infinity)) {
57584
- __publicField(this, "min");
57585
- __publicField(this, "max");
57586
- this.min = min2;
57587
- this.max = max2;
57588
- }
57589
- static fromArray(array) {
57590
- return new Box32().set(
57591
- new Vector32(array[0], array[1], array[2]),
57592
- new Vector32(array[3], array[4], array[5])
57593
- );
57594
- }
57595
- isValid() {
57596
- return this.min.x <= this.max.x && this.min.y <= this.max.y && this.min.z <= this.max.z;
57597
- }
57598
- set(min2, max2) {
57599
- this.min.copy(min2);
57600
- this.max.copy(max2);
57601
- return this;
57602
- }
57603
- setFromPoints(points) {
57604
- this.min.set(Infinity, Infinity, Infinity);
57605
- this.max.set(-Infinity, -Infinity, -Infinity);
57606
- points.forEach((point) => {
57607
- this.min.min(point);
57608
- this.max.max(point);
57609
- });
57610
- return this;
57611
- }
57612
- getCenter(target = new Vector32()) {
57613
- return target.copy(this.min).add(this.max).multiplyScalar(0.5);
57614
- }
57615
- getSize(target = new Vector32()) {
57616
- return target.copy(this.max).sub(this.min);
57617
- }
57618
- containsPoint(point) {
57619
- 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;
57620
- }
57621
- intersectsBox(box) {
57622
- 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);
57623
- }
57624
- expandByPoint(point) {
57625
- this.min.min(point);
57626
- this.max.max(point);
57627
- return this;
57628
- }
57629
- union(box) {
57630
- this.min.min(box.min);
57631
- this.max.max(box.max);
57632
- return this;
57633
- }
57634
- toArray() {
57635
- return [this.min.x, this.min.y, this.min.z, this.max.x, this.max.y, this.max.z];
57636
- }
57637
- }
57638
57482
  class RGBA {
57639
57483
  constructor(r, g, b, a = 1) {
57640
57484
  __publicField(this, "r");
@@ -57772,7 +57616,7 @@ class InputMouse extends InputHandler2 {
57772
57616
  super();
57773
57617
  __publicField(this, "_rpc");
57774
57618
  __publicField(this, "_canvas");
57775
- __publicField(this, "_lastMouseDownPosition", new Vector22(0, 0));
57619
+ __publicField(this, "_lastMouseDownPosition", new Vector2(0, 0));
57776
57620
  __publicField(this, "_selection");
57777
57621
  __publicField(this, "_camera");
57778
57622
  this._canvas = canvas;
@@ -57819,7 +57663,7 @@ class InputMouse extends InputHandler2 {
57819
57663
  async handleMouseClick(event) {
57820
57664
  if (event.pointerType !== "mouse") return;
57821
57665
  const pos = this.relativePosition(event);
57822
- if (!this._lastMouseDownPosition.almostEquals(pos, 0.01)) {
57666
+ if (!almostEqual(this._lastMouseDownPosition, pos, 0.01)) {
57823
57667
  return;
57824
57668
  }
57825
57669
  const hit = await this._selection.hitTest(pos);
@@ -57853,7 +57697,7 @@ class InputMouse extends InputHandler2 {
57853
57697
  }
57854
57698
  relativePosition(event) {
57855
57699
  const rect = this._canvas.getBoundingClientRect();
57856
- return new Vector22(
57700
+ return new Vector2(
57857
57701
  event.offsetX / rect.width,
57858
57702
  event.offsetY / rect.height
57859
57703
  );
@@ -57864,7 +57708,7 @@ class InputTouch extends InputHandler2 {
57864
57708
  super();
57865
57709
  __publicField(this, "_rpc");
57866
57710
  __publicField(this, "_canvas");
57867
- __publicField(this, "_lastTouchStartPosition", new Vector22(0, 0));
57711
+ __publicField(this, "_lastTouchStartPosition", new Vector2(0, 0));
57868
57712
  // Add these properties to your InputTouch class
57869
57713
  __publicField(this, "_initialTouchDistance");
57870
57714
  this._canvas = canvas;
@@ -57928,7 +57772,7 @@ class InputTouch extends InputHandler2 {
57928
57772
  if (this.handlePinch(pos1, pos2)) {
57929
57773
  return;
57930
57774
  }
57931
- const avg = new Vector22(
57775
+ const avg = new Vector2(
57932
57776
  (pos1.x + pos2.x) / 2,
57933
57777
  (pos1.y + pos2.y) / 2
57934
57778
  );
@@ -57967,7 +57811,7 @@ class InputTouch extends InputHandler2 {
57967
57811
  handleDoubleTouchEnd(touch1, touch2) {
57968
57812
  const pos1 = this.relativeTouchPosition(touch1);
57969
57813
  const pos2 = this.relativeTouchPosition(touch2);
57970
- const avg = new Vector22(
57814
+ const avg = new Vector2(
57971
57815
  (pos1.x + pos2.x) / 2,
57972
57816
  (pos1.y + pos2.y) / 2
57973
57817
  );
@@ -57987,7 +57831,7 @@ class InputTouch extends InputHandler2 {
57987
57831
  }
57988
57832
  relativeTouchPosition(touch) {
57989
57833
  const rect = this._canvas.getBoundingClientRect();
57990
- return new Vector22(
57834
+ return new Vector2(
57991
57835
  (touch.clientX - rect.left) / rect.width,
57992
57836
  (touch.clientY - rect.top) / rect.height
57993
57837
  );
@@ -58155,7 +57999,6 @@ class Marshal {
58155
57999
  }
58156
58000
  // -------------------- SectionBox -------------------
58157
58001
  writeSectionBoxState(data2) {
58158
- this.writeBoolean(data2.enabled);
58159
58002
  this.writeBoolean(data2.visible);
58160
58003
  this.writeBoolean(data2.interactible);
58161
58004
  this.writeBoolean(data2.clip);
@@ -58263,13 +58106,13 @@ class ReadMarshal {
58263
58106
  readVector2() {
58264
58107
  const x = this.readFloat();
58265
58108
  const y = this.readFloat();
58266
- return new Vector22(x, y);
58109
+ return new Vector2(x, y);
58267
58110
  }
58268
58111
  readVector3() {
58269
58112
  const x = this.readFloat();
58270
58113
  const y = this.readFloat();
58271
58114
  const z = this.readFloat();
58272
- return new Vector32(x, y, z);
58115
+ return new Vector3(x, y, z);
58273
58116
  }
58274
58117
  readVector4() {
58275
58118
  const x = this.readFloat();
@@ -58303,7 +58146,7 @@ class ReadMarshal {
58303
58146
  readBox3() {
58304
58147
  const min2 = this.readVector3();
58305
58148
  const max2 = this.readVector3();
58306
- return new Box32(min2, max2);
58149
+ return new Box3(min2, max2);
58307
58150
  }
58308
58151
  readSegment() {
58309
58152
  const position = this.readVector3();
@@ -58311,13 +58154,11 @@ class ReadMarshal {
58311
58154
  return new Segment(position, target);
58312
58155
  }
58313
58156
  readSectionBoxState() {
58314
- const enabled = this.readBoolean();
58315
58157
  const visible2 = this.readBoolean();
58316
58158
  const interactible = this.readBoolean();
58317
58159
  const clip = this.readBoolean();
58318
58160
  const box = this.readBox3();
58319
58161
  return {
58320
- enabled,
58321
58162
  visible: visible2,
58322
58163
  interactible,
58323
58164
  clip,
@@ -58436,6 +58277,12 @@ class RpcClient {
58436
58277
  marshal.writeUInt(componentHandle);
58437
58278
  this._socket.sendRPC(marshal);
58438
58279
  }
58280
+ RPCEnableSectionBox(value) {
58281
+ const marshal = new Marshal();
58282
+ marshal.writeString("RPCEnableSectionBox");
58283
+ marshal.writeBoolean(value);
58284
+ this._socket.sendRPC(marshal);
58285
+ }
58439
58286
  async RPCFrameAll(blendTime) {
58440
58287
  const marshal = new Marshal();
58441
58288
  marshal.writeString("RPCFrameAll");
@@ -58869,17 +58716,14 @@ class Validation {
58869
58716
  // VECTOR AND GEOMETRY VALIDATIONS
58870
58717
  //= ===========================================================================
58871
58718
  static isValidVector2(value) {
58872
- if (!value.isValid()) {
58719
+ if (!Number.isFinite(value.x) || !Number.isFinite(value.y)) {
58873
58720
  console.warn("Invalid value: must be a valid Vector2. Aborting operation.");
58874
58721
  return false;
58875
58722
  }
58876
58723
  return true;
58877
58724
  }
58878
58725
  static isRelativeVector2(value) {
58879
- if (!value.isValid()) {
58880
- console.warn("Invalid value: must be a valid Vector2. Aborting operation.");
58881
- return false;
58882
- }
58726
+ if (!this.isValidVector2(value)) return false;
58883
58727
  if (value.x < 0 || value.x > 1 || value.y < 0 || value.y > 1) {
58884
58728
  console.warn("Invalid value: must be a relative Vector2 (0-1, 0-1). Aborting operation.");
58885
58729
  return false;
@@ -58887,14 +58731,14 @@ class Validation {
58887
58731
  return true;
58888
58732
  }
58889
58733
  static isValidVector3(value) {
58890
- if (!value.isValid()) {
58734
+ if (!Number.isFinite(value.x) || !Number.isFinite(value.y) || !Number.isFinite(value.z)) {
58891
58735
  console.warn("Invalid Vector3. Aborting operation.");
58892
58736
  return false;
58893
58737
  }
58894
58738
  return true;
58895
58739
  }
58896
58740
  static isValidBox(box) {
58897
- if (!box.isValid()) {
58741
+ if (box.isEmpty()) {
58898
58742
  console.warn("Box is invalid. Min values must be less than max values");
58899
58743
  return false;
58900
58744
  }
@@ -59282,6 +59126,9 @@ class RpcSafeClient {
59282
59126
  * SECTION BOX METHODS
59283
59127
  * Methods for controlling section box visibility and position.
59284
59128
  ******************************************************************************/
59129
+ RPCEnableSectionBox(enable) {
59130
+ this.rpc.RPCEnableSectionBox(enable);
59131
+ }
59285
59132
  RPCSetSectionBox(state) {
59286
59133
  this.rpc.RPCSetSectionBox(state);
59287
59134
  }
@@ -59340,14 +59187,14 @@ class RpcSafeClient {
59340
59187
  }
59341
59188
  async getBoundingBoxBatched(componentHandle, nodes) {
59342
59189
  if (nodes.length === 0) {
59343
- return new Box32();
59190
+ return new Box3();
59344
59191
  }
59345
59192
  const batches = batchArray(nodes, this.batchSize);
59346
59193
  const promises = batches.map(async (batch) => {
59347
59194
  const aabb = await this.rpc.RPCGetBoundingBox(componentHandle, batch);
59348
- const v1 = new Vector32(aabb.min.x, aabb.min.y, aabb.min.z);
59349
- const v2 = new Vector32(aabb.max.x, aabb.max.y, aabb.max.z);
59350
- return new Box32(v1, v2);
59195
+ const v1 = new Vector3(aabb.min.x, aabb.min.y, aabb.min.z);
59196
+ const v2 = new Vector3(aabb.max.x, aabb.max.y, aabb.max.z);
59197
+ return new Box3(v1, v2);
59351
59198
  });
59352
59199
  const boxes = await Promise.all(promises);
59353
59200
  const box = boxes[0];
@@ -61432,10 +61279,14 @@ class ViewerSelection {
61432
61279
  __publicField(this, "_rpc");
61433
61280
  __publicField(this, "_vims");
61434
61281
  __publicField(this, "_selectedNodes");
61282
+ __publicField(this, "_onValueChanged", new distExports$1.SignalDispatcher());
61435
61283
  this._rpc = rpc;
61436
61284
  this._vims = vims;
61437
61285
  this._selectedNodes = /* @__PURE__ */ new Map();
61438
61286
  }
61287
+ get onValueChanged() {
61288
+ return this._onValueChanged.asEvent();
61289
+ }
61439
61290
  /**
61440
61291
  * Gets the total number of selected nodes across all VIMs.
61441
61292
  * @returns The total count of selected nodes.
@@ -61504,12 +61355,17 @@ class ViewerSelection {
61504
61355
  nodeSet = /* @__PURE__ */ new Set();
61505
61356
  this._selectedNodes.set(vim, nodeSet);
61506
61357
  }
61358
+ let changed = false;
61507
61359
  nodes.forEach((n) => {
61508
61360
  if (!nodeSet.has(n)) {
61509
61361
  nodeSet.add(n);
61510
61362
  vim.highlight([n]);
61363
+ changed = true;
61511
61364
  }
61512
61365
  });
61366
+ if (changed) {
61367
+ this._onValueChanged.dispatch();
61368
+ }
61513
61369
  }
61514
61370
  /**
61515
61371
  * Removes the specified node(s) from the current selection.
@@ -61521,27 +61377,37 @@ class ViewerSelection {
61521
61377
  const nodeSet = this._selectedNodes.get(vim);
61522
61378
  if (!nodeSet) return;
61523
61379
  const nodes = Array.isArray(node) ? node : [node];
61380
+ let changed = false;
61524
61381
  nodes.forEach((n) => {
61525
61382
  if (nodeSet.has(n)) {
61526
61383
  nodeSet.delete(n);
61527
61384
  vim.removeHighlight([n], "visible");
61385
+ changed = true;
61528
61386
  }
61529
61387
  });
61530
61388
  if (nodeSet.size === 0) {
61531
61389
  this._selectedNodes.delete(vim);
61532
61390
  }
61391
+ if (changed) {
61392
+ this._onValueChanged.dispatch();
61393
+ }
61533
61394
  }
61534
61395
  /**
61535
61396
  * Clears all selections across all VIMs or for a specific VIM.
61536
61397
  * @param vim - Optional. If provided, only clears selections for the specified VIM.
61537
61398
  */
61538
61399
  clear(vim) {
61400
+ let changed = false;
61539
61401
  this._selectedNodes.forEach((nodes, v) => {
61540
61402
  if (vim === void 0 || v === vim) {
61541
61403
  v.removeHighlight(Array.from(nodes), "visible");
61404
+ changed = true;
61542
61405
  }
61543
61406
  });
61544
61407
  this._selectedNodes.clear();
61408
+ if (changed) {
61409
+ this._onValueChanged.dispatch();
61410
+ }
61545
61411
  }
61546
61412
  /**
61547
61413
  * Calculates the bounding box encompassing all selected nodes.
@@ -61570,8 +61436,12 @@ class ViewerSelection {
61570
61436
  class VimCollection {
61571
61437
  constructor() {
61572
61438
  __publicField(this, "_vims");
61439
+ __publicField(this, "_onChanged", new distExports$1.SignalDispatcher());
61573
61440
  this._vims = [];
61574
61441
  }
61442
+ get onChanged() {
61443
+ return this._onChanged.asEvent();
61444
+ }
61575
61445
  get count() {
61576
61446
  return this._vims.length;
61577
61447
  }
@@ -61582,6 +61452,7 @@ class VimCollection {
61582
61452
  add(vim) {
61583
61453
  if (!this._vims.some((v) => v.handle === vim.handle)) {
61584
61454
  this._vims.push(vim);
61455
+ this._onChanged.dispatch();
61585
61456
  }
61586
61457
  }
61587
61458
  /**
@@ -61589,7 +61460,11 @@ class VimCollection {
61589
61460
  * @param vim - The Vim instance to remove.
61590
61461
  */
61591
61462
  remove(vim) {
61463
+ const count = this._vims.length;
61592
61464
  this._vims = this._vims.filter((v) => v.handle !== vim.handle);
61465
+ if (this._vims.length !== count) {
61466
+ this._onChanged.dispatch();
61467
+ }
61593
61468
  }
61594
61469
  /**
61595
61470
  * Gets a Vim instance by its handle.
@@ -61852,11 +61727,10 @@ class Renderer2 {
61852
61727
  }
61853
61728
  class SectionBox2 {
61854
61729
  constructor(rpc) {
61855
- __publicField(this, "_enabled", false);
61856
61730
  __publicField(this, "_visible", true);
61857
61731
  __publicField(this, "_interactible", true);
61858
61732
  __publicField(this, "_clip", true);
61859
- __publicField(this, "_box", new Box32());
61733
+ __publicField(this, "_box", new Box3());
61860
61734
  __publicField(this, "_rpc");
61861
61735
  __publicField(this, "_interval");
61862
61736
  __publicField(this, "_animationFrame");
@@ -61871,6 +61745,7 @@ class SectionBox2 {
61871
61745
  return this._animationFrame > 0;
61872
61746
  }
61873
61747
  async onConnect() {
61748
+ this._rpc.RPCEnableSectionBox(true);
61874
61749
  this.push();
61875
61750
  this._interval = setInterval(() => this.pull(), 1e3);
61876
61751
  }
@@ -61885,10 +61760,9 @@ class SectionBox2 {
61885
61760
  if (this.needUpdate) return;
61886
61761
  const state = await this._rpc.RPCGetSectionBox();
61887
61762
  let changed = false;
61888
- if (state.enabled !== this._enabled || state.visible !== this._visible || state.interactible !== this._interactible || state.clip !== this._clip || state.box !== this._box) {
61763
+ if (state.visible !== this._visible || state.interactible !== this._interactible || state.clip !== this._clip || state.box !== this._box) {
61889
61764
  changed = true;
61890
61765
  }
61891
- this._enabled = state.enabled;
61892
61766
  this._visible = state.visible;
61893
61767
  this._interactible = state.interactible;
61894
61768
  this._clip = state.clip;
@@ -61899,20 +61773,12 @@ class SectionBox2 {
61899
61773
  }
61900
61774
  async push() {
61901
61775
  await this._rpc.RPCSetSectionBox({
61902
- enabled: this._enabled,
61903
61776
  visible: this._visible,
61904
61777
  interactible: this._interactible,
61905
61778
  clip: this._clip,
61906
61779
  box: this._box
61907
61780
  });
61908
61781
  }
61909
- get enabled() {
61910
- return this._enabled;
61911
- }
61912
- set enabled(value) {
61913
- this._enabled = value;
61914
- this.scheduleUpdate();
61915
- }
61916
61782
  get visible() {
61917
61783
  return this._visible;
61918
61784
  }
@@ -61920,10 +61786,10 @@ class SectionBox2 {
61920
61786
  this._visible = value;
61921
61787
  this.scheduleUpdate();
61922
61788
  }
61923
- get interactible() {
61789
+ get interactive() {
61924
61790
  return this._interactible;
61925
61791
  }
61926
- set interactible(value) {
61792
+ set interactive(value) {
61927
61793
  this._interactible = value;
61928
61794
  this.scheduleUpdate();
61929
61795
  }
@@ -62033,6 +61899,9 @@ class Viewer2 {
62033
61899
  get decoder() {
62034
61900
  return this._decoder;
62035
61901
  }
61902
+ get selection() {
61903
+ return this._selection;
61904
+ }
62036
61905
  /**
62037
61906
  * Gets the current URL to which the viewer is connected.
62038
61907
  * @returns The URL as a string, or undefined if not connected.
@@ -62188,7 +62057,7 @@ class Viewer2 {
62188
62057
  }
62189
62058
  const index$2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
62190
62059
  __proto__: null,
62191
- Box3: Box32,
62060
+ Box3,
62192
62061
  ColorHandle,
62193
62062
  INVALID_HANDLE,
62194
62063
  Matrix44: Matrix4,
@@ -62196,10 +62065,11 @@ const index$2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePrope
62196
62065
  RGBA,
62197
62066
  RGBA32,
62198
62067
  Segment,
62199
- Vector2: Vector22,
62200
- Vector3: Vector32,
62068
+ Vector2,
62069
+ Vector3,
62201
62070
  Viewer: Viewer2,
62202
62071
  Vim: Vim2,
62072
+ almostEqual,
62203
62073
  clamp: clamp$1,
62204
62074
  remap,
62205
62075
  utils: promise
@@ -66662,6 +66532,31 @@ var ReactTooltip = staticMethods(_class = windowListener(_class = customEvent(_c
66662
66532
  wrapper: "div",
66663
66533
  clickable: false
66664
66534
  }), _defineProperty(_class2, "supportedWrappers", ["div", "span"]), _defineProperty(_class2, "displayName", "ReactTooltip"), _class2)) || _class) || _class) || _class) || _class) || _class) || _class) || _class;
66535
+ function slidersHoriz({ height, width, fill: fill2, className }) {
66536
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { className, height, width, viewBox: "0 0 256 256", children: [
66537
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
66538
+ "path",
66539
+ {
66540
+ fill: fill2,
66541
+ 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"
66542
+ }
66543
+ ),
66544
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
66545
+ "path",
66546
+ {
66547
+ fill: fill2,
66548
+ 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"
66549
+ }
66550
+ ),
66551
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
66552
+ "path",
66553
+ {
66554
+ fill: fill2,
66555
+ 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"
66556
+ }
66557
+ )
66558
+ ] });
66559
+ }
66665
66560
  function settings({ height, width, fill: fill2, className }) {
66666
66561
  return /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { className, height, width, viewBox: "0 0 256 256", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
66667
66562
  "path",
@@ -67196,6 +67091,60 @@ function measure({ height, width, fill: fill2, className }) {
67196
67091
  )
67197
67092
  ] });
67198
67093
  }
67094
+ function sectionBoxSettings({ height, width, fill: fill2, className }) {
67095
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { className, height, width, viewBox: "0 0 256 256", children: [
67096
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
67097
+ "path",
67098
+ {
67099
+ fill: fill2,
67100
+ 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"
67101
+ }
67102
+ ),
67103
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
67104
+ "path",
67105
+ {
67106
+ fill: fill2,
67107
+ 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"
67108
+ }
67109
+ )
67110
+ ] });
67111
+ }
67112
+ function sectionBoxAuto({ height, width, fill: fill2, className }) {
67113
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { className, height, width, viewBox: "0 0 256 256", children: [
67114
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
67115
+ "path",
67116
+ {
67117
+ fill: fill2,
67118
+ 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"
67119
+ }
67120
+ ),
67121
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
67122
+ "path",
67123
+ {
67124
+ fill: fill2,
67125
+ 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"
67126
+ }
67127
+ )
67128
+ ] });
67129
+ }
67130
+ function sectionBoxVisible({ height, width, fill: fill2, className }) {
67131
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { className, height, width, viewBox: "0 0 256 256", children: [
67132
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
67133
+ "path",
67134
+ {
67135
+ fill: fill2,
67136
+ 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"
67137
+ }
67138
+ ),
67139
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
67140
+ "path",
67141
+ {
67142
+ fill: fill2,
67143
+ 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"
67144
+ }
67145
+ )
67146
+ ] });
67147
+ }
67199
67148
  function sectionBox({ height, width, fill: fill2, className }) {
67200
67149
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { className, height, width, viewBox: "0 0 256 256", children: [
67201
67150
  /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -67214,6 +67163,31 @@ function sectionBox({ height, width, fill: fill2, className }) {
67214
67163
  )
67215
67164
  ] });
67216
67165
  }
67166
+ function sectionBoxDisable({ height, width, fill: fill2, className }) {
67167
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { className, height, width, viewBox: "0 0 256 256", children: [
67168
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
67169
+ "path",
67170
+ {
67171
+ fill: fill2,
67172
+ 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"
67173
+ }
67174
+ ),
67175
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
67176
+ "path",
67177
+ {
67178
+ fill: fill2,
67179
+ 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"
67180
+ }
67181
+ ),
67182
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
67183
+ "path",
67184
+ {
67185
+ fill: fill2,
67186
+ 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"
67187
+ }
67188
+ )
67189
+ ] });
67190
+ }
67217
67191
  function sectionBoxClip({ height, width, fill: fill2, className }) {
67218
67192
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { className, height, width, viewBox: "0 0 256 256", children: [
67219
67193
  /* @__PURE__ */ jsxRuntimeExports.jsx("path", { fill: "none", d: "M0 0h256v256H0z" }),
@@ -67295,6 +67269,24 @@ function sectionBoxShrink({ height, width, fill: fill2, className }) {
67295
67269
  ) })
67296
67270
  ] });
67297
67271
  }
67272
+ function sectionBoxShrink2({ height, width, fill: fill2, className }) {
67273
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { className, height, width, viewBox: "0 0 256 256", children: [
67274
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
67275
+ "path",
67276
+ {
67277
+ fill: fill2,
67278
+ 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"
67279
+ }
67280
+ ),
67281
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
67282
+ "path",
67283
+ {
67284
+ fill: fill2,
67285
+ 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"
67286
+ }
67287
+ )
67288
+ ] });
67289
+ }
67298
67290
  function ghost({ height, width, fill: fill2, className }) {
67299
67291
  return /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { className, width: height, height: width, viewBox: "0 0 20 20", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("g", { "data-name": "ICONS", children: [
67300
67292
  /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -67354,11 +67346,17 @@ const icons = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
67354
67346
  pan,
67355
67347
  perspective,
67356
67348
  sectionBox,
67349
+ sectionBoxAuto,
67357
67350
  sectionBoxClip,
67351
+ sectionBoxDisable,
67358
67352
  sectionBoxIgnore,
67359
67353
  sectionBoxReset,
67354
+ sectionBoxSettings,
67360
67355
  sectionBoxShrink,
67356
+ sectionBoxShrink2,
67357
+ sectionBoxVisible,
67361
67358
  settings,
67359
+ slidersHoriz,
67362
67360
  toggleIsolation,
67363
67361
  trash,
67364
67362
  treeView,
@@ -67378,9 +67376,6 @@ function anyUiAxesButton(settings2) {
67378
67376
  function anyUiCursorButton(settings2) {
67379
67377
  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);
67380
67378
  }
67381
- function anyUiToolButton(settings2) {
67382
- return isTrue(settings2.ui.sectioningMode) || isTrue(settings2.ui.measuringMode) || isTrue(settings2.ui.toggleIsolation);
67383
- }
67384
67379
  function anyUiSettingButton(settings2) {
67385
67380
  return isTrue(settings2.ui.projectInspector) || isTrue(settings2.ui.settings) || isTrue(settings2.ui.help) || isTrue(settings2.ui.maximise);
67386
67381
  }
@@ -67512,7 +67507,7 @@ function AxesPanel(props) {
67512
67507
  }
67513
67508
  );
67514
67509
  const hidden2 = isTrue(props.settings.value.ui.axesPanel) ? "" : " vc-hidden";
67515
- const createBar2 = () => {
67510
+ const createBar = () => {
67516
67511
  if (!anyUiAxesButton(props.settings.value)) {
67517
67512
  return (
67518
67513
  // Keeps layout when all buttons are disabled.
@@ -67534,7 +67529,7 @@ function AxesPanel(props) {
67534
67529
  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,
67535
67530
  children: [
67536
67531
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: gizmoDiv, className: "vim-axes-panel-gizmo vc-absolute vc-pointer-events-auto" }),
67537
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vim-axes-panel-bar vc-absolute vc-top-[75%] vc-bottom-0 vc-right-0 vc-left-0", children: createBar2() })
67532
+ /* @__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() })
67538
67533
  ]
67539
67534
  }
67540
67535
  );
@@ -67543,22 +67538,96 @@ const btnStyle = "vim-control-bar-button vc-rounded-full vc-items-center vc-just
67543
67538
  function buttonDefaultStyle(on) {
67544
67539
  return on ? btnStyle + " vc-text-primary" : btnStyle + " vc-text-gray-medium";
67545
67540
  }
67541
+ function buttonExpandStyle(on) {
67542
+ return on ? btnStyle + " vc-text-white vc-bg-primary" : btnStyle + " vc-text-gray-medium";
67543
+ }
67544
+ function buttonDisableStyle(on) {
67545
+ return on ? btnStyle + " vc-text-gray-medium" : btnStyle + " vc-text-gray vc-pointer-events-none";
67546
+ }
67546
67547
  function buttonBlueStyle(on) {
67547
67548
  return btnStyle + " vc-text-white";
67548
67549
  }
67549
67550
  function createButton(button) {
67550
67551
  var _a2;
67551
67552
  if (button.enabled !== void 0 && !button.enabled()) return null;
67552
- const style = button.style((_a2 = button.isOn) == null ? void 0 : _a2.call(button));
67553
- 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);
67553
+ const style = (button.style ?? buttonDefaultStyle)((_a2 = button.isOn) == null ? void 0 : _a2.call(button));
67554
+ 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);
67554
67555
  }
67555
- const sectionStyle = "vc-flex vc-items-center vc-rounded-full vc-mb-2 vc-px-2 vc-shadow-md";
67556
+ const sectionStyle = "vc-flex vc-items-center vc-rounded-full vc-mb-2 vc-shadow-md";
67556
67557
  const sectionDefaultStyle = sectionStyle + " vc-bg-white";
67557
67558
  const sectionBlueStyle = sectionStyle + " vc-bg-primary";
67559
+ const sectionNoPadStyle = sectionStyle.replace("vc-px-2", "") + " vc-bg-white";
67558
67560
  function createSection$1(section) {
67559
67561
  if (section.enable !== void 0 && !section.enable()) return null;
67560
- return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `vim-control-bar-section ${section.style}`, children: section.buttons.map((b) => createButton(b)) }, section.id);
67562
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `vim-control-bar-section ${section.style ?? sectionDefaultStyle}`, children: section.buttons.map((b) => createButton(b)) }, section.id);
67563
+ }
67564
+ const elementIds = {
67565
+ // Sections
67566
+ sectionCamera: "controlBar.sectionCamera",
67567
+ sectionActions: "controlBar.sectionActions",
67568
+ sectionTools: "controlBar.sectionTools",
67569
+ sectionSettings: "controlBar.sectionSettings",
67570
+ sectionMeasure: "controlBar.sectionMeasure",
67571
+ sectionSectionBox: "controlBar.sectionSectionBox",
67572
+ // Camera buttons
67573
+ buttonCameraOrbit: "controlBar.camera.orbit",
67574
+ buttonCameraLook: "controlBarcamera.look",
67575
+ buttonCameraPan: "controlBar.camera.pan",
67576
+ buttonCameraZoom: "controlBar.camera.zoom",
67577
+ buttonCameraZoomWindow: "controlBar.camera.zoomWindow",
67578
+ // Settings buttons
67579
+ buttonProjectInspector: "controlBar.projectInspector",
67580
+ buttonSettings: "controlBar.settings",
67581
+ buttonHelp: "controlBar.help",
67582
+ buttonMaximize: "controlBar.maximize",
67583
+ // Action Buttons
67584
+ buttonToggleIsolation: "controlBar.action.toggleIsolation",
67585
+ buttonZoomToFit: "controlBar.action.zoomToFit",
67586
+ // Tools buttons
67587
+ buttonSectionBox: "controlBar.sectionBox",
67588
+ buttonMeasure: "controlBar.measure",
67589
+ // Section box buttons
67590
+ buttonSectionBoxEnable: "controlBar.sectionBox.enable",
67591
+ buttonSectionBoxVisible: "controlBar.sectionBox.visible",
67592
+ buttonSectionBoxShrinkToSelection: "controlBar.sectionBox.shrinkToSelection",
67593
+ buttonSectionBoxAuto: "controlBar.sectionBox.auto",
67594
+ buttonSectionBoxClip: "controlBar.sectionBox.clip",
67595
+ buttonSectionBoxSettings: "controlBar.sectionBox.settings"
67596
+ };
67597
+ function ControlBar(props) {
67598
+ useEffect(() => {
67599
+ ReactTooltip.rebuild();
67600
+ });
67601
+ if (!props.show) {
67602
+ return null;
67603
+ }
67604
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
67605
+ "div",
67606
+ {
67607
+ style: {
67608
+ gap: "min(10px, 2%)",
67609
+ bottom: "min(36px, 10%)"
67610
+ },
67611
+ id: "vim-control-bar",
67612
+ 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",
67613
+ children: props.content.map(createSection$1)
67614
+ }
67615
+ );
67561
67616
  }
67617
+ const controlBar = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
67618
+ __proto__: null,
67619
+ ControlBar,
67620
+ buttonBlueStyle,
67621
+ buttonDefaultStyle,
67622
+ buttonDisableStyle,
67623
+ buttonExpandStyle,
67624
+ createButton,
67625
+ createSection: createSection$1,
67626
+ elementIds,
67627
+ sectionBlueStyle,
67628
+ sectionDefaultStyle,
67629
+ sectionNoPadStyle
67630
+ }, Symbol.toStringTag, { value: "Module" }));
67562
67631
  function getPointerState(viewer) {
67563
67632
  const [mode, setMode] = useState(viewer.inputs.pointerActive);
67564
67633
  useEffect(() => {
@@ -67620,52 +67689,6 @@ function getFullScreenState() {
67620
67689
  }
67621
67690
  };
67622
67691
  }
67623
- function getSectionBoxState(viewer) {
67624
- const sectionGizmo = viewer.gizmos.section;
67625
- const first = useRef(true);
67626
- const [section, setSection] = useState({
67627
- clip: sectionGizmo.clip,
67628
- active: sectionGizmo.visible && sectionGizmo.interactive
67629
- });
67630
- useEffect(() => {
67631
- const subSection = sectionGizmo.onStateChanged.subscribe(
67632
- () => setSection({
67633
- clip: sectionGizmo.clip,
67634
- active: sectionGizmo.visible && sectionGizmo.interactive
67635
- })
67636
- );
67637
- return () => subSection();
67638
- }, []);
67639
- const toggle = () => {
67640
- ReactTooltip.hide();
67641
- if (viewer.inputs.pointerActive === "rect") {
67642
- viewer.inputs.pointerActive = viewer.inputs.pointerFallback;
67643
- }
67644
- const next = !(sectionGizmo.visible && sectionGizmo.interactive);
67645
- sectionGizmo.interactive = next;
67646
- sectionGizmo.visible = next;
67647
- if (next && first.current) {
67648
- sectionGizmo.clip = true;
67649
- sectionGizmo.fitBox(viewer.renderer.getBoundingBox());
67650
- first.current = false;
67651
- }
67652
- };
67653
- return {
67654
- clip: section.clip,
67655
- active: section.active,
67656
- set: setSection,
67657
- toggle,
67658
- hide: () => {
67659
- sectionGizmo.visible = false;
67660
- sectionGizmo.interactive = false;
67661
- },
67662
- reset: () => sectionGizmo.fitBox(viewer.renderer.getBoundingBox()),
67663
- shrinkToSelection: () => sectionGizmo.fitBox(viewer.selection.getBoundingBox()),
67664
- toggleClip: () => {
67665
- sectionGizmo.clip = !section.clip;
67666
- }
67667
- };
67668
- }
67669
67692
  function pointerToCursor(pointer) {
67670
67693
  switch (pointer) {
67671
67694
  case "orbit":
@@ -67717,13 +67740,13 @@ class CursorManager {
67717
67740
  const sub2 = this._viewer.inputs.onPointerOverrideChanged.subscribe(
67718
67741
  () => this._updateCursor()
67719
67742
  );
67720
- const sub3 = this._viewer.gizmos.section.onStateChanged.subscribe(() => {
67721
- if (!this._viewer.gizmos.section.visible) {
67743
+ const sub3 = this._viewer.gizmos.sectionBox.onStateChanged.subscribe(() => {
67744
+ if (!this._viewer.gizmos.sectionBox.visible) {
67722
67745
  this._boxHover = false;
67723
67746
  this._updateCursor();
67724
67747
  }
67725
67748
  });
67726
- const sub4 = this._viewer.gizmos.section.onHover.subscribe((hover) => {
67749
+ const sub4 = this._viewer.gizmos.sectionBox.onHover.subscribe((hover) => {
67727
67750
  this._boxHover = hover;
67728
67751
  this._updateCursor();
67729
67752
  });
@@ -67786,59 +67809,77 @@ function getMeasureState(viewer, cursor) {
67786
67809
  clear
67787
67810
  };
67788
67811
  }
67789
- const elementIds = {
67790
- // Sections
67791
- sectionCamera: "controlBar.sectionCamera",
67792
- sectionTools: "controlBar.sectionTools",
67793
- sectionSettings: "controlBar.sectionSettings",
67794
- sectionMeasure: "controlBar.sectionMeasure",
67795
- sectionSectionBox: "controlBar.sectionSectionBox",
67796
- // Camera buttons
67797
- buttonCameraOrbit: "controlBar.camera.orbit",
67798
- buttonCameraLook: "controlBarcamera.look",
67799
- buttonCameraPan: "controlBar.camera.pan",
67800
- buttonCameraZoom: "controlBar.camera.zoom",
67801
- buttonCameraZoomWindow: "controlBar.camera.zoomWindow",
67802
- buttonCameraZoomToFit: "controlBar.camera.zoomToFit",
67803
- // Settings buttons
67804
- buttonProjectInspector: "controlBar.projectInspector",
67805
- buttonSettings: "controlBar.settings",
67806
- buttonHelp: "controlBar.help",
67807
- buttonMaximize: "controlBar.maximize",
67808
- // Tools buttons
67809
- buttonSectionBox: "controlBar.sectionBox",
67810
- buttonMeasure: "controlBar.measure",
67811
- buttonToggleIsolation: "controlBar.toggleIsolation",
67812
- // Measure buttons
67813
- buttonMeasureDelete: "controlBar.measure.delete",
67814
- buttonMeasureDone: "controlBar.measure.done",
67815
- // Section box buttons
67816
- buttonSectionBoxReset: "controlBar.sectionBox.reset",
67817
- buttonSectionBoxShrinkToSelection: "controlBar.sectionBox.shrinkToSelection",
67818
- buttonSectionBoxClip: "controlBar.sectionBox.clip",
67819
- buttonSectionBoxIgnore: "controlBar.sectionBox.ignore",
67820
- buttonSectionBoxDone: "controlBar.sectionBox.done"
67821
- };
67822
- function ControlBar(props) {
67823
- var _a2;
67824
- const pointer = getPointerState(props.viewer);
67825
- const fullScreen = getFullScreenState();
67826
- const section = getSectionBoxState(props.viewer);
67827
- const measure$1 = getMeasureState(props.viewer, props.cursor);
67828
- useEffect(() => {
67829
- ReactTooltip.rebuild();
67830
- });
67831
- if (isFalse(props.settings.ui.controlBar)) {
67832
- return null;
67833
- }
67834
- const cameraSection = {
67812
+ function controlBarSectionBox(section, hasSelection) {
67813
+ return {
67814
+ id: elementIds.sectionSectionBox,
67815
+ style: section.enable.get() ? sectionNoPadStyle : sectionDefaultStyle,
67816
+ //enable: () => section.getEnable(),
67817
+ buttons: [
67818
+ {
67819
+ id: elementIds.buttonSectionBoxEnable,
67820
+ tip: "Enable Section Box",
67821
+ isOn: () => section.enable.get(),
67822
+ style: (on) => buttonExpandStyle(on),
67823
+ action: () => section.enable.set(!section.enable.get()),
67824
+ icon: sectionBox
67825
+ },
67826
+ {
67827
+ id: elementIds.buttonSectionBoxShrinkToSelection,
67828
+ tip: "Fit Section",
67829
+ enabled: () => section.enable.get(),
67830
+ isOn: () => hasSelection,
67831
+ style: (on) => buttonDisableStyle(on),
67832
+ action: () => section.sectionSelection(),
67833
+ icon: sectionBoxShrink
67834
+ },
67835
+ {
67836
+ id: elementIds.buttonSectionBoxClip,
67837
+ tip: "Reset Section",
67838
+ enabled: () => section.enable.get(),
67839
+ style: (on) => buttonDefaultStyle(on),
67840
+ action: () => section.sectionReset(),
67841
+ icon: sectionBoxReset
67842
+ },
67843
+ {
67844
+ id: elementIds.buttonSectionBoxVisible,
67845
+ tip: "Show Section Box",
67846
+ enabled: () => section.enable.get(),
67847
+ isOn: () => section.visible.get(),
67848
+ style: (on) => buttonDefaultStyle(on),
67849
+ action: () => section.visible.set(!section.visible.get()),
67850
+ icon: visible
67851
+ },
67852
+ {
67853
+ id: elementIds.buttonSectionBoxAuto,
67854
+ tip: "Auto Section",
67855
+ enabled: () => section.enable.get(),
67856
+ isOn: () => section.auto.get(),
67857
+ style: (on) => buttonDefaultStyle(on),
67858
+ action: () => section.auto.set(!section.auto.get()),
67859
+ icon: sectionBoxAuto
67860
+ },
67861
+ {
67862
+ id: elementIds.buttonSectionBoxSettings,
67863
+ tip: "Section Settings",
67864
+ enabled: () => section.enable.get(),
67865
+ isOn: () => section.showOffsetPanel.get(),
67866
+ style: (on) => buttonDefaultStyle(on),
67867
+ action: () => section.showOffsetPanel.set(!section.showOffsetPanel.get()),
67868
+ icon: slidersHoriz
67869
+ }
67870
+ ]
67871
+ };
67872
+ }
67873
+ function controlBarPointer(viewer, camera2, settings2, section) {
67874
+ const pointer = getPointerState(viewer);
67875
+ return {
67835
67876
  id: elementIds.sectionCamera,
67836
- enable: () => anyUiCursorButton(props.settings),
67877
+ enable: () => anyUiCursorButton(settings2),
67837
67878
  style: sectionDefaultStyle,
67838
67879
  buttons: [
67839
67880
  {
67840
67881
  id: elementIds.buttonCameraOrbit,
67841
- enabled: () => isTrue(props.settings.ui.orbit),
67882
+ enabled: () => isTrue(settings2.ui.orbit),
67842
67883
  tip: "Orbit",
67843
67884
  action: () => pointer.onButton("orbit"),
67844
67885
  icon: orbit,
@@ -67847,7 +67888,7 @@ function ControlBar(props) {
67847
67888
  },
67848
67889
  {
67849
67890
  id: elementIds.buttonCameraLook,
67850
- enabled: () => isTrue(props.settings.ui.lookAround),
67891
+ enabled: () => isTrue(settings2.ui.lookAround),
67851
67892
  tip: "Look Around",
67852
67893
  action: () => pointer.onButton("look"),
67853
67894
  icon: look,
@@ -67856,7 +67897,7 @@ function ControlBar(props) {
67856
67897
  },
67857
67898
  {
67858
67899
  id: elementIds.buttonCameraPan,
67859
- enabled: () => isTrue(props.settings.ui.pan),
67900
+ enabled: () => isTrue(settings2.ui.pan),
67860
67901
  tip: "Pan",
67861
67902
  action: () => pointer.onButton("pan"),
67862
67903
  icon: pan,
@@ -67865,7 +67906,7 @@ function ControlBar(props) {
67865
67906
  },
67866
67907
  {
67867
67908
  id: elementIds.buttonCameraZoom,
67868
- enabled: () => isTrue(props.settings.ui.zoom),
67909
+ enabled: () => isTrue(settings2.ui.zoom),
67869
67910
  tip: "Zoom",
67870
67911
  action: () => pointer.onButton("zoom"),
67871
67912
  icon: zoom,
@@ -67874,59 +67915,87 @@ function ControlBar(props) {
67874
67915
  },
67875
67916
  {
67876
67917
  id: elementIds.buttonCameraZoomWindow,
67877
- enabled: () => isTrue(props.settings.ui.zoomWindow),
67918
+ enabled: () => isTrue(settings2.ui.zoomWindow),
67878
67919
  tip: "Zoom Window",
67879
67920
  action: () => {
67880
67921
  pointer.onButton("rect");
67881
- section.hide();
67882
67922
  },
67883
67923
  icon: frameRect,
67884
67924
  isOn: () => pointer.mode === "rect",
67885
67925
  style: buttonDefaultStyle
67886
- },
67926
+ }
67927
+ ]
67928
+ };
67929
+ }
67930
+ function controlBarActions(camera2, settings2, isolation, measure$1) {
67931
+ return {
67932
+ id: elementIds.sectionActions,
67933
+ enable: () => true,
67934
+ style: sectionDefaultStyle,
67935
+ buttons: [
67887
67936
  {
67888
- id: elementIds.buttonCameraZoomToFit,
67889
- enabled: () => isTrue(props.settings.ui.zoomToFit),
67937
+ id: elementIds.buttonZoomToFit,
67938
+ enabled: () => isTrue(settings2.ui.zoomToFit),
67890
67939
  tip: "Zoom to Fit",
67891
- action: () => props.camera.frameContext(),
67940
+ action: () => camera2.frameContext(),
67892
67941
  icon: frameSelection,
67893
67942
  isOn: () => false,
67894
67943
  style: buttonDefaultStyle
67944
+ },
67945
+ {
67946
+ id: elementIds.buttonToggleIsolation,
67947
+ enabled: () => isTrue(settings2.ui.toggleIsolation),
67948
+ tip: "Toggle Isolation",
67949
+ action: () => isolation.toggle("controlBar"),
67950
+ icon: toggleIsolation,
67951
+ style: buttonDefaultStyle
67952
+ },
67953
+ {
67954
+ id: elementIds.buttonMeasure,
67955
+ enabled: () => isTrue(settings2.ui.measuringMode),
67956
+ isOn: () => measure$1.active,
67957
+ tip: "Measuring Mode",
67958
+ action: () => measure$1.toggle(),
67959
+ icon: measure,
67960
+ style: buttonDefaultStyle
67895
67961
  }
67896
67962
  ]
67897
67963
  };
67898
- const settingsSection = {
67964
+ }
67965
+ function controlBarSettings(modal, side, settings$1) {
67966
+ const fullScreen = getFullScreenState();
67967
+ return {
67899
67968
  id: elementIds.sectionSettings,
67900
- enable: () => anyUiSettingButton(props.settings),
67969
+ enable: () => anyUiSettingButton(settings$1),
67901
67970
  style: sectionDefaultStyle,
67902
67971
  buttons: [
67903
67972
  {
67904
67973
  id: elementIds.buttonProjectInspector,
67905
- enabled: () => isTrue(props.settings.ui.projectInspector) && (isTrue(props.settings.ui.bimTreePanel) || isTrue(props.settings.ui.bimInfoPanel)),
67974
+ enabled: () => isTrue(settings$1.ui.projectInspector) && (isTrue(settings$1.ui.bimTreePanel) || isTrue(settings$1.ui.bimInfoPanel)),
67906
67975
  tip: "Project Inspector",
67907
- action: () => props.side.toggleContent("bim"),
67976
+ action: () => side.toggleContent("bim"),
67908
67977
  icon: treeView,
67909
67978
  style: buttonDefaultStyle
67910
67979
  },
67911
67980
  {
67912
67981
  id: elementIds.buttonSettings,
67913
- enabled: () => isTrue(props.settings.ui.settings),
67982
+ enabled: () => isTrue(settings$1.ui.settings),
67914
67983
  tip: "Settings",
67915
- action: () => props.side.toggleContent("settings"),
67984
+ action: () => side.toggleContent("settings"),
67916
67985
  icon: settings,
67917
67986
  style: buttonDefaultStyle
67918
67987
  },
67919
67988
  {
67920
67989
  id: elementIds.buttonHelp,
67921
- enabled: () => isTrue(props.settings.ui.help),
67990
+ enabled: () => isTrue(settings$1.ui.help),
67922
67991
  tip: "Help",
67923
- action: () => props.modal.help(true),
67992
+ action: () => modal.help(true),
67924
67993
  icon: help,
67925
67994
  style: buttonDefaultStyle
67926
67995
  },
67927
67996
  {
67928
67997
  id: elementIds.buttonMaximize,
67929
- enabled: () => isTrue(props.settings.ui.maximise) && props.settings.capacity.canGoFullScreen,
67998
+ enabled: () => isTrue(settings$1.ui.maximise) && settings$1.capacity.canGoFullScreen,
67930
67999
  tip: fullScreen.get() ? "Minimize" : "Fullscreen",
67931
68000
  action: () => fullScreen.toggle(),
67932
68001
  icon: fullScreen.get() ? minimize : fullsScreen,
@@ -67934,112 +68003,23 @@ function ControlBar(props) {
67934
68003
  }
67935
68004
  ]
67936
68005
  };
67937
- const sectionBoxSection = {
67938
- id: elementIds.sectionSectionBox,
67939
- enable: () => !measure$1.active && section.active,
67940
- style: sectionBlueStyle,
67941
- buttons: [
67942
- {
67943
- id: elementIds.buttonSectionBoxReset,
67944
- tip: "Reset Section Box",
67945
- action: () => section.reset(),
67946
- icon: sectionBoxReset,
67947
- style: buttonBlueStyle
67948
- },
67949
- {
67950
- id: elementIds.buttonSectionBoxShrinkToSelection,
67951
- tip: "Shrink to Selection",
67952
- action: () => section.shrinkToSelection(),
67953
- icon: sectionBoxShrink,
67954
- style: buttonBlueStyle
67955
- },
67956
- {
67957
- id: elementIds.buttonSectionBoxClip,
67958
- tip: section.clip ? "Ignore Section Box" : "Clip Section Box",
67959
- action: () => section.toggleClip(),
67960
- icon: section.clip ? sectionBoxIgnore : sectionBoxClip,
67961
- style: buttonBlueStyle
67962
- },
67963
- {
67964
- id: elementIds.buttonSectionBoxDone,
67965
- tip: "Done",
67966
- action: () => section.toggle(),
67967
- icon: checkmark,
67968
- style: buttonBlueStyle
67969
- }
67970
- ]
67971
- };
67972
- const measureSection = {
67973
- id: elementIds.sectionMeasure,
67974
- enable: () => measure$1.active && !section.active,
67975
- style: sectionBlueStyle,
67976
- buttons: [
67977
- {
67978
- id: elementIds.buttonMeasureDelete,
67979
- tip: "Delete",
67980
- action: () => measure$1.clear(),
67981
- icon: trash,
67982
- style: buttonBlueStyle
67983
- },
67984
- {
67985
- id: elementIds.buttonMeasureDone,
67986
- tip: "Done",
67987
- action: () => measure$1.toggle(),
67988
- icon: checkmark,
67989
- style: buttonBlueStyle
67990
- }
67991
- ]
67992
- };
67993
- const toolSections = {
67994
- id: elementIds.sectionTools,
67995
- enable: () => anyUiToolButton(props.settings) && !measure$1.active && !section.active,
67996
- style: measure$1.active || section.active ? sectionBlueStyle : sectionDefaultStyle,
67997
- buttons: [
67998
- {
67999
- id: elementIds.buttonSectionBox,
68000
- enabled: () => isTrue(props.settings.ui.sectioningMode),
68001
- tip: "Sectioning Mode",
68002
- action: () => section.toggle(),
68003
- icon: sectionBox,
68004
- style: buttonDefaultStyle
68005
- },
68006
- {
68007
- id: elementIds.buttonMeasure,
68008
- enabled: () => isTrue(props.settings.ui.measuringMode),
68009
- tip: "Measuring Mode",
68010
- action: () => measure$1.toggle(),
68011
- icon: measure,
68012
- style: buttonDefaultStyle
68013
- },
68014
- {
68015
- id: elementIds.buttonToggleIsolation,
68016
- enabled: () => isTrue(props.settings.ui.toggleIsolation),
68017
- tip: "Toggle Isolation",
68018
- action: () => props.isolation.toggle("controlBar"),
68019
- icon: toggleIsolation,
68020
- style: buttonDefaultStyle
68021
- }
68022
- ]
68023
- };
68024
- let controlBar2 = [cameraSection, toolSections, measureSection, sectionBoxSection, settingsSection];
68025
- controlBar2 = ((_a2 = props.customization) == null ? void 0 : _a2.call(props, controlBar2)) ?? controlBar2;
68026
- return createBar(controlBar2);
68027
68006
  }
68028
- function createBar(sections) {
68029
- return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: {
68030
- gap: "min(10px, 2%)",
68031
- bottom: "min(36px, 10%)"
68032
- }, 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", children: sections.map(createSection$1) });
68007
+ function useControlBar(viewer, camera2, modal, side, isolation, cursor, settings2, section, customization) {
68008
+ const measure2 = getMeasureState(viewer, cursor);
68009
+ const pointerSection = controlBarPointer(viewer, camera2, settings2);
68010
+ const actionSection = controlBarActions(camera2, settings2, isolation, measure2);
68011
+ const sectionBoxSection = controlBarSectionBox(section, viewer.selection.count > 0);
68012
+ const settingsSection = controlBarSettings(modal, side, settings2);
68013
+ let controlBarSections = [
68014
+ pointerSection,
68015
+ actionSection,
68016
+ sectionBoxSection,
68017
+ // Optional section
68018
+ settingsSection
68019
+ ];
68020
+ controlBarSections = (customization == null ? void 0 : customization(controlBarSections)) ?? controlBarSections;
68021
+ return controlBarSections;
68033
68022
  }
68034
- const controlBar = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
68035
- __proto__: null,
68036
- ControlBar,
68037
- buttonBlueStyle,
68038
- buttonDefaultStyle,
68039
- elementIds,
68040
- sectionBlueStyle,
68041
- sectionDefaultStyle
68042
- }, Symbol.toStringTag, { value: "Module" }));
68043
68023
  function RestOfScreen(props) {
68044
68024
  const [, setVersion] = useState(0);
68045
68025
  const resizeObserver = useRef();
@@ -72028,23 +72008,23 @@ function VimContextMenu(props) {
72028
72008
  const viewer = props.viewer;
72029
72009
  const camera2 = props.camera;
72030
72010
  const [section, setSection] = useState({
72031
- visible: viewer.gizmos.section.visible,
72032
- clip: viewer.gizmos.section.clip
72011
+ visible: viewer.gizmos.sectionBox.visible,
72012
+ clip: viewer.gizmos.sectionBox.clip
72033
72013
  });
72034
72014
  const isClipping = () => {
72035
- return !viewer.gizmos.section.box.containsBox(viewer.renderer.getBoundingBox());
72015
+ return !viewer.gizmos.sectionBox.box.containsBox(viewer.renderer.getBoundingBox());
72036
72016
  };
72037
72017
  const [clipping, setClipping] = useState(isClipping());
72038
72018
  const [, setVersion] = useState(0);
72039
72019
  const hidden2 = props.isolation.isActive();
72040
72020
  useEffect(() => {
72041
- const subState = viewer.gizmos.section.onStateChanged.subscribe(() => {
72021
+ const subState = viewer.gizmos.sectionBox.onStateChanged.subscribe(() => {
72042
72022
  setSection({
72043
- visible: viewer.gizmos.section.visible,
72044
- clip: viewer.gizmos.section.clip
72023
+ visible: viewer.gizmos.sectionBox.visible,
72024
+ clip: viewer.gizmos.sectionBox.clip
72045
72025
  });
72046
72026
  });
72047
- const subConfirm = viewer.gizmos.section.onBoxConfirm.subscribe(
72027
+ const subConfirm = viewer.gizmos.sectionBox.onBoxConfirm.subscribe(
72048
72028
  () => setClipping(isClipping())
72049
72029
  );
72050
72030
  props.isolation.onChanged.subscribe(() => setVersion((v) => v + 1));
@@ -72096,10 +72076,10 @@ function VimContextMenu(props) {
72096
72076
  e.stopPropagation();
72097
72077
  };
72098
72078
  const onSectionToggleBtn = (e) => {
72099
- viewer.gizmos.section.clip = !viewer.gizmos.section.clip;
72079
+ viewer.gizmos.sectionBox.clip = !viewer.gizmos.sectionBox.clip;
72100
72080
  };
72101
72081
  const onSectionResetBtn = (e) => {
72102
- viewer.gizmos.section.fitBox(viewer.renderer.getBoundingBox());
72082
+ viewer.gizmos.sectionBox.fitBox(viewer.renderer.getBoundingBox());
72103
72083
  e.stopPropagation();
72104
72084
  };
72105
72085
  const onMeasureDeleteBtn = (e) => {
@@ -72108,7 +72088,7 @@ function VimContextMenu(props) {
72108
72088
  const onFitSectionToSelectionBtn = (e) => {
72109
72089
  const box = viewer.selection.getBoundingBox();
72110
72090
  if (box) {
72111
- viewer.gizmos.section.fitBox(box);
72091
+ viewer.gizmos.sectionBox.fitBox(box);
72112
72092
  }
72113
72093
  };
72114
72094
  const createButton2 = (button) => {
@@ -75066,7 +75046,7 @@ class ComponentCamera {
75066
75046
  frameSelection(duration = 1) {
75067
75047
  if (this._viewer.selection.count === 0) return;
75068
75048
  const box = this._viewer.selection.getBoundingBox();
75069
- if (box && this._viewer.gizmos.section.box.intersectsBox(box)) {
75049
+ if (box && this._viewer.gizmos.sectionBox.box.intersectsBox(box)) {
75070
75050
  const movement = duration === 0 ? this._viewer.camera.snap() : this._viewer.camera.lerp(duration);
75071
75051
  movement.frame(box);
75072
75052
  }
@@ -75715,6 +75695,252 @@ function setComponentBehind(value) {
75715
75695
  component.classList.remove("behind");
75716
75696
  }
75717
75697
  }
75698
+ function SectionBoxPanel(props) {
75699
+ const [panelPosition, setPanelPosition] = useState({
75700
+ top: 0,
75701
+ left: 0
75702
+ });
75703
+ const panelRef = useRef(null);
75704
+ useLayoutEffect(() => {
75705
+ const updatePosition = () => {
75706
+ const { top, left } = computePosition(panelRef);
75707
+ setPanelPosition({ top, left });
75708
+ };
75709
+ updatePosition();
75710
+ let resizeObserver = null;
75711
+ if (panelRef.current) {
75712
+ resizeObserver = new ResizeObserver(updatePosition);
75713
+ resizeObserver.observe(panelRef.current.parentElement);
75714
+ }
75715
+ return () => {
75716
+ if (resizeObserver) {
75717
+ resizeObserver.disconnect();
75718
+ }
75719
+ };
75720
+ }, [props.state.showOffsetPanel.get()]);
75721
+ if (!props.state.showOffsetPanel.get()) return null;
75722
+ 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: [
75723
+ /* @__PURE__ */ jsxRuntimeExports.jsx("dt", { className: "vc-w-1/2 vc-inline", children: label }),
75724
+ /* @__PURE__ */ jsxRuntimeExports.jsx("dd", { className: "vc-w-1/3 vc-inline", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
75725
+ "input",
75726
+ {
75727
+ id: id2,
75728
+ type: "text",
75729
+ value: field.get(),
75730
+ onChange: (e) => field.set(e.target.value),
75731
+ className: "vc-border vc-inline vc-border-gray-300 vc-py-1 vc-w-full vc-px-1",
75732
+ onBlur: () => field.confirm()
75733
+ }
75734
+ ) })
75735
+ ] });
75736
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
75737
+ "div",
75738
+ {
75739
+ className: "vc-fixed vc-inset-0 vc-flex vc-pointer-events-none",
75740
+ children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
75741
+ "div",
75742
+ {
75743
+ ref: panelRef,
75744
+ style: { position: "absolute", top: panelPosition.top, left: panelPosition.left, width: "min(200px, 60%)" },
75745
+ className: "vim-sectionbox-offsets vc-pointer-events-auto vc-bg-white vc-relative",
75746
+ onClick: (e) => e.stopPropagation(),
75747
+ children: [
75748
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "vim-sectionbox-header vc-px-2 vc-bg-gray-light vc-flex vc-items-center vc-justify-between ", children: [
75749
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "vc-flex vim-sectionbox-offsets-title vc-title vc-block", children: "Section Box Offsets" }),
75750
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
75751
+ "button",
75752
+ {
75753
+ className: "vc-flex vc-border-none vc-bg-transparent vc-text-sm vc-cursor-pointer",
75754
+ onClick: () => props.state.showOffsetPanel.set(false),
75755
+ children: close({ height: 12, width: 12, fill: "currentColor" })
75756
+ }
75757
+ )
75758
+ ] }),
75759
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("dl", { className: "vc-text-xl vc-text-gray-darker vc-mb-2 vc-mx-2 ", children: [
75760
+ renderField("topOffset", "Top Offset", props.state.topOffset),
75761
+ renderField("sideOffseet", "Side Offset", props.state.sideOffset),
75762
+ renderField("bottomOffset", "Bottom Offset", props.state.bottomOffset)
75763
+ ] })
75764
+ ]
75765
+ }
75766
+ )
75767
+ }
75768
+ );
75769
+ }
75770
+ function computePosition(panelRef) {
75771
+ const origin = document.getElementById("vim-control-bar");
75772
+ if (origin && panelRef.current) {
75773
+ const originRect = origin.getBoundingClientRect();
75774
+ const panelRect = panelRef.current.getBoundingClientRect();
75775
+ let left = originRect.left + originRect.width / 2 - panelRect.width / 2;
75776
+ let top = originRect.top - 10 - panelRect.height;
75777
+ if (top < 10) {
75778
+ top = originRect.bottom + 10;
75779
+ }
75780
+ if (left < 10) {
75781
+ left = 10;
75782
+ }
75783
+ if (left + panelRect.width > window.innerWidth - 10) {
75784
+ left = window.innerWidth - panelRect.width - 10;
75785
+ }
75786
+ return { top, left };
75787
+ }
75788
+ return { top: 0, left: 0 };
75789
+ }
75790
+ function addBox(b1, b2) {
75791
+ const r = b1.clone();
75792
+ r.min.x += b2.min.x;
75793
+ r.min.y += b2.min.y;
75794
+ r.min.z += b2.min.z;
75795
+ r.max.x += b2.max.x;
75796
+ r.max.y += b2.max.y;
75797
+ r.max.z += b2.max.z;
75798
+ return r;
75799
+ }
75800
+ function useStateRef(initialValue) {
75801
+ const [value, setValue] = useState(initialValue);
75802
+ const ref = useRef(initialValue);
75803
+ const event = useRef(new distExports.SimpleEventDispatcher());
75804
+ const validate = useRef((value2) => value2);
75805
+ const confirm = useRef((value2) => value2);
75806
+ const set3 = (value2) => {
75807
+ const finalValue = validate.current(value2) ?? value2;
75808
+ if (finalValue === void 0) return;
75809
+ if (finalValue === ref.current) return;
75810
+ ref.current = finalValue;
75811
+ setValue(finalValue);
75812
+ event.current.dispatch(finalValue);
75813
+ };
75814
+ return {
75815
+ get() {
75816
+ return ref.current;
75817
+ },
75818
+ set: set3,
75819
+ confirm() {
75820
+ set3(confirm.current(ref.current));
75821
+ },
75822
+ useRegister(on) {
75823
+ useEffect(() => {
75824
+ return event.current.subscribe(on);
75825
+ }, []);
75826
+ },
75827
+ useMemo(on, deps) {
75828
+ return useMemo(() => on(value), [...deps || [], value]);
75829
+ },
75830
+ useValidate(on) {
75831
+ useEffect(() => {
75832
+ validate.current = on;
75833
+ }, []);
75834
+ },
75835
+ useConfirm(on) {
75836
+ useEffect(() => {
75837
+ confirm.current = on;
75838
+ }, []);
75839
+ }
75840
+ };
75841
+ }
75842
+ function useSectionBox(adapter) {
75843
+ const enable = useStateRef(false);
75844
+ const visible2 = useStateRef(false);
75845
+ const showOffsetPanel = useStateRef(false);
75846
+ const auto = useStateRef(false);
75847
+ const topOffset = useStateRef("1");
75848
+ const sideOffset = useStateRef("1");
75849
+ const bottomOffset = useStateRef("1");
75850
+ const boxRef = useRef(adapter.getBox());
75851
+ enable.useRegister((v) => {
75852
+ visible2.set(v);
75853
+ auto.set(false);
75854
+ showOffsetPanel.set(false);
75855
+ topOffset.set("1");
75856
+ sideOffset.set("1");
75857
+ bottomOffset.set("1");
75858
+ void sectionReset();
75859
+ });
75860
+ topOffset.useValidate((v) => sanitize(v, false));
75861
+ sideOffset.useValidate((v) => sanitize(v, false));
75862
+ bottomOffset.useValidate((v) => sanitize(v, false));
75863
+ topOffset.useConfirm((v) => sanitize(v, true));
75864
+ sideOffset.useConfirm((v) => sanitize(v, true));
75865
+ bottomOffset.useConfirm((v) => sanitize(v, true));
75866
+ topOffset.useRegister((v) => section(boxRef.current));
75867
+ sideOffset.useRegister((v) => section(boxRef.current));
75868
+ bottomOffset.useRegister((v) => section(boxRef.current));
75869
+ auto.useRegister((v) => {
75870
+ if (v) sectionSelection();
75871
+ });
75872
+ useEffect(() => {
75873
+ return adapter.onSelectionChanged.sub(() => {
75874
+ if (auto.get()) sectionSelection();
75875
+ });
75876
+ }, []);
75877
+ visible2.useRegister((v) => adapter.setVisible(v));
75878
+ const section = (baseBox) => {
75879
+ boxRef.current = baseBox;
75880
+ const newBox = addBox(baseBox, offsetsToBox3(topOffset.get(), sideOffset.get(), bottomOffset.get()));
75881
+ adapter.fitBox(newBox);
75882
+ };
75883
+ const sectionSelection = async () => {
75884
+ try {
75885
+ const box = await adapter.getSelectionBox() ?? await adapter.getRendererBox();
75886
+ section(box);
75887
+ } catch (e) {
75888
+ console.error(e);
75889
+ }
75890
+ };
75891
+ const sectionReset = async () => {
75892
+ const box = await adapter.getRendererBox();
75893
+ section(box);
75894
+ };
75895
+ return {
75896
+ enable,
75897
+ visible: visible2,
75898
+ auto,
75899
+ showOffsetPanel,
75900
+ topOffset,
75901
+ sideOffset,
75902
+ bottomOffset,
75903
+ sectionSelection,
75904
+ sectionReset,
75905
+ section
75906
+ };
75907
+ }
75908
+ const sanitize = (value, strict) => {
75909
+ if (!strict) {
75910
+ if (value === "" || value === "-") return value;
75911
+ }
75912
+ const num = parseFloat(value);
75913
+ if (isNaN(num)) {
75914
+ return strict ? "1" : void 0;
75915
+ }
75916
+ return String(num);
75917
+ };
75918
+ function offsetsToBox3(top, side, bottom) {
75919
+ const getNumber = (s) => {
75920
+ const num = parseFloat(s);
75921
+ return isNaN(num) ? 0 : num;
75922
+ };
75923
+ return new Box3(
75924
+ new Vector3(-getNumber(side), -getNumber(side), -getNumber(bottom)),
75925
+ new Vector3(getNumber(side), getNumber(side), getNumber(top))
75926
+ );
75927
+ }
75928
+ function useWebglSectionBox(viewer) {
75929
+ const vimAdapter = {
75930
+ setVisible: (b) => {
75931
+ viewer.gizmos.sectionBox.visible = b;
75932
+ viewer.gizmos.sectionBox.interactive = b;
75933
+ },
75934
+ getBox: () => viewer.gizmos.sectionBox.box.clone(),
75935
+ fitBox: (box) => viewer.gizmos.sectionBox.fitBox(box),
75936
+ getSelectionBox: () => Promise.resolve(viewer.selection.getBoundingBox()),
75937
+ getRendererBox: () => Promise.resolve(viewer.renderer.getBoundingBox()),
75938
+ onSceneChanged: viewer.renderer.onBoxUpdated,
75939
+ onSelectionChanged: viewer.selection.onValueChanged
75940
+ };
75941
+ viewer.gizmos.sectionBox.clip = true;
75942
+ return useSectionBox(vimAdapter);
75943
+ }
75718
75944
  function createWebglComponent(container, componentSettings = {}, viewerSettings = {}) {
75719
75945
  const promise2 = new DeferredPromise2();
75720
75946
  const cmpContainer = container instanceof HTMLElement ? createContainer(container) : container ?? createContainer();
@@ -75756,11 +75982,13 @@ function VimComponent(props) {
75756
75982
  Math.min(props.container.root.clientWidth * 0.25, 340)
75757
75983
  );
75758
75984
  const [contextMenu2, setcontextMenu] = useState();
75759
- const [controlBar2, setControlBar] = useState();
75985
+ const [controlBarCustom, setControlBarCustom] = useState();
75760
75986
  const bimInfoRef = useBimInfo();
75761
75987
  const viewerState = useViewerState(props.viewer);
75762
75988
  const treeRef = useRef();
75763
75989
  const performanceRef = useRef(null);
75990
+ const sectionBox2 = useWebglSectionBox(props.viewer);
75991
+ const controlBar2 = useControlBar(props.viewer, camera2, modal, side, isolation, cursor, settings2.value, sectionBox2, controlBarCustom);
75764
75992
  useEffect(() => {
75765
75993
  var _a3;
75766
75994
  side.setHasBim(((_a3 = viewerState.vim) == null ? void 0 : _a3.bim) !== void 0);
@@ -75785,11 +76013,14 @@ function VimComponent(props) {
75785
76013
  isolation,
75786
76014
  camera: camera2,
75787
76015
  settings: settings2,
76016
+ get sectionBox() {
76017
+ return sectionBox2;
76018
+ },
75788
76019
  contextMenu: {
75789
76020
  customize: (v) => setcontextMenu(() => v)
75790
76021
  },
75791
76022
  controlBar: {
75792
- customize: (v) => setControlBar(() => v)
76023
+ customize: (v) => setControlBarCustom(() => v)
75793
76024
  },
75794
76025
  modal,
75795
76026
  bimInfo: bimInfoRef,
@@ -75843,16 +76074,11 @@ function VimComponent(props) {
75843
76074
  /* @__PURE__ */ jsxRuntimeExports.jsx(
75844
76075
  ControlBar,
75845
76076
  {
75846
- viewer: props.viewer,
75847
- camera: camera2,
75848
- modal,
75849
- side,
75850
- isolation,
75851
- cursor,
75852
- settings: settings2.value,
75853
- customization: controlBar2
76077
+ content: controlBar2,
76078
+ show: isTrue(settings2.value.ui.controlBar)
75854
76079
  }
75855
76080
  ),
76081
+ /* @__PURE__ */ jsxRuntimeExports.jsx(SectionBoxPanel, { state: sectionBox2 }),
75856
76082
  /* @__PURE__ */ jsxRuntimeExports.jsx(
75857
76083
  AxesPanelMemo,
75858
76084
  {
@@ -76178,12 +76404,53 @@ function getRequestErrorMessage(source, error) {
76178
76404
  return serverConnectionError(source.url);
76179
76405
  }
76180
76406
  }
76407
+ function updateModal(modal, state) {
76408
+ if (state.status === "connected") {
76409
+ modal.loading(void 0);
76410
+ modal.message(void 0);
76411
+ }
76412
+ if (state.status === "connecting") {
76413
+ if (modal.current === void 0 || modal.current.type === "loading") {
76414
+ modal.loading({ message: "Connecting to VIM Ultra server..." });
76415
+ }
76416
+ }
76417
+ if (state.status === "error") {
76418
+ console.log("Error loading vim", state);
76419
+ modal.message(getErrorMessage(state));
76420
+ }
76421
+ }
76422
+ async function updateProgress(request2, modal) {
76423
+ for await (const progress of request2.getProgress()) {
76424
+ if (request2.isCompleted) break;
76425
+ modal.loading({ message: "Loading File in VIM Ultra mode", progress });
76426
+ }
76427
+ }
76428
+ function useUltraSectionBox(viewer) {
76429
+ const ultraAdapter = {
76430
+ setVisible: (b) => {
76431
+ viewer.sectionBox.visible = b;
76432
+ viewer.sectionBox.interactive = b;
76433
+ },
76434
+ getBox: () => viewer.sectionBox.getBox().clone(),
76435
+ fitBox: (box) => viewer.sectionBox.fitBox(box),
76436
+ getSelectionBox: () => viewer.selection.getBoundingBox(),
76437
+ getRendererBox: () => viewer.renderer.getBoundingBox(),
76438
+ onSelectionChanged: viewer.selection.onValueChanged,
76439
+ onSceneChanged: viewer.vims.onChanged
76440
+ };
76441
+ return useSectionBox(ultraAdapter);
76442
+ }
76443
+ function useUltraControlBar(viewer, section, customization) {
76444
+ let controlBar2 = [controlBarSectionBox(section, viewer.selection.count > 0)];
76445
+ controlBar2 = (customization == null ? void 0 : customization(controlBar2)) ?? controlBar2;
76446
+ return controlBar2;
76447
+ }
76181
76448
  function createUltraComponent(container) {
76182
76449
  const promise2 = new DeferredPromise2();
76183
76450
  const cmpContainer = container instanceof HTMLElement ? createContainer(container) : container ?? createContainer();
76184
76451
  const viewer = Viewer2.createWithCanvas(cmpContainer.gfx);
76185
76452
  const reactRoot = clientExports.createRoot(cmpContainer.ui);
76186
- const patchRef = (cmp) => {
76453
+ const attachDispose = (cmp) => {
76187
76454
  cmp.dispose = () => {
76188
76455
  viewer.dispose();
76189
76456
  cmpContainer.dispose();
@@ -76197,7 +76464,7 @@ function createUltraComponent(container) {
76197
76464
  {
76198
76465
  container: cmpContainer,
76199
76466
  viewer,
76200
- onMount: (cmp) => promise2.resolve(patchRef(cmp))
76467
+ onMount: (cmp) => promise2.resolve(attachDispose(cmp))
76201
76468
  }
76202
76469
  )
76203
76470
  );
@@ -76205,31 +76472,36 @@ function createUltraComponent(container) {
76205
76472
  }
76206
76473
  function UltraComponent(props) {
76207
76474
  const modal = useModal(true);
76475
+ const sectionBox2 = useUltraSectionBox(props.viewer);
76476
+ const controlBar2 = useUltraControlBar(props.viewer, sectionBox2, (_2) => _2);
76477
+ const side = useSideState(true, 400);
76478
+ const [_, setSelectState] = useState(0);
76208
76479
  useEffect(() => {
76209
76480
  props.viewer.onStateChanged.subscribe((state) => updateModal(modal, state));
76210
- props.onMount(ToRef(props.viewer, modal));
76481
+ props.viewer.selection.onValueChanged.subscribe(() => {
76482
+ setSelectState((i) => (i + 1) % 2);
76483
+ });
76484
+ props.onMount(createComponentRef(props.viewer, modal, sectionBox2));
76211
76485
  }, []);
76212
76486
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
76213
- /* @__PURE__ */ jsxRuntimeExports.jsx(Overlay, { canvas: props.viewer.viewport.canvas }),
76487
+ /* @__PURE__ */ jsxRuntimeExports.jsx(RestOfScreen, { side, content: () => {
76488
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
76489
+ whenTrue(true, /* @__PURE__ */ jsxRuntimeExports.jsx(LogoMemo, {})),
76490
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Overlay, { canvas: props.viewer.viewport.canvas }),
76491
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
76492
+ ControlBar,
76493
+ {
76494
+ content: controlBar2,
76495
+ show: true
76496
+ }
76497
+ ),
76498
+ /* @__PURE__ */ jsxRuntimeExports.jsx(SectionBoxPanel, { state: sectionBox2 })
76499
+ ] });
76500
+ } }),
76214
76501
  /* @__PURE__ */ jsxRuntimeExports.jsx(Modal, { state: modal })
76215
76502
  ] });
76216
76503
  }
76217
- function updateModal(modal, state) {
76218
- if (state.status === "connected") {
76219
- modal.loading(void 0);
76220
- modal.message(void 0);
76221
- }
76222
- if (state.status === "connecting") {
76223
- if (modal.current === void 0 || modal.current.type === "loading") {
76224
- modal.loading({ message: "Connecting to VIM Ultra server..." });
76225
- }
76226
- }
76227
- if (state.status === "error") {
76228
- console.log("Error loading vim", state);
76229
- modal.message(getErrorMessage(state));
76230
- }
76231
- }
76232
- function ToRef(viewer, modal) {
76504
+ function createComponentRef(viewer, modal, sectionBox2) {
76233
76505
  function load(source) {
76234
76506
  const request2 = viewer.loadVim(source);
76235
76507
  void updateProgress(request2, modal);
@@ -76249,17 +76521,12 @@ function ToRef(viewer, modal) {
76249
76521
  return {
76250
76522
  viewer,
76251
76523
  modal,
76524
+ sectionBox: sectionBox2,
76252
76525
  dispose: () => {
76253
76526
  },
76254
76527
  load
76255
76528
  };
76256
76529
  }
76257
- async function updateProgress(request2, modal) {
76258
- for await (const progress of request2.getProgress()) {
76259
- if (request2.isCompleted) break;
76260
- modal.loading({ message: "Loading File in VIM Ultra mode", progress });
76261
- }
76262
- }
76263
76530
  const index = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
76264
76531
  __proto__: null,
76265
76532
  UltraComponent,