@shopware-ag/dive 2.0.1-beta.5 → 2.0.1-beta.7

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 (234) hide show
  1. package/build/{src/modules/asset/exporter/AssetExporter.mjs → chunks/AssetExporter-QnOue3VT.mjs} +21 -21
  2. package/build/{src/modules/asset/exporter/AssetExporter.cjs → chunks/AssetExporter-TzKB2FHh.cjs} +4 -4
  3. package/build/chunks/AssetLoader-DCBiLwef.cjs +4 -0
  4. package/build/{src/modules/asset/loader/AssetLoader.mjs → chunks/AssetLoader-Dqrg0Re8.mjs} +43 -40
  5. package/build/chunks/FileTypes-Ca8pkRlQ.cjs +30 -0
  6. package/build/chunks/FileTypes-CpKiTXEY.mjs +1109 -0
  7. package/build/chunks/MathUtils-CBW56ZuG.cjs +1 -0
  8. package/build/chunks/MathUtils-CFGjHuVF.mjs +159 -0
  9. package/build/chunks/OrbitController-D-WNei2f.mjs +940 -0
  10. package/build/chunks/OrbitController-rMX8EHvJ.cjs +1 -0
  11. package/build/chunks/PerspectiveCamera-CONx93im.cjs +1 -0
  12. package/build/chunks/PerspectiveCamera-DUiWJJIj.mjs +38 -0
  13. package/build/chunks/PovSchema-Co9FznEz.cjs +1 -0
  14. package/build/chunks/PovSchema-DWWvr_ED.mjs +10 -0
  15. package/build/chunks/SelectTool-BizqI7_a.cjs +1 -0
  16. package/build/chunks/{SelectTool-DmuTopJx.mjs → SelectTool-DVFL7BtX.mjs} +30 -25
  17. package/build/chunks/findInterface-C6mrvf_t.cjs +1 -0
  18. package/build/chunks/findInterface-DbJ5qzbc.mjs +11 -0
  19. package/build/chunks/network-error-CHvryg-4.mjs +18 -0
  20. package/build/chunks/network-error-D_pq8VU6.cjs +1 -0
  21. package/build/chunks/package-CeZyVg2G.mjs +39 -0
  22. package/build/chunks/package-D_hIrGNz.cjs +1 -0
  23. package/build/dive.cjs +1 -30
  24. package/build/dive.mjs +599 -1540
  25. package/build/plugins/animation/index.cjs +1 -0
  26. package/build/plugins/animation/index.d.ts +2 -0
  27. package/build/plugins/animation/index.mjs +126 -0
  28. package/build/plugins/ar/index.cjs +1 -0
  29. package/build/plugins/ar/index.d.ts +2 -0
  30. package/build/plugins/ar/index.mjs +202 -0
  31. package/build/plugins/assetconverter/index.d.ts +2 -0
  32. package/build/plugins/assetexporter/index.cjs +1 -0
  33. package/build/plugins/assetexporter/index.d.ts +2 -0
  34. package/build/plugins/assetexporter/index.mjs +4 -0
  35. package/build/plugins/assetloader/index.cjs +1 -0
  36. package/build/plugins/assetloader/index.d.ts +2 -0
  37. package/build/plugins/assetloader/index.mjs +6 -0
  38. package/build/plugins/axiscamera/index.cjs +1 -0
  39. package/build/plugins/axiscamera/index.d.ts +2 -0
  40. package/build/plugins/axiscamera/index.mjs +4 -0
  41. package/build/plugins/mediacreator/index.cjs +1 -0
  42. package/build/plugins/mediacreator/index.d.ts +2 -0
  43. package/build/{src/modules/mediacreator/MediaCreator.mjs → plugins/mediacreator/index.mjs} +1 -1
  44. package/build/plugins/orbitcontroller/index.cjs +1 -0
  45. package/build/plugins/orbitcontroller/index.d.ts +2 -0
  46. package/build/plugins/orbitcontroller/index.mjs +5 -0
  47. package/build/plugins/state/index.cjs +27 -0
  48. package/build/plugins/state/index.d.ts +2 -0
  49. package/build/plugins/state/index.mjs +4265 -0
  50. package/build/plugins/systeminfo/index.cjs +1 -0
  51. package/build/plugins/systeminfo/index.d.ts +2 -0
  52. package/build/plugins/systeminfo/index.mjs +136 -0
  53. package/build/plugins/toolbox/index.cjs +1 -0
  54. package/build/plugins/toolbox/index.d.ts +2 -0
  55. package/build/{src/modules/toolbox/Toolbox.mjs → plugins/toolbox/index.mjs} +8 -2
  56. package/build/src/components/gizmo/Gizmo.d.ts +1 -1
  57. package/build/src/components/gizmo/handles/AxisHandle.d.ts +1 -1
  58. package/build/src/components/gizmo/handles/RadialHandle.d.ts +1 -1
  59. package/build/src/components/gizmo/handles/ScaleHandle.d.ts +1 -1
  60. package/build/src/components/gizmo/rotate/RotateGizmo.d.ts +2 -2
  61. package/build/src/components/gizmo/scale/ScaleGizmo.d.ts +2 -2
  62. package/build/src/components/gizmo/translate/TranslateGizmo.d.ts +2 -2
  63. package/build/src/components/model/Model.d.ts +2 -2
  64. package/build/src/components/primitive/Primitive.d.ts +3 -3
  65. package/build/src/components/root/Root.d.ts +5 -7
  66. package/build/src/core/Dive.d.ts +1 -1
  67. package/build/src/engine/clock/Clock.d.ts +1 -0
  68. package/build/src/engine/index.d.ts +6 -0
  69. package/build/src/engine/renderer/Renderer.d.ts +47 -7
  70. package/build/src/events/index.d.ts +1 -0
  71. package/build/src/index.d.ts +4 -2
  72. package/build/src/interfaces/Draggable.d.ts +1 -1
  73. package/build/src/plugins/animation/index.d.ts +2 -0
  74. package/build/src/{modules/animation → plugins/animation/src}/animator/Animator.d.ts +2 -3
  75. package/build/src/plugins/animation/src/index.d.ts +3 -0
  76. package/build/src/plugins/animation/src/system/AnimationSystem.d.ts +23 -0
  77. package/build/src/plugins/ar/index.d.ts +4 -0
  78. package/build/src/plugins/ar/src/ARSystem.d.ts +24 -0
  79. package/build/src/plugins/ar/src/arquicklook/ARQuickLook.d.ts +15 -0
  80. package/build/src/plugins/ar/src/error/ar-errors.d.ts +18 -0
  81. package/build/src/{modules/ar → plugins/ar/src}/sceneviewer/SceneViewer.d.ts +10 -0
  82. package/build/src/{modules/ar → plugins/ar/src}/webxr/WebXR.d.ts +2 -2
  83. package/build/src/{modules/ar → plugins/ar/src}/webxr/controller/WebXRController.d.ts +2 -2
  84. package/build/src/{modules/ar → plugins/ar/src}/webxr/origin/WebXROrigin.d.ts +1 -1
  85. package/build/src/{modules/ar → plugins/ar/src}/webxr/raycaster/WebXRRaycaster.d.ts +3 -3
  86. package/build/src/{modules/ar → plugins/ar/src}/webxr/raycaster/ar/WebXRRaycasterAR.d.ts +1 -1
  87. package/build/src/{modules/ar → plugins/ar/src}/webxr/raycaster/three/WebXRRaycasterTHREE.d.ts +2 -2
  88. package/build/src/{modules/ar → plugins/ar/src}/webxr/touchscreencontrols/WebXRTouchscreenControls.d.ts +1 -1
  89. package/build/src/plugins/assetconverter/index.d.ts +1 -0
  90. package/build/src/plugins/assetconverter/src/AssetConverter.d.ts +13 -0
  91. package/build/src/plugins/assetexporter/index.d.ts +1 -0
  92. package/build/src/{modules/asset/exporter → plugins/assetexporter/src}/AssetExporter.d.ts +0 -17
  93. package/build/src/plugins/assetloader/index.d.ts +3 -0
  94. package/build/src/plugins/assetloader/src/loader/AssetLoader.d.ts +8 -0
  95. package/build/src/plugins/axiscamera/index.d.ts +1 -0
  96. package/build/src/{modules/axiscamera → plugins/axiscamera/src}/AxisCamera.d.ts +1 -4
  97. package/build/src/plugins/mediacreator/index.d.ts +1 -0
  98. package/build/src/plugins/mediacreator/src/MediaCreator.d.ts +15 -0
  99. package/build/src/plugins/orbitcontroller/index.d.ts +1 -0
  100. package/build/src/{modules/controller/orbit → plugins/orbitcontroller/src}/OrbitController.d.ts +3 -3
  101. package/build/src/plugins/state/index.d.ts +4 -0
  102. package/build/src/{modules/state → plugins/state/src}/State.d.ts +4 -27
  103. package/build/src/{modules/state → plugins/state/src}/actions/action.d.ts +1 -1
  104. package/build/src/{modules/state → plugins/state/src}/actions/ar/launchar.d.ts +2 -2
  105. package/build/src/{modules/state → plugins/state/src}/actions/camera/computeencompassingview.d.ts +1 -1
  106. package/build/src/{modules/state → plugins/state/src}/actions/camera/getcameratransform.d.ts +1 -1
  107. package/build/src/{modules/state → plugins/state/src}/actions/camera/lockcamera.d.ts +1 -1
  108. package/build/src/{modules/state → plugins/state/src}/actions/camera/movecamera.d.ts +3 -3
  109. package/build/src/{modules/state → plugins/state/src}/actions/camera/setcameralayer.d.ts +1 -1
  110. package/build/src/{modules/state → plugins/state/src}/actions/camera/setcameratransform.d.ts +1 -1
  111. package/build/src/{modules/state → plugins/state/src}/actions/camera/zoomcamera.d.ts +1 -1
  112. package/build/src/{modules/state → plugins/state/src}/actions/media/generatemedia.d.ts +1 -1
  113. package/build/src/plugins/state/src/actions/object/addobject.d.ts +9 -0
  114. package/build/src/plugins/state/src/actions/object/deleteobject.d.ts +13 -0
  115. package/build/src/plugins/state/src/actions/object/deselectobject.d.ts +13 -0
  116. package/build/src/{modules/state → plugins/state/src}/actions/object/dropit.d.ts +3 -3
  117. package/build/src/{modules/state → plugins/state/src}/actions/object/getallobjects.d.ts +3 -2
  118. package/build/src/plugins/state/src/actions/object/getobjects.d.ts +13 -0
  119. package/build/src/{modules/state → plugins/state/src}/actions/object/modelloaded.d.ts +1 -1
  120. package/build/src/{modules/state → plugins/state/src}/actions/object/placeonfloor.d.ts +3 -3
  121. package/build/src/plugins/state/src/actions/object/selectobject.d.ts +13 -0
  122. package/build/src/plugins/state/src/actions/object/setparent.d.ts +23 -0
  123. package/build/src/plugins/state/src/actions/object/updateobject.d.ts +13 -0
  124. package/build/src/{modules/state → plugins/state/src}/actions/renderer/startrender.d.ts +1 -1
  125. package/build/src/{modules/state → plugins/state/src}/actions/scene/exportscene.d.ts +4 -4
  126. package/build/src/plugins/state/src/actions/scene/getallscenedata.d.ts +9 -0
  127. package/build/src/{modules/state → plugins/state/src}/actions/scene/setbackground.d.ts +1 -1
  128. package/build/src/{modules/state → plugins/state/src}/actions/scene/updatescene.d.ts +1 -1
  129. package/build/src/{modules/state → plugins/state/src}/actions/toolbox/setgizmomode.d.ts +1 -1
  130. package/build/src/{modules/state → plugins/state/src}/actions/toolbox/setgizmoscalelinked.d.ts +1 -1
  131. package/build/src/{modules/state → plugins/state/src}/actions/toolbox/setgizmovisible.d.ts +1 -1
  132. package/build/src/{modules/state → plugins/state/src}/actions/toolbox/usetool.d.ts +2 -2
  133. package/build/src/plugins/state/types/ActionTypes.d.ts +17 -0
  134. package/build/src/{types/SceneType.d.ts → plugins/state/types/StateExportFileType.d.ts} +1 -1
  135. package/build/src/plugins/state/types/StateSceneData.d.ts +19 -0
  136. package/build/src/plugins/state/types/index.d.ts +1 -0
  137. package/build/src/plugins/systeminfo/index.d.ts +2 -0
  138. package/build/src/{modules/systeminfo → plugins/systeminfo/src}/SystemInfo.d.ts +21 -31
  139. package/build/src/plugins/toolbox/index.d.ts +4 -0
  140. package/build/src/{modules/toolbox → plugins/toolbox/src}/BaseTool.d.ts +2 -4
  141. package/build/src/{modules/toolbox → plugins/toolbox/src}/Toolbox.d.ts +2 -11
  142. package/build/src/{modules/toolbox → plugins/toolbox/src}/select/SelectTool.d.ts +2 -6
  143. package/build/src/{modules/toolbox → plugins/toolbox/src}/transform/TransformTool.d.ts +2 -6
  144. package/build/src/types/components/DIVELight.d.ts +4 -0
  145. package/build/src/types/components/DIVESceneObject.d.ts +6 -0
  146. package/build/src/types/components/index.d.ts +2 -0
  147. package/build/src/types/index.d.ts +2 -5
  148. package/build/src/types/schema/BaseEntitySchema.d.ts +8 -0
  149. package/build/src/types/schema/EntitySchema.d.ts +11 -0
  150. package/build/src/types/schema/EntityTypeSchema.d.ts +1 -0
  151. package/build/src/types/schema/GeometrySchema.d.ts +7 -0
  152. package/build/src/types/schema/GeometryTypeSchema.d.ts +1 -0
  153. package/build/src/types/schema/GroupSchema.d.ts +11 -0
  154. package/build/src/types/schema/LightSchema.d.ts +28 -0
  155. package/build/src/{modules/state/types/COMMaterial.d.ts → types/schema/MaterialSchema.d.ts} +1 -1
  156. package/build/src/types/schema/ModelSchema.d.ts +14 -0
  157. package/build/src/types/schema/PovSchema.d.ts +10 -0
  158. package/build/src/types/schema/PrimitiveSchema.d.ts +14 -0
  159. package/build/src/types/schema/index.d.ts +11 -0
  160. package/package.json +52 -42
  161. package/build/chunks/FileTypes-DuVGjbcR.mjs +0 -36
  162. package/build/chunks/FileTypes-DzVpDu_p.cjs +0 -1
  163. package/build/chunks/ModuleRegistry-NyNtjHb2.cjs +0 -1
  164. package/build/chunks/ModuleRegistry-RSub8W0G.mjs +0 -13
  165. package/build/chunks/PerspectiveCamera-BByyG5R4.cjs +0 -1
  166. package/build/chunks/PerspectiveCamera-sm4_81KJ.mjs +0 -34
  167. package/build/chunks/SelectTool-C7nerV4P.cjs +0 -1
  168. package/build/chunks/VisibilityLayerMask-BI7jPKdx.cjs +0 -1
  169. package/build/chunks/VisibilityLayerMask-CXgt1fJc.mjs +0 -8
  170. package/build/chunks/findInterface-BEdL2iUQ.cjs +0 -1
  171. package/build/chunks/findInterface-OrXgmwxj.mjs +0 -18
  172. package/build/chunks/index-C7Wx_9uY.mjs +0 -33
  173. package/build/chunks/index-MNP0K5dt.cjs +0 -1
  174. package/build/chunks/package-DeBkqggW.mjs +0 -39
  175. package/build/chunks/package-o6as1hwQ.cjs +0 -1
  176. package/build/src/error/ar-compatibility/ar-compatibility-error.d.ts +0 -12
  177. package/build/src/modules/ModuleRegistry.d.ts +0 -19
  178. package/build/src/modules/animation/AnimationSystem.cjs +0 -1
  179. package/build/src/modules/animation/AnimationSystem.d.ts +0 -36
  180. package/build/src/modules/animation/AnimationSystem.mjs +0 -95
  181. package/build/src/modules/ar/ARSystem.cjs +0 -1
  182. package/build/src/modules/ar/ARSystem.d.ts +0 -71
  183. package/build/src/modules/ar/ARSystem.mjs +0 -163
  184. package/build/src/modules/ar/arquicklook/ARQuickLook.d.ts +0 -7
  185. package/build/src/modules/asset/converter/AssetConverter.d.ts +0 -30
  186. package/build/src/modules/asset/loader/AssetLoader.cjs +0 -4
  187. package/build/src/modules/asset/loader/AssetLoader.d.ts +0 -29
  188. package/build/src/modules/mediacreator/MediaCreator.cjs +0 -1
  189. package/build/src/modules/mediacreator/MediaCreator.d.ts +0 -44
  190. package/build/src/modules/state/State.cjs +0 -27
  191. package/build/src/modules/state/State.mjs +0 -4296
  192. package/build/src/modules/state/actions/object/addobject.d.ts +0 -8
  193. package/build/src/modules/state/actions/object/deleteobject.d.ts +0 -12
  194. package/build/src/modules/state/actions/object/deselectobject.d.ts +0 -12
  195. package/build/src/modules/state/actions/object/getobjects.d.ts +0 -12
  196. package/build/src/modules/state/actions/object/selectobject.d.ts +0 -12
  197. package/build/src/modules/state/actions/object/setparent.d.ts +0 -22
  198. package/build/src/modules/state/actions/object/updateobject.d.ts +0 -12
  199. package/build/src/modules/state/actions/scene/getallscenedata.d.ts +0 -9
  200. package/build/src/modules/state/types/ActionTypes.d.ts +0 -18
  201. package/build/src/modules/state/types/COMBaseEntity.d.ts +0 -8
  202. package/build/src/modules/state/types/COMEntity.d.ts +0 -11
  203. package/build/src/modules/state/types/COMEntityType.d.ts +0 -1
  204. package/build/src/modules/state/types/COMGeometry.d.ts +0 -7
  205. package/build/src/modules/state/types/COMGeometryType.d.ts +0 -1
  206. package/build/src/modules/state/types/COMGroup.d.ts +0 -11
  207. package/build/src/modules/state/types/COMLight.d.ts +0 -28
  208. package/build/src/modules/state/types/COMModel.d.ts +0 -14
  209. package/build/src/modules/state/types/COMPov.d.ts +0 -10
  210. package/build/src/modules/state/types/COMPrimitive.d.ts +0 -14
  211. package/build/src/modules/state/types/index.d.ts +0 -11
  212. package/build/src/modules/systeminfo/SystemInfo.cjs +0 -1
  213. package/build/src/modules/systeminfo/SystemInfo.mjs +0 -114
  214. package/build/src/modules/toolbox/Toolbox.cjs +0 -1
  215. package/build/src/types/SceneData.d.ts +0 -19
  216. package/build/src/types/SceneObjects.d.ts +0 -9
  217. package/build/src/types/UUID.d.ts +0 -1
  218. /package/build/{src/modules/asset/converter/AssetConverter.cjs → plugins/assetconverter/index.cjs} +0 -0
  219. /package/build/{src/modules/asset/converter/AssetConverter.mjs → plugins/assetconverter/index.mjs} +0 -0
  220. /package/build/src/{modules/events → events}/EventExecutor.d.ts +0 -0
  221. /package/build/src/{modules/animation → plugins/animation/src}/types/AnimatorParameters.d.ts +0 -0
  222. /package/build/src/{modules/ar → plugins/ar/src}/webxr/crosshair/WebXRCrosshair.d.ts +0 -0
  223. /package/build/src/{modules/ar → plugins/ar/src}/webxr/overlay/Overlay.d.ts +0 -0
  224. /package/build/src/{modules/asset → plugins/assetloader/src}/draco/DracoLoader.d.ts +0 -0
  225. /package/build/src/{modules/state → plugins/state/src}/ActionRegistry.d.ts +0 -0
  226. /package/build/src/{modules/state → plugins/state/src}/actions/ar/index.d.ts +0 -0
  227. /package/build/src/{modules/state → plugins/state/src}/actions/camera/index.d.ts +0 -0
  228. /package/build/src/{modules/state → plugins/state/src}/actions/index.d.ts +0 -0
  229. /package/build/src/{modules/state → plugins/state/src}/actions/media/index.d.ts +0 -0
  230. /package/build/src/{modules/state → plugins/state/src}/actions/object/index.d.ts +0 -0
  231. /package/build/src/{modules/state → plugins/state/src}/actions/renderer/index.d.ts +0 -0
  232. /package/build/src/{modules/state → plugins/state/src}/actions/scene/index.d.ts +0 -0
  233. /package/build/src/{modules/state → plugins/state/src}/actions/toolbox/index.d.ts +0 -0
  234. /package/build/src/{types/info → plugins/systeminfo/types}/index.d.ts +0 -0
package/build/dive.mjs CHANGED
@@ -1,1670 +1,729 @@
1
- var Dt = Object.defineProperty;
2
- var xt = (h, s, t) => s in h ? Dt(h, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : h[s] = t;
3
- var a = (h, s, t) => xt(h, typeof s != "symbol" ? s + "" : s, t);
4
- import { Ray as Tt, Plane as Lt, MathUtils as I, EventDispatcher as Pt, Vector3 as m, MOUSE as U, TOUCH as G, Spherical as Ne, Quaternion as Fe, Vector2 as E, OrthographicCamera as It, Vector4 as St, AxesHelper as Mt, Color as D, Matrix4 as Ct, Object3D as j, AmbientLight as Ot, PointLight as vt, SphereGeometry as Ke, MeshBasicMaterial as At, FrontSide as kt, Mesh as pe, HemisphereLight as Rt, DirectionalLight as Vt, Box3 as Ze, MeshStandardMaterial as fe, Raycaster as Xe, CylinderGeometry as Bt, BufferGeometry as qe, BufferAttribute as Ye, BoxGeometry as de, ConeGeometry as zt, LineDashedMaterial as Nt, Line as Ft, PlaneGeometry as Yt, GridHelper as Ut, Scene as Gt, WebGLRenderer as Ue } from "three";
5
- import ue from "three-spritetext";
6
- import { C as q, P as S, U as jt, H as Ht } from "./chunks/VisibilityLayerMask-CXgt1fJc.mjs";
7
- import { A as Wt, a as Kt, b as Zt, c as Xt, d as qt, e as Jt } from "./chunks/findInterface-OrXgmwxj.mjs";
8
- import { f as zi, i as Ni } from "./chunks/findInterface-OrXgmwxj.mjs";
9
- import { g as w } from "./chunks/ModuleRegistry-RSub8W0G.mjs";
10
- import { D as $t, a as Qt } from "./chunks/PerspectiveCamera-sm4_81KJ.mjs";
11
- import { F as Yi, N as Ui, S as Gi, g as ji, i as Hi } from "./chunks/FileTypes-DuVGjbcR.mjs";
12
- import { A as Ki, E as Zi, a as Xi } from "./chunks/index-C7Wx_9uY.mjs";
13
- import { F as Ji, P as $i } from "./chunks/parse-error-BFRJyIxM.mjs";
14
- const Ge = { type: "change" }, me = { type: "start" }, je = { type: "end" }, ie = new Tt(), He = new Lt(), ei = Math.cos(70 * I.DEG2RAD);
15
- class ti extends Pt {
16
- constructor(s, t) {
17
- super(), this.object = s, this.domElement = t, this.domElement.style.touchAction = "none", this.enabled = !0, this.target = new m(), this.cursor = new m(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: U.ROTATE, MIDDLE: U.DOLLY, RIGHT: U.PAN }, this.touches = { ONE: G.ROTATE, TWO: G.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this.getPolarAngle = function() {
18
- return c.phi;
19
- }, this.getAzimuthalAngle = function() {
20
- return c.theta;
21
- }, this.getDistance = function() {
22
- return this.object.position.distanceTo(this.target);
23
- }, this.listenToKeyEvents = function(i) {
24
- i.addEventListener("keydown", le), this._domElementKeyEvents = i;
25
- }, this.stopListenToKeyEvents = function() {
26
- this._domElementKeyEvents.removeEventListener("keydown", le), this._domElementKeyEvents = null;
27
- }, this.saveState = function() {
28
- e.target0.copy(e.target), e.position0.copy(e.object.position), e.zoom0 = e.object.zoom;
29
- }, this.reset = function() {
30
- e.target.copy(e.target0), e.object.position.copy(e.position0), e.object.zoom = e.zoom0, e.object.updateProjectionMatrix(), e.dispatchEvent(Ge), e.update(), o = n.NONE;
31
- }, this.update = function() {
32
- const i = new m(), r = new Fe().setFromUnitVectors(s.up, new m(0, 1, 0)), d = r.clone().invert(), u = new m(), y = new Fe(), C = new m(), b = 2 * Math.PI;
33
- return function(Et = null) {
34
- const Be = e.object.position;
35
- i.copy(Be).sub(e.target), i.applyQuaternion(r), c.setFromVector3(i), e.autoRotate && o === n.NONE && W(st(Et)), e.enableDamping ? (c.theta += p.theta * e.dampingFactor, c.phi += p.phi * e.dampingFactor) : (c.theta += p.theta, c.phi += p.phi);
36
- let T = e.minAzimuthAngle, L = e.maxAzimuthAngle;
37
- isFinite(T) && isFinite(L) && (T < -Math.PI ? T += b : T > Math.PI && (T -= b), L < -Math.PI ? L += b : L > Math.PI && (L -= b), T <= L ? c.theta = Math.max(T, Math.min(L, c.theta)) : c.theta = c.theta > (T + L) / 2 ? Math.max(T, c.theta) : Math.min(L, c.theta)), c.phi = Math.max(e.minPolarAngle, Math.min(e.maxPolarAngle, c.phi)), c.makeSafe(), e.enableDamping === !0 ? e.target.addScaledVector(_, e.dampingFactor) : e.target.add(_), e.target.sub(e.cursor), e.target.clampLength(e.minTargetRadius, e.maxTargetRadius), e.target.add(e.cursor);
38
- let Z = !1;
39
- if (e.zoomToCursor && $ || e.object.isOrthographicCamera)
40
- c.radius = he(c.radius);
41
- else {
42
- const P = c.radius;
43
- c.radius = he(c.radius * f), Z = P != c.radius;
44
- }
45
- if (i.setFromSpherical(c), i.applyQuaternion(d), Be.copy(e.target).add(i), e.object.lookAt(e.target), e.enableDamping === !0 ? (p.theta *= 1 - e.dampingFactor, p.phi *= 1 - e.dampingFactor, _.multiplyScalar(1 - e.dampingFactor)) : (p.set(0, 0, 0), _.set(0, 0, 0)), e.zoomToCursor && $) {
46
- let P = null;
47
- if (e.object.isPerspectiveCamera) {
48
- const X = i.length();
49
- P = he(X * f);
50
- const te = X - P;
51
- e.object.position.addScaledVector(ye, te), e.object.updateMatrixWorld(), Z = !!te;
52
- } else if (e.object.isOrthographicCamera) {
53
- const X = new m(M.x, M.y, 0);
54
- X.unproject(e.object);
55
- const te = e.object.zoom;
56
- e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / f)), e.object.updateProjectionMatrix(), Z = te !== e.object.zoom;
57
- const ze = new m(M.x, M.y, 0);
58
- ze.unproject(e.object), e.object.position.sub(ze).add(X), e.object.updateMatrixWorld(), P = i.length();
59
- } else
60
- console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), e.zoomToCursor = !1;
61
- P !== null && (this.screenSpacePanning ? e.target.set(0, 0, -1).transformDirection(e.object.matrix).multiplyScalar(P).add(e.object.position) : (ie.origin.copy(e.object.position), ie.direction.set(0, 0, -1).transformDirection(e.object.matrix), Math.abs(e.object.up.dot(ie.direction)) < ei ? s.lookAt(e.target) : (He.setFromNormalAndCoplanarPoint(e.object.up, e.target), ie.intersectPlane(He, e.target))));
62
- } else if (e.object.isOrthographicCamera) {
63
- const P = e.object.zoom;
64
- e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / f)), P !== e.object.zoom && (e.object.updateProjectionMatrix(), Z = !0);
65
- }
66
- return f = 1, $ = !1, Z || u.distanceToSquared(e.object.position) > l || 8 * (1 - y.dot(e.object.quaternion)) > l || C.distanceToSquared(e.target) > l ? (e.dispatchEvent(Ge), u.copy(e.object.position), y.copy(e.object.quaternion), C.copy(e.target), !0) : !1;
67
- };
68
- }(), this.dispose = function() {
69
- e.domElement.removeEventListener("contextmenu", Re), e.domElement.removeEventListener("pointerdown", Ce), e.domElement.removeEventListener("pointercancel", K), e.domElement.removeEventListener("wheel", Oe), e.domElement.removeEventListener("pointermove", ce), e.domElement.removeEventListener("pointerup", K), e.domElement.getRootNode().removeEventListener("keydown", ve, { capture: !0 }), e._domElementKeyEvents !== null && (e._domElementKeyEvents.removeEventListener("keydown", le), e._domElementKeyEvents = null);
70
- };
71
- const e = this, n = {
72
- NONE: -1,
73
- ROTATE: 0,
74
- DOLLY: 1,
75
- PAN: 2,
76
- TOUCH_ROTATE: 3,
77
- TOUCH_PAN: 4,
78
- TOUCH_DOLLY_PAN: 5,
79
- TOUCH_DOLLY_ROTATE: 6
80
- };
81
- let o = n.NONE;
82
- const l = 1e-6, c = new Ne(), p = new Ne();
83
- let f = 1;
84
- const _ = new m(), O = new E(), v = new E(), V = new E(), A = new E(), k = new E(), B = new E(), z = new E(), N = new E(), R = new E(), ye = new m(), M = new E();
85
- let $ = !1;
86
- const g = [], H = {};
87
- let oe = !1;
88
- function st(i) {
89
- return i !== null ? 2 * Math.PI / 60 * e.autoRotateSpeed * i : 2 * Math.PI / 60 / 60 * e.autoRotateSpeed;
90
- }
91
- function Q(i) {
92
- const r = Math.abs(i * 0.01);
93
- return Math.pow(0.95, e.zoomSpeed * r);
94
- }
95
- function W(i) {
96
- p.theta -= i;
97
- }
98
- function ee(i) {
99
- p.phi -= i;
100
- }
101
- const be = function() {
102
- const i = new m();
103
- return function(d, u) {
104
- i.setFromMatrixColumn(u, 0), i.multiplyScalar(-d), _.add(i);
105
- };
106
- }(), we = function() {
107
- const i = new m();
108
- return function(d, u) {
109
- e.screenSpacePanning === !0 ? i.setFromMatrixColumn(u, 1) : (i.setFromMatrixColumn(u, 0), i.crossVectors(e.object.up, i)), i.multiplyScalar(d), _.add(i);
110
- };
111
- }(), F = function() {
112
- const i = new m();
113
- return function(d, u) {
114
- const y = e.domElement;
115
- if (e.object.isPerspectiveCamera) {
116
- const C = e.object.position;
117
- i.copy(C).sub(e.target);
118
- let b = i.length();
119
- b *= Math.tan(e.object.fov / 2 * Math.PI / 180), be(2 * d * b / y.clientHeight, e.object.matrix), we(2 * u * b / y.clientHeight, e.object.matrix);
120
- } else e.object.isOrthographicCamera ? (be(d * (e.object.right - e.object.left) / e.object.zoom / y.clientWidth, e.object.matrix), we(u * (e.object.top - e.object.bottom) / e.object.zoom / y.clientHeight, e.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), e.enablePan = !1);
121
- };
122
- }();
123
- function re(i) {
124
- e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? f /= i : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
125
- }
126
- function Ee(i) {
127
- e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? f *= i : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
128
- }
129
- function ae(i, r) {
130
- if (!e.zoomToCursor)
131
- return;
132
- $ = !0;
133
- const d = e.domElement.getBoundingClientRect(), u = i - d.left, y = r - d.top, C = d.width, b = d.height;
134
- M.x = u / C * 2 - 1, M.y = -(y / b) * 2 + 1, ye.set(M.x, M.y, 1).unproject(e.object).sub(e.object.position).normalize();
135
- }
136
- function he(i) {
137
- return Math.max(e.minDistance, Math.min(e.maxDistance, i));
138
- }
139
- function De(i) {
140
- O.set(i.clientX, i.clientY);
141
- }
142
- function nt(i) {
143
- ae(i.clientX, i.clientX), z.set(i.clientX, i.clientY);
144
- }
145
- function xe(i) {
146
- A.set(i.clientX, i.clientY);
147
- }
148
- function ot(i) {
149
- v.set(i.clientX, i.clientY), V.subVectors(v, O).multiplyScalar(e.rotateSpeed);
150
- const r = e.domElement;
151
- W(2 * Math.PI * V.x / r.clientHeight), ee(2 * Math.PI * V.y / r.clientHeight), O.copy(v), e.update();
152
- }
153
- function rt(i) {
154
- N.set(i.clientX, i.clientY), R.subVectors(N, z), R.y > 0 ? re(Q(R.y)) : R.y < 0 && Ee(Q(R.y)), z.copy(N), e.update();
155
- }
156
- function at(i) {
157
- k.set(i.clientX, i.clientY), B.subVectors(k, A).multiplyScalar(e.panSpeed), F(B.x, B.y), A.copy(k), e.update();
158
- }
159
- function ht(i) {
160
- ae(i.clientX, i.clientY), i.deltaY < 0 ? Ee(Q(i.deltaY)) : i.deltaY > 0 && re(Q(i.deltaY)), e.update();
161
- }
162
- function ct(i) {
163
- let r = !1;
164
- switch (i.code) {
165
- case e.keys.UP:
166
- i.ctrlKey || i.metaKey || i.shiftKey ? ee(2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : F(0, e.keyPanSpeed), r = !0;
167
- break;
168
- case e.keys.BOTTOM:
169
- i.ctrlKey || i.metaKey || i.shiftKey ? ee(-2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : F(0, -e.keyPanSpeed), r = !0;
170
- break;
171
- case e.keys.LEFT:
172
- i.ctrlKey || i.metaKey || i.shiftKey ? W(2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : F(e.keyPanSpeed, 0), r = !0;
173
- break;
174
- case e.keys.RIGHT:
175
- i.ctrlKey || i.metaKey || i.shiftKey ? W(-2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : F(-e.keyPanSpeed, 0), r = !0;
176
- break;
177
- }
178
- r && (i.preventDefault(), e.update());
179
- }
180
- function Te(i) {
181
- if (g.length === 1)
182
- O.set(i.pageX, i.pageY);
183
- else {
184
- const r = Y(i), d = 0.5 * (i.pageX + r.x), u = 0.5 * (i.pageY + r.y);
185
- O.set(d, u);
186
- }
187
- }
188
- function Le(i) {
189
- if (g.length === 1)
190
- A.set(i.pageX, i.pageY);
191
- else {
192
- const r = Y(i), d = 0.5 * (i.pageX + r.x), u = 0.5 * (i.pageY + r.y);
193
- A.set(d, u);
194
- }
195
- }
196
- function Pe(i) {
197
- const r = Y(i), d = i.pageX - r.x, u = i.pageY - r.y, y = Math.sqrt(d * d + u * u);
198
- z.set(0, y);
199
- }
200
- function lt(i) {
201
- e.enableZoom && Pe(i), e.enablePan && Le(i);
202
- }
203
- function dt(i) {
204
- e.enableZoom && Pe(i), e.enableRotate && Te(i);
205
- }
206
- function Ie(i) {
207
- if (g.length == 1)
208
- v.set(i.pageX, i.pageY);
209
- else {
210
- const d = Y(i), u = 0.5 * (i.pageX + d.x), y = 0.5 * (i.pageY + d.y);
211
- v.set(u, y);
212
- }
213
- V.subVectors(v, O).multiplyScalar(e.rotateSpeed);
214
- const r = e.domElement;
215
- W(2 * Math.PI * V.x / r.clientHeight), ee(2 * Math.PI * V.y / r.clientHeight), O.copy(v);
216
- }
217
- function Se(i) {
218
- if (g.length === 1)
219
- k.set(i.pageX, i.pageY);
220
- else {
221
- const r = Y(i), d = 0.5 * (i.pageX + r.x), u = 0.5 * (i.pageY + r.y);
222
- k.set(d, u);
223
- }
224
- B.subVectors(k, A).multiplyScalar(e.panSpeed), F(B.x, B.y), A.copy(k);
225
- }
226
- function Me(i) {
227
- const r = Y(i), d = i.pageX - r.x, u = i.pageY - r.y, y = Math.sqrt(d * d + u * u);
228
- N.set(0, y), R.set(0, Math.pow(N.y / z.y, e.zoomSpeed)), re(R.y), z.copy(N);
229
- const C = (i.pageX + r.x) * 0.5, b = (i.pageY + r.y) * 0.5;
230
- ae(C, b);
231
- }
232
- function ut(i) {
233
- e.enableZoom && Me(i), e.enablePan && Se(i);
234
- }
235
- function mt(i) {
236
- e.enableZoom && Me(i), e.enableRotate && Ie(i);
237
- }
238
- function Ce(i) {
239
- e.enabled !== !1 && (g.length === 0 && (e.domElement.setPointerCapture(i.pointerId), e.domElement.addEventListener("pointermove", ce), e.domElement.addEventListener("pointerup", K)), !wt(i) && (yt(i), i.pointerType === "touch" ? ke(i) : pt(i)));
240
- }
241
- function ce(i) {
242
- e.enabled !== !1 && (i.pointerType === "touch" ? _t(i) : ft(i));
243
- }
244
- function K(i) {
245
- switch (bt(i), g.length) {
246
- case 0:
247
- e.domElement.releasePointerCapture(i.pointerId), e.domElement.removeEventListener("pointermove", ce), e.domElement.removeEventListener("pointerup", K), e.dispatchEvent(je), o = n.NONE;
248
- break;
249
- case 1:
250
- const r = g[0], d = H[r];
251
- ke({ pointerId: r, pageX: d.x, pageY: d.y });
252
- break;
253
- }
254
- }
255
- function pt(i) {
256
- let r;
257
- switch (i.button) {
258
- case 0:
259
- r = e.mouseButtons.LEFT;
260
- break;
261
- case 1:
262
- r = e.mouseButtons.MIDDLE;
263
- break;
264
- case 2:
265
- r = e.mouseButtons.RIGHT;
266
- break;
267
- default:
268
- r = -1;
269
- }
270
- switch (r) {
271
- case U.DOLLY:
272
- if (e.enableZoom === !1) return;
273
- nt(i), o = n.DOLLY;
274
- break;
275
- case U.ROTATE:
276
- if (i.ctrlKey || i.metaKey || i.shiftKey) {
277
- if (e.enablePan === !1) return;
278
- xe(i), o = n.PAN;
279
- } else {
280
- if (e.enableRotate === !1) return;
281
- De(i), o = n.ROTATE;
282
- }
283
- break;
284
- case U.PAN:
285
- if (i.ctrlKey || i.metaKey || i.shiftKey) {
286
- if (e.enableRotate === !1) return;
287
- De(i), o = n.ROTATE;
288
- } else {
289
- if (e.enablePan === !1) return;
290
- xe(i), o = n.PAN;
291
- }
292
- break;
293
- default:
294
- o = n.NONE;
295
- }
296
- o !== n.NONE && e.dispatchEvent(me);
297
- }
298
- function ft(i) {
299
- switch (o) {
300
- case n.ROTATE:
301
- if (e.enableRotate === !1) return;
302
- ot(i);
303
- break;
304
- case n.DOLLY:
305
- if (e.enableZoom === !1) return;
306
- rt(i);
307
- break;
308
- case n.PAN:
309
- if (e.enablePan === !1) return;
310
- at(i);
311
- break;
312
- }
313
- }
314
- function Oe(i) {
315
- e.enabled === !1 || e.enableZoom === !1 || o !== n.NONE || (i.preventDefault(), e.dispatchEvent(me), ht(gt(i)), e.dispatchEvent(je));
316
- }
317
- function gt(i) {
318
- const r = i.deltaMode, d = {
319
- clientX: i.clientX,
320
- clientY: i.clientY,
321
- deltaY: i.deltaY
322
- };
323
- switch (r) {
324
- case 1:
325
- d.deltaY *= 16;
326
- break;
327
- case 2:
328
- d.deltaY *= 100;
329
- break;
330
- }
331
- return i.ctrlKey && !oe && (d.deltaY *= 10), d;
332
- }
333
- function ve(i) {
334
- i.key === "Control" && (oe = !0, e.domElement.getRootNode().addEventListener("keyup", Ae, { passive: !0, capture: !0 }));
335
- }
336
- function Ae(i) {
337
- i.key === "Control" && (oe = !1, e.domElement.getRootNode().removeEventListener("keyup", Ae, { passive: !0, capture: !0 }));
338
- }
339
- function le(i) {
340
- e.enabled === !1 || e.enablePan === !1 || ct(i);
341
- }
342
- function ke(i) {
343
- switch (Ve(i), g.length) {
344
- case 1:
345
- switch (e.touches.ONE) {
346
- case G.ROTATE:
347
- if (e.enableRotate === !1) return;
348
- Te(i), o = n.TOUCH_ROTATE;
349
- break;
350
- case G.PAN:
351
- if (e.enablePan === !1) return;
352
- Le(i), o = n.TOUCH_PAN;
353
- break;
354
- default:
355
- o = n.NONE;
356
- }
357
- break;
358
- case 2:
359
- switch (e.touches.TWO) {
360
- case G.DOLLY_PAN:
361
- if (e.enableZoom === !1 && e.enablePan === !1) return;
362
- lt(i), o = n.TOUCH_DOLLY_PAN;
363
- break;
364
- case G.DOLLY_ROTATE:
365
- if (e.enableZoom === !1 && e.enableRotate === !1) return;
366
- dt(i), o = n.TOUCH_DOLLY_ROTATE;
367
- break;
368
- default:
369
- o = n.NONE;
370
- }
371
- break;
372
- default:
373
- o = n.NONE;
374
- }
375
- o !== n.NONE && e.dispatchEvent(me);
376
- }
377
- function _t(i) {
378
- switch (Ve(i), o) {
379
- case n.TOUCH_ROTATE:
380
- if (e.enableRotate === !1) return;
381
- Ie(i), e.update();
382
- break;
383
- case n.TOUCH_PAN:
384
- if (e.enablePan === !1) return;
385
- Se(i), e.update();
386
- break;
387
- case n.TOUCH_DOLLY_PAN:
388
- if (e.enableZoom === !1 && e.enablePan === !1) return;
389
- ut(i), e.update();
390
- break;
391
- case n.TOUCH_DOLLY_ROTATE:
392
- if (e.enableZoom === !1 && e.enableRotate === !1) return;
393
- mt(i), e.update();
394
- break;
395
- default:
396
- o = n.NONE;
397
- }
398
- }
399
- function Re(i) {
400
- e.enabled !== !1 && i.preventDefault();
401
- }
402
- function yt(i) {
403
- g.push(i.pointerId);
404
- }
405
- function bt(i) {
406
- delete H[i.pointerId];
407
- for (let r = 0; r < g.length; r++)
408
- if (g[r] == i.pointerId) {
409
- g.splice(r, 1);
410
- return;
411
- }
412
- }
413
- function wt(i) {
414
- for (let r = 0; r < g.length; r++)
415
- if (g[r] == i.pointerId) return !0;
416
- return !1;
417
- }
418
- function Ve(i) {
419
- let r = H[i.pointerId];
420
- r === void 0 && (r = new E(), H[i.pointerId] = r), r.set(i.pageX, i.pageY);
421
- }
422
- function Y(i) {
423
- const r = i.pointerId === g[0] ? g[1] : g[0];
424
- return H[r];
425
- }
426
- e.domElement.addEventListener("contextmenu", Re), e.domElement.addEventListener("pointerdown", Ce), e.domElement.addEventListener("pointercancel", K), e.domElement.addEventListener("wheel", Oe, { passive: !1 }), e.domElement.getRootNode().addEventListener("keydown", ve, { passive: !0, capture: !0 }), this.update();
1
+ var G = Object.defineProperty;
2
+ var S = (r, s, t) => s in r ? G(r, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[s] = t;
3
+ var i = (r, s, t) => S(r, typeof s != "symbol" ? s + "" : s, t);
4
+ import { A as x, a as I, b as y } from "./chunks/FileTypes-CpKiTXEY.mjs";
5
+ import { g as nt, f as ot, e as ht, d as lt, l as ct, s as dt, c as _t, x as pt, i as ut, j as gt, k as ft, o as mt, p as Et, m as Dt, q as Mt, u as wt, t as bt, v as xt, r as It, w as yt, n as Pt, E as Ht, F as Vt, G as zt, h as vt, S as Gt, y as St } from "./chunks/FileTypes-CpKiTXEY.mjs";
6
+ import { U as d } from "./chunks/PerspectiveCamera-DUiWJJIj.mjs";
7
+ import { C as jt, b as Ot, D as Rt, a as Tt, H as Yt, P as Lt } from "./chunks/PerspectiveCamera-DUiWJJIj.mjs";
8
+ import { Object3D as u, Color as P, Vector3 as h, TorusGeometry as H, MeshBasicMaterial as f, Mesh as _, MathUtils as z, Euler as A, CylinderGeometry as m, BoxGeometry as j, PlaneGeometry as D } from "three";
9
+ import { N as Xt, g as Nt, i as Ft } from "./chunks/network-error-CHvryg-4.mjs";
10
+ import { f as qt, i as Qt } from "./chunks/findInterface-DbJ5qzbc.mjs";
11
+ import { F as Wt, P as kt } from "./chunks/parse-error-BFRJyIxM.mjs";
12
+ import { i as Bt, a as Jt } from "./chunks/PovSchema-DWWvr_ED.mjs";
13
+ class M extends u {
14
+ constructor(t, e, a, n, o) {
15
+ super();
16
+ i(this, "isHoverable", !0);
17
+ i(this, "isDraggable", !0);
18
+ i(this, "parent", null);
19
+ i(this, "axis");
20
+ i(this, "_color", new P(16711935));
21
+ i(this, "_colorHover");
22
+ i(this, "_hovered");
23
+ i(this, "_highlight");
24
+ i(this, "_lineMaterial");
25
+ i(this, "_colliderMesh");
26
+ this.name = "DIVERadialHandle", this.axis = t, this._color.set(o), this._colorHover = this._color.clone().multiplyScalar(2), this._hovered = !1, this._highlight = !1;
27
+ const c = new H(e, 0.01, 13, 48, a);
28
+ this._lineMaterial = new f({
29
+ color: o,
30
+ depthTest: !1,
31
+ depthWrite: !1
32
+ });
33
+ const l = new _(c, this._lineMaterial);
34
+ l.layers.mask = d, l.renderOrder = 1 / 0, this.add(l);
35
+ const g = new H(e, 0.1, 3, 48, a), E = new f({
36
+ color: 16711935,
37
+ transparent: !0,
38
+ opacity: 0.15,
39
+ depthTest: !1,
40
+ depthWrite: !1
41
+ });
42
+ this._colliderMesh = new _(g, E), this._colliderMesh.visible = !1, this._colliderMesh.layers.mask = d, this._colliderMesh.renderOrder = 1 / 0, this.add(this._colliderMesh), this.lookAt(n);
427
43
  }
428
- }
429
- const se = {
430
- enableDamping: !0,
431
- dampingFactor: 0.05
432
- }, J = class J extends ti {
433
- constructor(t, e, n = se) {
434
- super(t, e);
435
- a(this, "uuid", I.generateUUID());
436
- a(this, "object");
437
- this.domElement = e, this.domElement = e, this.object = t, this.enableDamping = n.enableDamping ?? se.enableDamping, this.dampingFactor = n.dampingFactor ?? se.dampingFactor, this.object.position.set(0, 2, 2), this.target.copy({ x: 0, y: 0.5, z: 0 }), this.update();
438
- }
439
- tick() {
440
- this.enabled && this.update();
441
- }
442
- computeEncompassingView(t) {
443
- const e = t.getCenter(new m()), n = t.getSize(new m()), o = Math.max(n.x, n.y, n.z) * 1.25;
444
- return {
445
- position: this.object.position.clone().normalize().clone().multiplyScalar(o),
446
- target: e.clone()
447
- };
448
- }
449
- zoomIn(t) {
450
- const e = t || J.DEFAULT_ZOOM_FACTOR, { minDistance: n, maxDistance: o } = this;
451
- this.minDistance = this.maxDistance = I.clamp(
452
- this.getDistance() - e,
453
- n + e,
454
- o - e
455
- ), this.update(), this.minDistance = n, this.maxDistance = o;
456
- }
457
- zoomOut(t) {
458
- const e = t || J.DEFAULT_ZOOM_FACTOR, { minDistance: n, maxDistance: o } = this;
459
- this.minDistance = this.maxDistance = I.clamp(
460
- this.getDistance() + e,
461
- n + e,
462
- o - e
463
- ), this.update(), this.minDistance = n, this.maxDistance = o;
44
+ set debug(t) {
45
+ this._colliderMesh.visible = t;
464
46
  }
465
- };
466
- a(J, "DEFAULT_ZOOM_FACTOR", 1);
467
- let ne = J;
468
- class ii extends It {
469
- constructor(t, e, n) {
470
- super(-1, 1, 1, -1, 0.1, 100);
471
- a(this, "axesHelper");
472
- a(this, "_renderer");
473
- a(this, "_scene");
474
- a(this, "_camera");
475
- a(this, "_restoreViewport", new St());
476
- this.layers.mask = q, this.axesHelper = new Mt(0.5), this.axesHelper.layers.mask = q, this.axesHelper.material.depthTest = !1, this.axesHelper.position.set(0, 0, -1), this.axesHelper.setColors(
477
- new D(Wt),
478
- new D(Kt),
479
- new D(Zt)
480
- );
481
- const o = new ue("X", 0.2, Xt), l = new ue("Y", 0.2, qt), c = new ue("Z", 0.2, Jt);
482
- o.layers.mask = q, l.layers.mask = q, c.layers.mask = q, o.position.set(0.7, 0, 0), l.position.set(0, 0.7, 0), c.position.set(0, 0, 0.7), this.axesHelper.add(o), this.axesHelper.add(l), this.axesHelper.add(c), this.add(this.axesHelper), this._renderer = t, this._scene = e, this._camera = n, this._scene.add(this);
47
+ get highlight() {
48
+ return this._highlight;
483
49
  }
484
- tick() {
485
- const t = this._scene.background;
486
- this._scene.background = null, this._renderer.webglrenderer.getViewport(this._restoreViewport), this._renderer.webglrenderer.setViewport(0, 0, 150, 150), this._renderer.webglrenderer.autoClear = !1, this.setFromCameraMatrix(this._camera.matrix), this._renderer.webglrenderer.render(this._scene, this), this._renderer.webglrenderer.setViewport(this._restoreViewport), this._renderer.webglrenderer.autoClear = !0, this._scene.background = t;
50
+ set highlight(t) {
51
+ this._highlight = t, this._lineMaterial.color = this._highlight || this._hovered ? this._colorHover : this._color;
487
52
  }
488
- dispose() {
489
- this._scene.remove(this);
53
+ get forwardVector() {
54
+ return new h(0, 0, 1).applyQuaternion(this.quaternion).normalize();
490
55
  }
491
- setFromCameraMatrix(t) {
492
- this.axesHelper.rotation.setFromRotationMatrix(
493
- new Ct().extractRotation(t).invert()
494
- );
56
+ get rightVector() {
57
+ return new h(1, 0, 0).applyQuaternion(this.quaternion).normalize();
495
58
  }
496
- }
497
- class si extends j {
498
- constructor() {
499
- super();
500
- a(this, "isDIVELight", !0);
501
- a(this, "isDIVEAmbientLight", !0);
502
- a(this, "_light");
503
- this.name = "DIVEAmbientLight", this._light = new Ot(16777215, 1), this._light.layers.mask = S, this.add(this._light);
59
+ get upVector() {
60
+ return new h(0, 1, 0).applyQuaternion(this.quaternion).normalize();
504
61
  }
505
- setColor(t) {
506
- this._light.color = t;
62
+ reset() {
63
+ this._lineMaterial.color = this._color;
507
64
  }
508
- setIntensity(t) {
509
- this._light.intensity = t;
65
+ onPointerEnter() {
66
+ this._hovered = !0, this.parent && this.parent.onHandleHover(this, !0);
510
67
  }
511
- setEnabled(t) {
512
- this._light.visible = t;
68
+ onPointerLeave() {
69
+ this._hovered = !1, this.parent && this.parent.onHandleHover(this, !1);
513
70
  }
514
- }
515
- class ni extends j {
516
- constructor() {
517
- super();
518
- a(this, "isDIVELight", !0);
519
- a(this, "isDIVEPointLight", !0);
520
- a(this, "isMovable", !0);
521
- a(this, "isSelectable", !0);
522
- a(this, "gizmo", null);
523
- a(this, "light");
524
- a(this, "mesh");
525
- this.name = "DIVEPointLight", this.light = new vt(16777215, 1), this.light.layers.mask = S, this.light.castShadow = !0, this.light.shadow.mapSize.width = 512, this.light.shadow.mapSize.height = 512, this.add(this.light);
526
- const t = 0.1, e = new Ke(
527
- t,
528
- t * 320,
529
- t * 320
530
- ), n = new At({
531
- color: this.light.color,
532
- transparent: !0,
533
- opacity: 0.8,
534
- side: kt
535
- });
536
- this.mesh = new pe(e, n), this.mesh.layers.mask = jt, this.add(this.mesh);
71
+ onDragStart() {
72
+ this.parent && this.parent.onHandleDragStart(this);
537
73
  }
538
- setColor(t) {
539
- this.light.color = t, this.mesh.material.color = t;
74
+ onDrag(t) {
75
+ this.parent && this.parent.onHandleDrag(this, t);
540
76
  }
541
- setIntensity(t) {
542
- this.light.intensity = t, this.mesh.material.opacity = t > 0.8 ? 0.8 : t * 0.8;
77
+ onDragEnd() {
78
+ this.parent && this.parent.onHandleDragEnd(this);
543
79
  }
544
- setEnabled(t) {
545
- this.light.visible = t;
80
+ }
81
+ function p(r, s) {
82
+ const t = (r + "e").split("e");
83
+ return +(t[0] + "e" + (+t[1] + (s || 0)));
84
+ }
85
+ function O(r, s = 0) {
86
+ const t = p(r, +s);
87
+ return p(Math.ceil(t), -s);
88
+ }
89
+ function R(r, s = 0) {
90
+ const t = p(r, +s);
91
+ return p(Math.floor(t), -s);
92
+ }
93
+ function v(r, s = 0) {
94
+ if (r < 0) return -v(-r, s);
95
+ const t = p(r, +s);
96
+ return p(Math.round(t), -s);
97
+ }
98
+ function T(r, s, t) {
99
+ return Math.atan2(
100
+ r.clone().cross(s).dot(t),
101
+ s.clone().dot(r)
102
+ );
103
+ }
104
+ function Y(r, s = 0) {
105
+ const t = p(r, +s);
106
+ return p(Math.round(t), -s).toFixed(s);
107
+ }
108
+ function L(r, s = 0) {
109
+ const t = p(r, +s);
110
+ return p(Math.trunc(t), -s);
111
+ }
112
+ function C(r) {
113
+ return (z.radToDeg(r) + 360) % 360;
114
+ }
115
+ function X(r) {
116
+ return z.degToRad(r);
117
+ }
118
+ const N = {
119
+ ceilExp: O,
120
+ floorExp: R,
121
+ roundExp: v,
122
+ toFixedExp: Y,
123
+ truncateExp: L,
124
+ signedAngleTo: T,
125
+ radToDeg: C,
126
+ degToRad: X
127
+ };
128
+ class F extends u {
129
+ constructor(t) {
130
+ super();
131
+ i(this, "children");
132
+ i(this, "_controller");
133
+ i(this, "_startRot");
134
+ this.name = "DIVERotateGizmo", this.children = [], this._startRot = null, this._controller = t, this.add(
135
+ new M(
136
+ "x",
137
+ 1,
138
+ Math.PI / 2,
139
+ new h(1, 0, 0),
140
+ x
141
+ )
142
+ ), this.add(
143
+ new M(
144
+ "y",
145
+ 1,
146
+ -Math.PI / 2,
147
+ new h(0, 1, 0),
148
+ I
149
+ )
150
+ ), this.add(
151
+ new M(
152
+ "z",
153
+ 1,
154
+ Math.PI / 2,
155
+ new h(0, 0, 1),
156
+ y
157
+ )
158
+ );
546
159
  }
547
- onMove() {
548
- w("State").then((t) => {
549
- var e;
550
- (e = t.get(this.userData.id)) == null || e.performAction("UPDATE_OBJECT", {
551
- id: this.userData.id,
552
- position: this.position
553
- });
160
+ set debug(t) {
161
+ this.children.forEach((e) => {
162
+ e.debug = t;
554
163
  });
555
164
  }
556
- onSelect() {
557
- w("State").then((t) => {
558
- var e;
559
- (e = t.get(this.userData.id)) == null || e.performAction("SELECT_OBJECT", {
560
- id: this.userData.id
561
- });
165
+ reset() {
166
+ this.children.forEach((t) => {
167
+ t.reset();
562
168
  });
563
169
  }
564
- onDeselect() {
565
- w("State").then((t) => {
566
- var e;
567
- (e = t.get(this.userData.id)) == null || e.performAction("DESELECT_OBJECT", {
568
- id: this.userData.id
569
- });
170
+ handleHighlight(t, e, a) {
171
+ this.children.forEach((n) => {
172
+ a ? n.highlight = n.axis === t && a : n.highlight = n.axis === t && e;
570
173
  });
571
174
  }
175
+ onHandleHover(t, e) {
176
+ this._startRot || this.parent && this.parent.parent && (this.parent.parent.onHover("rotate", t.axis, e), this.handleHighlight(t.axis, e, !1));
177
+ }
178
+ onHandleDragStart(t) {
179
+ if (!this.parent || !this.parent.parent) return;
180
+ const e = this.parent.parent.object;
181
+ e && (this._startRot = e.rotation.clone(), this.handleHighlight(t.axis, !0, !0));
182
+ }
183
+ onHandleDrag(t, e) {
184
+ if (!this._startRot || !this.parent || !this.parent.parent || !("onChange" in this.parent.parent)) return;
185
+ const a = e.dragCurrent.clone().sub(this.parent.parent.position).normalize(), n = e.dragStart.clone().sub(this.parent.parent.position).normalize(), o = N.signedAngleTo(
186
+ n,
187
+ a,
188
+ t.forwardVector
189
+ ), c = new A(
190
+ this._startRot.x + t.forwardVector.x * o,
191
+ this._startRot.y + t.forwardVector.y * o,
192
+ this._startRot.z + t.forwardVector.z * o
193
+ );
194
+ this.parent.parent.onChange(void 0, c);
195
+ }
196
+ onHandleDragEnd(t) {
197
+ this._startRot = null, this.handleHighlight(t.axis, !1, !1);
198
+ }
572
199
  }
573
- class Je extends j {
574
- constructor() {
200
+ class w extends u {
201
+ constructor(t, e, a, n) {
575
202
  super();
576
- a(this, "isDIVELight", !0);
577
- a(this, "isDIVESceneLight", !0);
578
- a(this, "_hemiLight");
579
- a(this, "_dirLight");
580
- this.name = "DIVESceneLight", this._hemiLight = new Rt(16777215, 16777215, 2), this._hemiLight.layers.mask = S, this._hemiLight.position.set(0, 50, 0), this.add(this._hemiLight), this._dirLight = new Vt(16777215, 3), this._dirLight.layers.mask = S, this._dirLight.position.set(1, 1.75, 1), this._dirLight.position.multiplyScalar(30), this._dirLight.castShadow = !0, this._dirLight.shadow.mapSize.width = 2048, this._dirLight.shadow.mapSize.height = 2048;
581
- const t = 5;
582
- this._dirLight.shadow.camera.left = -5, this._dirLight.shadow.camera.right = t, this._dirLight.shadow.camera.top = t, this._dirLight.shadow.camera.bottom = -5, this._dirLight.shadow.camera.far = 3500, this.add(this._dirLight);
203
+ i(this, "isHoverable", !0);
204
+ i(this, "isDraggable", !0);
205
+ i(this, "parent", null);
206
+ i(this, "axis");
207
+ i(this, "_color", new P(16711935));
208
+ i(this, "_colorHover");
209
+ i(this, "_hovered");
210
+ i(this, "_highlight");
211
+ i(this, "_lineMaterial");
212
+ i(this, "_colliderMesh");
213
+ this.name = "DIVEAxisHandle", this.axis = t, this._color.set(n), this._colorHover = this._color.clone().multiplyScalar(2), this._highlight = !1, this._hovered = !1;
214
+ const o = new m(0.01, 0.01, e, 13);
215
+ this._lineMaterial = new f({
216
+ color: n,
217
+ depthTest: !1,
218
+ depthWrite: !1
219
+ });
220
+ const c = new _(o, this._lineMaterial);
221
+ c.layers.mask = d, c.renderOrder = 1 / 0, c.rotateX(Math.PI / 2), c.translateY(e / 2), this.add(c);
222
+ const l = new m(0.1, 0.1, e, 3), g = new f({
223
+ color: 16711935,
224
+ transparent: !0,
225
+ opacity: 0.15,
226
+ depthTest: !1,
227
+ depthWrite: !1
228
+ });
229
+ this._colliderMesh = new _(l, g), this._colliderMesh.visible = !1, this._colliderMesh.layers.mask = d, this._colliderMesh.renderOrder = 1 / 0, this._colliderMesh.rotateX(Math.PI / 2), this._colliderMesh.translateY(e / 2), this.add(this._colliderMesh), this.rotateX(a.y * -Math.PI / 2), this.rotateY(a.x * Math.PI / 2);
583
230
  }
584
- setColor(t) {
585
- this._hemiLight.color = t, this._dirLight.color = t;
231
+ set debug(t) {
232
+ this._colliderMesh.visible = t;
586
233
  }
587
- setIntensity(t) {
588
- this._hemiLight.intensity = t * 2, this._dirLight.intensity = t * 3;
234
+ get highlight() {
235
+ return this._highlight;
589
236
  }
590
- setEnabled(t) {
591
- this._hemiLight.visible = t, this._dirLight.visible = t;
237
+ set highlight(t) {
238
+ this._highlight = t, this._lineMaterial.color = this._highlight || this._hovered ? this._colorHover : this._color;
592
239
  }
593
- }
594
- const ge = (h) => h.parent ? ge(h.parent) : h;
595
- class _e extends j {
596
- constructor() {
597
- super();
598
- a(this, "isSelectable", !0);
599
- a(this, "isMovable", !0);
600
- a(this, "isDIVENode", !0);
601
- a(this, "gizmo", null);
602
- a(this, "_positionWorldBuffer");
603
- a(this, "_boundingBox");
604
- this.layers.mask = S, this._positionWorldBuffer = new m(), this._boundingBox = new Ze();
605
- }
606
- setPosition(t) {
607
- if (!this.parent) {
608
- this.position.set(t.x, t.y, t.z);
609
- return;
610
- }
611
- const e = new m(t.x, t.y, t.z);
612
- this.position.copy(this.parent.worldToLocal(e)), "isDIVEGroup" in this.parent && this.parent.updateLineTo(this);
613
- }
614
- setRotation(t) {
615
- this.rotation.set(t.x, t.y, t.z);
616
- }
617
- setScale(t) {
618
- this.scale.set(t.x, t.y, t.z);
619
- }
620
- setVisibility(t) {
621
- this.visible = t;
622
- }
623
- setToWorldOrigin() {
624
- this.position.set(0, 0, 0), w("State").then((t) => {
625
- var e;
626
- (e = t.get(this.userData.id)) == null || e.performAction("UPDATE_OBJECT", {
627
- id: this.userData.id,
628
- position: this.getWorldPosition(this._positionWorldBuffer),
629
- rotation: this.rotation,
630
- scale: this.scale
631
- });
632
- });
240
+ get forwardVector() {
241
+ return new h(0, 0, 1).applyQuaternion(this.quaternion).normalize();
633
242
  }
634
- /**
635
- * Can be called when the object is moved from a foreign object (gizmo, parent, etc.) to update the object's position.
636
- */
637
- onMove() {
638
- w("State").then((t) => {
639
- var e;
640
- (e = t.get(this.userData.id)) == null || e.performAction("UPDATE_OBJECT", {
641
- id: this.userData.id,
642
- position: this.getWorldPosition(this._positionWorldBuffer),
643
- rotation: this.rotation,
644
- scale: this.scale
645
- });
646
- });
243
+ get rightVector() {
244
+ return new h(1, 0, 0).applyQuaternion(this.quaternion).normalize();
647
245
  }
648
- onSelect() {
649
- w("State").then((t) => {
650
- var e;
651
- (e = t.get(this.userData.id)) == null || e.performAction("SELECT_OBJECT", {
652
- id: this.userData.id
653
- });
654
- });
246
+ get upVector() {
247
+ return new h(0, 1, 0).applyQuaternion(this.quaternion).normalize();
655
248
  }
656
- onDeselect() {
657
- w("State").then((t) => {
658
- var e;
659
- (e = t.get(this.userData.id)) == null || e.performAction("DESELECT_OBJECT", {
660
- id: this.userData.id
661
- });
662
- });
249
+ reset() {
250
+ this._lineMaterial.color = this._color;
663
251
  }
664
- }
665
- class $e extends _e {
666
- constructor() {
667
- super(...arguments);
668
- a(this, "isDIVEModel", !0);
669
- a(this, "_mesh", null);
670
- a(this, "_material", null);
671
- a(this, "_assetLoader", null);
672
- }
673
- async _getAssetLoader() {
674
- return this._assetLoader || (this._assetLoader = new (await w("AssetLoader"))()), this._assetLoader;
675
- }
676
- async setFromURL(t) {
677
- const n = await (await this._getAssetLoader()).load(t);
678
- this.setFromGLTF(n), w("State").then((o) => {
679
- var l;
680
- (l = o.get(this.userData.id)) == null || l.performAction("MODEL_LOADED", {
681
- id: this.userData.id
682
- });
683
- });
252
+ onPointerEnter() {
253
+ this._hovered = !0, this.parent && this.parent.onHandleHover(this, !0);
684
254
  }
685
- setFromGLTF(t) {
686
- this.clear(), this._boundingBox.makeEmpty(), t.traverse((e) => {
687
- e.castShadow = !0, e.receiveShadow = !0, e.layers.mask = this.layers.mask, this._boundingBox.expandByObject(e), !this._mesh && "isMesh" in e && (this._mesh = e, this._material ? this._mesh.material = this._material : this._material = e.material);
688
- }), this.add(t);
689
- }
690
- setMaterial(t) {
691
- this._material || (this._material = new fe()), t.vertexColors !== void 0 && (this._material.vertexColors = t.vertexColors), t.color !== void 0 && this._material.color.set(t.color), t.map !== void 0 && (this._material.map = t.map), t.normalMap !== void 0 && (this._material.normalMap = t.normalMap), t.roughness !== void 0 && (this._material.roughness = t.roughness), t.roughnessMap !== void 0 && (this._material.roughnessMap = t.roughnessMap, this._material.roughnessMap && (this._material.roughness = 1)), t.metalness !== void 0 && (this._material.metalness = t.metalness), t.metalnessMap !== void 0 && (this._material.metalnessMap = t.metalnessMap, this._material.metalnessMap && (this._material.metalness = 1)), this._mesh && (this._mesh.material = this._material);
692
- }
693
- placeOnFloor() {
694
- var o, l, c, p;
695
- const t = this.getWorldPosition(this._positionWorldBuffer), e = t.clone();
696
- (l = (o = this._mesh) == null ? void 0 : o.geometry) == null || l.computeBoundingBox();
697
- const n = (p = (c = this._mesh) == null ? void 0 : c.geometry) == null ? void 0 : p.boundingBox;
698
- !n || !this._mesh || (t.y = t.y - this._mesh.localToWorld(n.min.clone()).y, t.y !== e.y && w("State").then((f) => {
699
- var _;
700
- (_ = f.get(this.userData.id)) == null || _.performAction("UPDATE_OBJECT", {
701
- id: this.userData.id,
702
- position: t,
703
- rotation: this.rotation,
704
- scale: this.scale
705
- });
706
- }));
707
- }
708
- dropIt() {
709
- if (!this.parent) {
710
- console.warn(
711
- "DIVEModel: dropIt() called on a model that is not in the scene.",
712
- this
713
- );
714
- return;
715
- }
716
- const t = this._boundingBox.min.y * this.scale.y, e = this.localToWorld(
717
- this._boundingBox.getCenter(new m()).multiply(this.scale)
718
- );
719
- e.y = t + this.position.y;
720
- const n = new Xe(e, new m(0, -1, 0));
721
- n.layers.mask = S;
722
- const o = n.intersectObjects(
723
- ge(this).root.children,
724
- !0
725
- );
726
- if (o.length > 0) {
727
- const l = o[0].object;
728
- l.geometry.computeBoundingBox();
729
- const c = l.geometry.boundingBox, p = l.localToWorld(c.max.clone()), f = this.position.clone(), _ = this.position.clone().setY(p.y).sub(new m(0, t, 0));
730
- if (this.position.copy(_), this.position.y === f.y) return;
731
- this.onMove();
732
- }
255
+ onPointerLeave() {
256
+ this._hovered = !1, this.parent && this.parent.onHandleHover(this, !1);
257
+ }
258
+ onDragStart() {
259
+ this.parent && this.parent.onHandleDragStart(this);
260
+ }
261
+ onDrag(t) {
262
+ this.parent && this.parent.onHandleDrag(this, t);
263
+ }
264
+ onDragEnd() {
265
+ this.parent && this.parent.onHandleDragEnd(this);
733
266
  }
734
267
  }
735
- class oi extends _e {
736
- constructor() {
268
+ class Z extends u {
269
+ constructor(t) {
737
270
  super();
738
- a(this, "isDIVEPrimitive", !0);
739
- a(this, "_mesh");
740
- this._mesh = new pe(), this._mesh.layers.mask = S, this._mesh.castShadow = !0, this._mesh.receiveShadow = !0, this._mesh.material = new fe(), this.add(this._mesh);
741
- }
742
- setGeometry(t) {
743
- const e = this.assembleGeometry(t);
744
- e && (this._mesh.geometry = e, this._boundingBox.setFromObject(this._mesh));
745
- }
746
- setMaterial(t) {
747
- const e = this._mesh.material;
748
- t.vertexColors !== void 0 && (e.vertexColors = t.vertexColors), t.color !== void 0 && (e.color = new D(t.color)), t.map !== void 0 && (e.map = t.map), t.normalMap !== void 0 && (e.normalMap = t.normalMap), t.roughness !== void 0 && (e.roughness = t.roughness), t.roughnessMap !== void 0 && (e.roughnessMap = t.roughnessMap, e.roughnessMap && (e.roughness = 1)), t.metalness !== void 0 && (e.metalness = t.metalness), t.metalnessMap !== void 0 && (e.metalnessMap = t.metalnessMap, e.metalnessMap && (e.metalness = 0)), this._mesh && (this._mesh.material = e);
749
- }
750
- placeOnFloor() {
751
- var o, l, c, p;
752
- const t = this.getWorldPosition(this._positionWorldBuffer), e = t.clone();
753
- (l = (o = this._mesh) == null ? void 0 : o.geometry) == null || l.computeBoundingBox();
754
- const n = (p = (c = this._mesh) == null ? void 0 : c.geometry) == null ? void 0 : p.boundingBox;
755
- !n || !this._mesh || (t.y = t.y - this._mesh.localToWorld(n.min.clone()).y, t.y !== e.y && w("State").then((f) => {
756
- var _;
757
- (_ = f.get(this.userData.id)) == null || _.performAction("UPDATE_OBJECT", {
758
- id: this.userData.id,
759
- position: t,
760
- rotation: this.rotation,
761
- scale: this.scale
762
- });
763
- }));
764
- }
765
- dropIt() {
766
- if (!this.parent) {
767
- console.warn(
768
- "DIVEPrimitive: dropIt() called on a model that is not in the scene.",
769
- this
770
- );
771
- return;
772
- }
773
- const t = this._boundingBox.min.y * this.scale.y, e = this.localToWorld(
774
- this._boundingBox.getCenter(new m()).multiply(this.scale)
775
- );
776
- e.y = t + this.position.y;
777
- const n = new Xe(e, new m(0, -1, 0));
778
- n.layers.mask = S;
779
- const o = n.intersectObjects(
780
- ge(this).root.children,
781
- !0
271
+ i(this, "_controller");
272
+ i(this, "children");
273
+ i(this, "_startPos");
274
+ this.name = "DIVETranslateGizmo", this.children = [], this._startPos = null, this._controller = t, this.add(
275
+ new w("x", 1, new h(1, 0, 0), x)
276
+ ), this.add(
277
+ new w("y", 1, new h(0, 1, 0), I)
278
+ ), this.add(
279
+ new w("z", 1, new h(0, 0, 1), y)
782
280
  );
783
- if (o.length > 0) {
784
- const l = o[0].object;
785
- l.geometry.computeBoundingBox();
786
- const c = l.geometry.boundingBox, p = l.localToWorld(c.max.clone()), f = this.position.clone(), _ = this.position.clone().setY(p.y).sub(new m(0, t, 0));
787
- if (this.position.copy(_), this.position.y === f.y) return;
788
- this.onMove();
789
- }
790
- }
791
- assembleGeometry(t) {
792
- switch (this._mesh.material.flatShading = !1, t.name.toLowerCase()) {
793
- case "cylinder":
794
- return this.createCylinderGeometry(t);
795
- case "sphere":
796
- return this.createSphereGeometry(t);
797
- case "pyramid":
798
- return this._mesh.material.flatShading = !0, this.createPyramidGeometry(t);
799
- case "cube":
800
- case "box":
801
- return this.createBoxGeometry(t);
802
- case "cone":
803
- return this.createConeGeometry(t);
804
- case "wall":
805
- return this.createWallGeometry(t);
806
- case "plane":
807
- return this.createPlaneGeometry(t);
808
- default:
809
- return console.warn(
810
- "DIVEPrimitive.assembleGeometry: Invalid geometry type:",
811
- t.name.toLowerCase()
812
- ), null;
813
- }
814
281
  }
815
- createCylinderGeometry(t) {
816
- const e = new Bt(
817
- t.width / 2,
818
- t.width / 2,
819
- t.height,
820
- 64
821
- );
822
- return e.translate(0, t.height / 2, 0), e;
823
- }
824
- createSphereGeometry(t) {
825
- return new Ke(t.width / 2, 256, 256);
826
- }
827
- createPyramidGeometry(t) {
828
- const e = new Float32Array([
829
- -t.width / 2,
830
- 0,
831
- -t.depth / 2,
832
- // 0
833
- t.width / 2,
834
- 0,
835
- -t.depth / 2,
836
- // 1
837
- t.width / 2,
838
- 0,
839
- t.depth / 2,
840
- // 2
841
- -t.width / 2,
842
- 0,
843
- t.depth / 2,
844
- // 3
845
- 0,
846
- t.height,
847
- 0
848
- ]), n = new Uint16Array([
849
- 0,
850
- 1,
851
- 2,
852
- 0,
853
- 2,
854
- 3,
855
- 0,
856
- 4,
857
- 1,
858
- 1,
859
- 4,
860
- 2,
861
- 2,
862
- 4,
863
- 3,
864
- 3,
865
- 4,
866
- 0
867
- ]), o = new qe();
868
- return o.setAttribute(
869
- "position",
870
- new Ye(e, 3)
871
- ), o.setIndex(new Ye(n, 1)), o.computeVertexNormals(), o.computeBoundingBox(), o.computeBoundingSphere(), o;
872
- }
873
- createBoxGeometry(t) {
874
- const e = new de(
875
- t.width,
876
- t.height,
877
- t.depth
878
- );
879
- return e.translate(0, t.height / 2, 0), e;
880
- }
881
- createConeGeometry(t) {
882
- const e = new zt(t.width / 2, t.height, 256);
883
- return e.translate(0, t.height / 2, 0), e;
884
- }
885
- createWallGeometry(t) {
886
- const e = new de(
887
- t.width,
888
- t.height,
889
- t.depth || 0.05,
890
- 16
891
- );
892
- return e.translate(0, t.height / 2, 0), e;
282
+ set debug(t) {
283
+ this.children.forEach((e) => {
284
+ e.debug = t;
285
+ });
893
286
  }
894
- createPlaneGeometry(t) {
895
- const e = new de(
896
- t.width,
897
- t.height,
898
- t.depth
899
- );
900
- return e.translate(0, t.height / 2, 0), e;
287
+ reset() {
288
+ this.children.forEach((t) => {
289
+ t.reset();
290
+ });
901
291
  }
902
- }
903
- class ri extends _e {
904
- // lines to children
905
- constructor() {
906
- super();
907
- a(this, "isDIVEGroup", !0);
908
- a(this, "_members");
909
- a(this, "_lines");
910
- this.name = "DIVEGroup", this._members = [], this._lines = [];
911
- }
912
- // children objects
913
- get members() {
914
- return this._members;
915
- }
916
- setPosition(t) {
917
- super.setPosition(t), this._members.forEach((e) => {
918
- "isDIVENode" in e && e.onMove();
292
+ handleHighlight(t, e, a) {
293
+ this.children.forEach((n) => {
294
+ a ? n.highlight = n.axis === t && a : n.highlight = n.axis === t && e;
919
295
  });
920
296
  }
921
- setLinesVisibility(t, e) {
922
- if (!e) {
923
- this._lines.forEach((o) => {
924
- o.visible = t;
925
- });
926
- return;
927
- }
928
- const n = this._members.indexOf(e);
929
- n !== -1 && (this._lines[n].visible = t);
297
+ onHandleHover(t, e) {
298
+ this._startPos || this.parent && this.parent.parent && (this.parent.parent.onHover(
299
+ "translate",
300
+ t.axis,
301
+ e
302
+ ), this.handleHighlight(t.axis, e, !1));
303
+ }
304
+ onHandleDragStart(t) {
305
+ if (!this.parent || !this.parent.parent) return;
306
+ const e = this.parent.parent.object;
307
+ e && (this._startPos = e.position.clone(), this.handleHighlight(t.axis, !0, !0));
308
+ }
309
+ onHandleDrag(t, e) {
310
+ if (!this._startPos || !this.parent || !this.parent.parent || !("onChange" in this.parent.parent)) return;
311
+ const a = e.dragDelta.clone().projectOnVector(t.forwardVector);
312
+ this.parent.parent.onChange(
313
+ this._startPos.clone().add(a)
314
+ );
315
+ }
316
+ onHandleDragEnd(t) {
317
+ this._startPos = null, this.handleHighlight(t.axis, !1, !1);
930
318
  }
931
- attach(t) {
932
- if (this._members.includes(t))
933
- return this;
934
- const e = this.createLine();
935
- return this.add(e), this._lines.push(e), super.attach(t), this._members.push(t), this._updateLineTo(e, t), this.setLinesVisibility(!0, t), this;
936
- }
937
- /**
938
- * Removes an object from the group.
939
- * @param object - The object to remove.
940
- * @returns The group instance.
941
- */
942
- remove(t) {
943
- const e = this._members.indexOf(t);
944
- if (e === -1)
945
- return this;
946
- const n = this._lines[e];
947
- return super.remove(n), this._lines.splice(e, 1), super.remove(t), this._members.splice(e, 1), this;
948
- }
949
- updateLineTo(t) {
950
- const e = this._members.indexOf(t);
951
- e !== -1 && this._updateLineTo(this._lines[e], t);
952
- }
953
- /**
954
- * Creates a line for visualization.
955
- */
956
- createLine() {
957
- const t = new qe(), e = new Nt({
958
- color: 6710886,
959
- dashSize: 0.05,
960
- gapSize: 0.025
961
- }), n = new Ft(t, e);
962
- return n.visible = !1, n;
963
- }
964
- /**
965
- * Updates a line to the object.
966
- */
967
- _updateLineTo(t, e) {
968
- const n = [
969
- new m(0, 0, 0),
970
- e.position.clone()
971
- ];
972
- t.geometry.setFromPoints(n), t.computeLineDistances();
973
- }
974
- // public setBoundingBoxVisibility(visible: boolean): void {
975
- // this._boxMesh.visible = visible;
976
- // }
977
- // /**
978
- // * Recalculates the position of the group based on it's bounding box.
979
- // * Children's world positions are kept.
980
- // */
981
- // private recalculatePosition(): void {
982
- // // store all children's world positions
983
- // const childrensWorldPositions: Vector3[] = this.children.map((child) => child.getWorldPosition(new Vector3()));
984
- // // calculate new center and set it as the group's position
985
- // const bbcenter = this.updateBB();
986
- // this.position.copy(bbcenter);
987
- // // set childrens's positions so their world positions are kept
988
- // this.children.forEach((child, i) => {
989
- // if (child.uuid === this._boxMesh.uuid) return;
990
- // child.position.copy(this.worldToLocal(childrensWorldPositions[i]));
991
- // });
992
- // DIVECommunication.get(this.userData.id)?.performAction('UPDATE_OBJECT', { id: this.userData.id, position: this.position });
993
- // }
994
- // /**
995
- // * Updates the bounding box of the group.
996
- // * @returns {Vector3} The new center of the bounding box.
997
- // */
998
- // private updateBB(): Vector3 {
999
- // this._boundingBox.makeEmpty();
1000
- // if (this.children.length === 1) {
1001
- // // because we always have the box mesh as 1 child
1002
- // return this.position.clone();
1003
- // }
1004
- // this.children.forEach((child) => {
1005
- // if (child.uuid === this._boxMesh.uuid) return;
1006
- // this._boundingBox.expandByObject(child);
1007
- // });
1008
- // return this._boundingBox.getCenter(new Vector3());
1009
- // }
1010
- // private updateBoxMesh(): void {
1011
- // if (this.children.length === 1) {
1012
- // // because we always have the box mesh as 1 child
1013
- // this._boxMesh.visible = false;
1014
- // return;
1015
- // }
1016
- // this._boxMesh.quaternion.copy(this.quaternion.clone().invert());
1017
- // this._boxMesh.scale.set(1 / this.scale.x, 1 / this.scale.y, 1 / this.scale.z);
1018
- // this._boxMesh.geometry = new BoxGeometry(this._boundingBox.max.x - this._boundingBox.min.x, this._boundingBox.max.y - this._boundingBox.min.y, this._boundingBox.max.z - this._boundingBox.min.z);
1019
- // this._boxMesh.visible = true;
1020
- // }
1021
319
  }
1022
- class ai extends pe {
1023
- constructor() {
1024
- super(
1025
- new Yt(1e4, 1e4),
1026
- new fe({
1027
- color: new D(150 / 255, 150 / 255, 150 / 255)
1028
- })
320
+ class b extends u {
321
+ constructor(t, e, a, n, o = 0.05) {
322
+ super();
323
+ i(this, "isHoverable", !0);
324
+ i(this, "isDraggable", !0);
325
+ i(this, "parent", null);
326
+ i(this, "axis");
327
+ i(this, "_color", new P(16711935));
328
+ i(this, "_colorHover");
329
+ i(this, "_hovered");
330
+ i(this, "_highlight");
331
+ i(this, "_lineMaterial");
332
+ i(this, "_colliderMesh");
333
+ i(this, "_box");
334
+ i(this, "_boxSize");
335
+ this.name = "DIVEScaleHandle", this.axis = t, this._color.set(n), this._colorHover = this._color.clone().multiplyScalar(2), this._hovered = !1, this._highlight = !1, this._boxSize = o;
336
+ const c = new m(
337
+ 0.01,
338
+ 0.01,
339
+ e - o / 2,
340
+ 13
1029
341
  );
1030
- a(this, "isDIVEFloor", !0);
1031
- this.name = "Floor", this.layers.mask = S, this.receiveShadow = !0, this.rotateX(-Math.PI / 2);
342
+ this._lineMaterial = new f({
343
+ color: n,
344
+ depthTest: !1,
345
+ depthWrite: !1
346
+ });
347
+ const l = new _(c, this._lineMaterial);
348
+ l.layers.mask = d, l.renderOrder = 1 / 0, l.rotateX(Math.PI / 2), l.translateY(e / 2 - o / 4), this.add(l), this._box = new _(
349
+ new j(o, o, o),
350
+ this._lineMaterial
351
+ ), this._box.layers.mask = d, this._box.renderOrder = 1 / 0, this._box.rotateX(Math.PI / 2), this._box.translateY(e - o / 2), this._box.rotateZ(a.x * Math.PI / 2), this._box.rotateX(a.z * Math.PI / 2), this.add(this._box);
352
+ const g = new m(
353
+ 0.1,
354
+ 0.1,
355
+ e + o / 2,
356
+ 3
357
+ ), E = new f({
358
+ color: 16711935,
359
+ transparent: !0,
360
+ opacity: 0.15,
361
+ depthTest: !1,
362
+ depthWrite: !1
363
+ });
364
+ this._colliderMesh = new _(g, E), this._colliderMesh.visible = !1, this._colliderMesh.layers.mask = d, this._colliderMesh.renderOrder = 1 / 0, this._colliderMesh.rotateX(Math.PI / 2), this._colliderMesh.translateY(e / 2), this.add(this._colliderMesh), this.rotateX(a.y * -Math.PI / 2), this.rotateY(a.x * Math.PI / 2);
1032
365
  }
1033
- setVisibility(t) {
1034
- this.visible = t;
366
+ set debug(t) {
367
+ this._colliderMesh.visible = t;
1035
368
  }
1036
- setColor(t) {
1037
- this.material.color = new D(t);
369
+ get highlight() {
370
+ return this._highlight;
1038
371
  }
1039
- }
1040
- class hi extends j {
1041
- constructor() {
1042
- super();
1043
- a(this, "isDIVERoot", !0);
1044
- a(this, "_floor");
1045
- a(this, "_assetLoader", null);
1046
- this.name = "Root", this._floor = new ai(), this.add(this._floor);
1047
- }
1048
- get floor() {
1049
- return this._floor;
1050
- }
1051
- async _getAssetLoader() {
1052
- return this._assetLoader || (this._assetLoader = new (await w("AssetLoader"))()), this._assetLoader;
1053
- }
1054
- computeSceneBB() {
1055
- const t = new Ze();
1056
- return this.children.forEach((e) => {
1057
- "isDIVEFloor" in e || e.traverse((n) => {
1058
- "isObject3D" in n && t.expandByObject(n);
1059
- });
1060
- }), t;
1061
- }
1062
- getSceneObject(t) {
1063
- let e;
1064
- return this.traverse((n) => {
1065
- e || n.userData.id === t.id && (e = n);
1066
- }), e;
1067
- }
1068
- addSceneObject(t) {
1069
- let e = this.getSceneObject(t);
1070
- if (e)
1071
- return console.warn(
1072
- `DIVERoot.addSceneObject: Scene object with id ${t.id} already exists`
1073
- ), e;
1074
- switch (t.entityType) {
1075
- case "pov":
1076
- break;
1077
- case "light": {
1078
- switch (t.type) {
1079
- case "scene": {
1080
- e = new Je();
1081
- break;
1082
- }
1083
- case "ambient": {
1084
- e = new si();
1085
- break;
1086
- }
1087
- case "point": {
1088
- e = new ni();
1089
- break;
1090
- }
1091
- default:
1092
- throw new Error(
1093
- `DIVERoot.addSceneObject: Unknown light type: ${t.type}`
1094
- );
1095
- }
1096
- e.name = t.name, e.userData.id = t.id, this.add(e), this._updateLight(e, t);
1097
- break;
1098
- }
1099
- case "model": {
1100
- e = new $e(), e.name = t.name, e.userData.id = t.id, e.userData.uri = t.uri, this.add(e), this._updateModel(e, t);
1101
- break;
1102
- }
1103
- case "primitive": {
1104
- e = new oi(), e.name = t.name, e.userData.id = t.id, this.add(e), this._updatePrimitive(e, t);
1105
- break;
1106
- }
1107
- case "group": {
1108
- e = new ri(), e.name = t.name, e.userData.id = t.id, this.add(e), this._updateGroup(e, t);
1109
- break;
1110
- }
1111
- default:
1112
- throw new Error(
1113
- `DIVERoot.addSceneObject: Unknown entity type: ${t.entityType}`
1114
- );
1115
- }
1116
- return e;
372
+ set highlight(t) {
373
+ this._highlight = t, this._lineMaterial.color = this._highlight || this._hovered ? this._colorHover : this._color;
1117
374
  }
1118
- updateSceneObject(t) {
1119
- const e = this.getSceneObject(t);
1120
- if (!e) {
1121
- console.warn(
1122
- `DIVERoot.updateSceneObject: Scene object with id ${t.id} does not exist`
1123
- );
1124
- return;
1125
- }
1126
- switch (t.entityType) {
1127
- case "pov":
1128
- break;
1129
- case "light": {
1130
- this._updateLight(e, t);
1131
- break;
1132
- }
1133
- case "model": {
1134
- this._updateModel(e, t);
1135
- break;
1136
- }
1137
- case "primitive": {
1138
- this._updatePrimitive(e, t);
1139
- break;
1140
- }
1141
- case "group": {
1142
- this._updateGroup(e, t);
1143
- break;
1144
- }
1145
- default:
1146
- throw new Error(
1147
- `DIVERoot.updateSceneObject: Unknown entity type: ${t.entityType}`
1148
- );
1149
- }
375
+ get forwardVector() {
376
+ return new h(0, 0, 1).applyQuaternion(this.quaternion).normalize();
1150
377
  }
1151
- deleteSceneObject(t) {
1152
- const e = this.getSceneObject(t);
1153
- if (!e) {
1154
- console.warn(
1155
- `DIVERoot.deleteSceneObject: Object with id ${t.id} not found`
1156
- );
1157
- return;
1158
- }
1159
- switch (t.entityType) {
1160
- case "pov":
1161
- break;
1162
- case "light": {
1163
- this._deleteLight(e);
1164
- break;
1165
- }
1166
- case "model": {
1167
- this._deleteModel(e);
1168
- break;
1169
- }
1170
- case "primitive": {
1171
- this._deletePrimitive(e);
1172
- break;
1173
- }
1174
- case "group": {
1175
- this._deleteGroup(e);
1176
- break;
1177
- }
1178
- default:
1179
- throw new Error(
1180
- `DIVERoot.deleteSceneObject: Unknown entity type: ${t.entityType}`
1181
- );
1182
- }
378
+ get rightVector() {
379
+ return new h(1, 0, 0).applyQuaternion(this.quaternion).normalize();
1183
380
  }
1184
- _updateLight(t, e) {
1185
- e.name !== void 0 && e.name !== null && (t.name = e.name), e.position !== void 0 && e.position !== null && t.position.set(
1186
- e.position.x,
1187
- e.position.y,
1188
- e.position.z
1189
- ), e.intensity !== void 0 && e.intensity !== null && t.setIntensity(e.intensity), e.enabled !== void 0 && e.enabled !== null && t.setEnabled(e.enabled), e.color !== void 0 && e.color !== null && t.setColor(new D(e.color)), e.visible !== void 0 && e.visible !== null && (t.visible = e.visible), e.parentId !== void 0 && this._setParent({ ...e, parentId: e.parentId });
1190
- }
1191
- _updateModel(t, e) {
1192
- e.uri !== void 0 && t.setFromURL(e.uri), e.name !== void 0 && (t.name = e.name), e.position !== void 0 && t.setPosition(e.position), e.rotation !== void 0 && t.setRotation(e.rotation), e.scale !== void 0 && t.setScale(e.scale), e.visible !== void 0 && t.setVisibility(e.visible), e.material !== void 0 && t.setMaterial(e.material), e.parentId !== void 0 && this._setParent({ ...e, parentId: e.parentId });
1193
- }
1194
- _updatePrimitive(t, e) {
1195
- e.name !== void 0 && (t.name = e.name), e.geometry !== void 0 && t.setGeometry(e.geometry), e.position !== void 0 && t.setPosition(e.position), e.rotation !== void 0 && t.setRotation(e.rotation), e.scale !== void 0 && t.setScale(e.scale), e.visible !== void 0 && t.setVisibility(e.visible), e.material !== void 0 && t.setMaterial(e.material), e.parentId !== void 0 && this._setParent({ ...e, parentId: e.parentId });
1196
- }
1197
- _updateGroup(t, e) {
1198
- e.name !== void 0 && (t.name = e.name), e.position !== void 0 && t.setPosition(e.position), e.rotation !== void 0 && t.setRotation(e.rotation), e.scale !== void 0 && t.setScale(e.scale), e.visible !== void 0 && t.setVisibility(e.visible), e.bbVisible !== void 0 && t.setLinesVisibility(e.bbVisible), e.parentId !== void 0 && this._setParent({ ...e, parentId: e.parentId });
1199
- }
1200
- _deleteLight(t) {
1201
- this._detachTransformControls(t), t.parent.remove(t);
1202
- }
1203
- _deleteModel(t) {
1204
- this._detachTransformControls(t), t.parent.remove(t);
1205
- }
1206
- _deletePrimitive(t) {
1207
- this._detachTransformControls(t), t.parent.remove(t);
1208
- }
1209
- _deleteGroup(t) {
1210
- this._detachTransformControls(t);
1211
- for (let e = t.members.length - 1; e >= 0; e--)
1212
- this.attach(t.members[e]);
1213
- t.parent.remove(t);
1214
- }
1215
- _setParent(t) {
1216
- const e = this.getSceneObject(t);
1217
- if (t.parentId !== null) {
1218
- const n = this.getSceneObject({
1219
- id: t.parentId,
1220
- entityType: t.entityType
1221
- });
1222
- if (!n) return;
1223
- n.attach(e);
1224
- } else
1225
- this.attach(e);
1226
- }
1227
- _detachTransformControls(t) {
1228
- this._findScene(t).children.find((e) => {
1229
- "isTransformControls" in e && e.detach();
1230
- });
381
+ get upVector() {
382
+ return new h(0, 1, 0).applyQuaternion(this.quaternion).normalize();
1231
383
  }
1232
- _findScene(t) {
1233
- return t.parent !== null ? this._findScene(t.parent) : t;
384
+ reset() {
385
+ this._lineMaterial.color = this._color;
1234
386
  }
1235
- }
1236
- const ci = "#888888", li = "#dddddd";
1237
- class di extends j {
1238
- constructor() {
1239
- super(), this.name = "Grid";
1240
- const s = new Ut(
1241
- 100,
1242
- 100,
1243
- ci,
1244
- li
387
+ update(t) {
388
+ this._box.scale.copy(
389
+ new h(1, 1, 1).sub(this.forwardVector).add(
390
+ // to then add ...
391
+ t.clone().multiply(this.forwardVector)
392
+ // that is scaled by the forward vector again to get the forward vector as the only direction
393
+ )
1245
394
  );
1246
- s.material.depthTest = !1, s.layers.mask = Ht, this.add(s);
1247
395
  }
1248
- setVisibility(s) {
1249
- this.visible = s;
1250
- }
1251
- }
1252
- class ui extends Gt {
1253
- constructor() {
1254
- super();
1255
- a(this, "_root");
1256
- a(this, "_grid");
1257
- this.background = new D(16777215), this._root = new hi(), this.add(this._root), this._grid = new di(), this.add(this._grid);
396
+ onPointerEnter() {
397
+ this._hovered = !0, this.parent && this.parent.onHoverAxis(this, !0);
1258
398
  }
1259
- get root() {
1260
- return this._root;
399
+ onPointerLeave() {
400
+ this._hovered = !1, this.parent && this.parent.onHoverAxis(this, !1);
1261
401
  }
1262
- get grid() {
1263
- return this._grid;
402
+ onDragStart() {
403
+ this.parent && this.parent.onAxisDragStart(this);
1264
404
  }
1265
- setBackground(t) {
1266
- this.background = new D(t);
405
+ onDrag(t) {
406
+ this.parent && this.parent.onAxisDrag(this, t);
1267
407
  }
1268
- computeSceneBB() {
1269
- return this.root.computeSceneBB();
408
+ onDragEnd() {
409
+ this.parent && this.parent.onAxisDragEnd(this);
1270
410
  }
1271
411
  }
1272
- const Qe = {
1273
- canvas: void 0,
1274
- antialias: !0,
1275
- alpha: !0,
1276
- powerPreference: "high-performance",
1277
- precision: "highp",
1278
- stencil: !1,
1279
- depth: !0,
1280
- logarithmicDepthBuffer: !1
1281
- };
1282
- class mi {
1283
- constructor(s, t, e) {
1284
- a(this, "_webglrenderer");
1285
- a(this, "_settings");
1286
- this._scene = s, this._camera = t, this._settings = {
1287
- ...Qe,
1288
- ...e ?? {}
1289
- }, this._webglrenderer = new Ue({
1290
- canvas: this._settings.canvas,
1291
- antialias: this._settings.antialias,
1292
- alpha: this._settings.alpha,
1293
- powerPreference: this._settings.powerPreference,
1294
- precision: this._settings.precision,
1295
- stencil: this._settings.stencil,
1296
- depth: this._settings.depth,
1297
- logarithmicDepthBuffer: this._settings.logarithmicDepthBuffer
412
+ class q extends u {
413
+ constructor(t) {
414
+ super();
415
+ i(this, "isHoverable", !0);
416
+ i(this, "children");
417
+ i(this, "_controller");
418
+ i(this, "_startScale");
419
+ this.name = "DIVEScaleGizmo", this.children = [], this._startScale = null, this._controller = t, this.add(
420
+ new b("x", 1, new h(1, 0, 0), x)
421
+ ), this.add(
422
+ new b("y", 1, new h(0, 1, 0), I)
423
+ ), this.add(
424
+ new b("z", 1, new h(0, 0, 1), y)
425
+ );
426
+ }
427
+ set debug(t) {
428
+ this.children.forEach((e) => {
429
+ e.debug = t;
1298
430
  });
1299
431
  }
1300
- get webglrenderer() {
1301
- return this._webglrenderer;
432
+ reset() {
433
+ this.children.forEach((t) => {
434
+ t.reset();
435
+ });
1302
436
  }
1303
- setCanvas(s) {
1304
- this._webglrenderer.dispose(), this._settings.canvas = s, this._webglrenderer = new Ue(this._settings);
437
+ update(t) {
438
+ this.children.forEach((e) => {
439
+ e.update(t);
440
+ });
1305
441
  }
1306
- render() {
1307
- this._webglrenderer.render(this._scene, this._camera);
442
+ handleHighlight(t, e, a) {
443
+ this.children.forEach((n) => {
444
+ a ? n.highlight = n.axis === t && a : n.highlight = n.axis === t && e;
445
+ });
1308
446
  }
1309
- onResize(s, t) {
1310
- this._webglrenderer.setSize(s, t, !1);
447
+ onHoverAxis(t, e) {
448
+ this._startScale || this.parent && this.parent.parent && (this.parent.parent.onHover(
449
+ "translate",
450
+ t.axis,
451
+ e
452
+ ), this.handleHighlight(t.axis, e, !1));
453
+ }
454
+ onAxisDragStart(t) {
455
+ if (!this.parent || !this.parent.parent) return;
456
+ const e = this.parent.parent.object;
457
+ e && (this._startScale = e.scale.clone(), this.handleHighlight(t.axis, !0, !0));
458
+ }
459
+ onAxisDrag(t, e) {
460
+ if (!this._startScale || !this.parent || !this.parent.parent || !("onChange" in this.parent.parent)) return;
461
+ const a = e.dragDelta.clone().projectOnVector(t.forwardVector);
462
+ this.parent.parent.onChange(
463
+ void 0,
464
+ void 0,
465
+ this._startScale.clone().add(a)
466
+ );
1311
467
  }
1312
- dispose() {
1313
- this._webglrenderer.dispose();
468
+ onAxisDragEnd(t) {
469
+ this._startScale = null, this.handleHighlight(t.axis, !1, !1);
1314
470
  }
1315
471
  }
1316
- class pi {
472
+ class Q extends u {
1317
473
  constructor() {
1318
- a(this, "_renderer", null);
1319
- a(this, "_lastTime", 0);
1320
- a(this, "_isRunning", !1);
1321
- a(this, "_tickers", []);
474
+ super();
475
+ i(this, "_meshX");
476
+ i(this, "_meshY");
477
+ i(this, "_meshZ");
478
+ this.name = "DIVEGizmoPlane";
479
+ const t = new f({
480
+ transparent: !0,
481
+ opacity: 0.15,
482
+ depthTest: !1,
483
+ depthWrite: !1,
484
+ side: 2
485
+ }), e = new D(100, 100, 2, 2), a = t.clone();
486
+ a.color.set(16711680), this._meshX = new _(e, a), this._meshX.layers.mask = d, this._meshX.rotateY(Math.PI / 2);
487
+ const n = new D(100, 100, 2, 2), o = t.clone();
488
+ o.color.set(65280), this._meshY = new _(n, o), this._meshY.layers.mask = d, this._meshY.rotateX(-Math.PI / 2);
489
+ const c = new D(100, 100, 2, 2), l = t.clone();
490
+ l.color.set(255), this._meshZ = new _(c, l), this._meshZ.layers.mask = d;
491
+ }
492
+ get XPlane() {
493
+ return this._meshX;
494
+ }
495
+ get YPlane() {
496
+ return this._meshY;
497
+ }
498
+ get ZPlane() {
499
+ return this._meshZ;
500
+ }
501
+ assemble(t, e) {
502
+ if (this.clear(), t === "translate" || t === "scale")
503
+ switch (e) {
504
+ case "x":
505
+ this.add(this._meshY), this.add(this._meshZ);
506
+ break;
507
+ case "y":
508
+ this.add(this._meshX), this.add(this._meshZ);
509
+ break;
510
+ case "z":
511
+ this.add(this._meshX), this.add(this._meshY);
512
+ break;
513
+ }
514
+ else if (t === "rotate")
515
+ switch (e) {
516
+ case "x":
517
+ this.add(this._meshX);
518
+ break;
519
+ case "y":
520
+ this.add(this._meshY);
521
+ break;
522
+ case "z":
523
+ this.add(this._meshZ);
524
+ break;
525
+ }
1322
526
  }
1323
- start() {
1324
- this._isRunning || (this._isRunning = !0, this._lastTime = performance.now(), requestAnimationFrame(this._tick.bind(this)));
527
+ }
528
+ class B extends u {
529
+ constructor(t) {
530
+ super();
531
+ i(this, "_mode");
532
+ i(this, "_gizmoNode");
533
+ i(this, "_translateGizmo");
534
+ i(this, "_rotateGizmo");
535
+ i(this, "_scaleGizmo");
536
+ i(this, "_gizmoPlane");
537
+ // attachment stuff
538
+ i(this, "_object");
539
+ this.name = "DIVEGizmo", t.addEventListener("change", () => {
540
+ const e = t.getDistance() / 2.5;
541
+ this.scale.set(e, e, e);
542
+ }), this._mode = "translate", this._gizmoNode = new u(), this.add(this._gizmoNode), this._translateGizmo = new Z(t), this._rotateGizmo = new F(t), this._scaleGizmo = new q(t), this._gizmoPlane = new Q(), this._gizmoPlane.visible = !1, this._object = null;
1325
543
  }
1326
- stop() {
1327
- this._isRunning = !1;
544
+ get mode() {
545
+ return this._mode;
1328
546
  }
1329
- setRenderer(s) {
1330
- this._renderer = s;
547
+ set mode(t) {
548
+ this._mode = t, this.assemble();
1331
549
  }
1332
- addTicker(s) {
1333
- this._tickers.find((t) => t.uuid === s.uuid) || this._tickers.push(s);
550
+ set debug(t) {
551
+ this._translateGizmo.debug = t, this._rotateGizmo.debug = t, this._scaleGizmo.debug = t;
1334
552
  }
1335
- removeTicker(s) {
1336
- const t = this._tickers.findIndex((e) => e.uuid === s.uuid);
1337
- t !== -1 && this._tickers.splice(t, 1);
553
+ get gizmoNode() {
554
+ return this._gizmoNode;
1338
555
  }
1339
- dispose() {
1340
- this.stop(), this._tickers.forEach((s) => {
1341
- var t;
1342
- return (t = s.dispose) == null ? void 0 : t.call(s);
1343
- }), this._tickers = [], this._isRunning = !1, this._lastTime = 0;
556
+ get gizmoPlane() {
557
+ return this._gizmoPlane;
1344
558
  }
1345
- _tick(s) {
1346
- var e;
1347
- if (!this._isRunning) return;
1348
- const t = (s - this._lastTime) / 1e3;
1349
- this._lastTime = s, this._tickers.forEach((n) => n.tick(t)), (e = this._renderer) == null || e.render(), requestAnimationFrame(this._tick.bind(this));
559
+ get object() {
560
+ return this._object;
1350
561
  }
1351
- }
1352
- class fi {
1353
- constructor(s, t) {
1354
- a(this, "_resizeObserver");
1355
- a(this, "_width", 0);
1356
- a(this, "_height", 0);
1357
- this._resizeObserver = new ResizeObserver((e) => {
1358
- for (const n of e) {
1359
- const { width: o, height: l } = n.contentRect;
1360
- o === this._width && l === this._height || (s.onResize(o, l), t.onResize(o, l), this._width = o, this._height = l);
1361
- }
1362
- }), this._observeCanvas(s.webglrenderer.domElement);
562
+ attach(t) {
563
+ return this._object = t, this.assemble(), this;
1363
564
  }
1364
- setCanvas(s) {
1365
- this._resizeObserver.disconnect(), this._observeCanvas(s);
565
+ detach() {
566
+ return this._object = null, this.assemble(), this;
1366
567
  }
1367
- dispose() {
1368
- this._resizeObserver.disconnect();
568
+ onHover(t, e, a) {
569
+ a && this._gizmoPlane.assemble(t, e);
1369
570
  }
1370
- _observeCanvas(s) {
1371
- if (s.parentElement)
1372
- this._resizeObserver.observe(s.parentElement);
1373
- else {
1374
- const t = setInterval(() => {
1375
- s.parentElement && (this._resizeObserver.observe(s.parentElement), clearInterval(t));
1376
- }, 16);
1377
- }
571
+ onChange(t, e, a) {
572
+ this.object !== null && (t && (this.position.copy(t), this.object.position.copy(t)), e && this.object.rotation.copy(e), a && (this.object.scale.copy(a), this._scaleGizmo.update(a)));
1378
573
  }
1379
- }
1380
- const et = {
1381
- autoStart: !0,
1382
- displayAxes: !1,
1383
- ...$t,
1384
- ...Qe
1385
- };
1386
- class gi {
1387
- constructor(s) {
1388
- a(this, "_renderer");
1389
- a(this, "_scene");
1390
- a(this, "_camera");
1391
- a(this, "_resizeManager");
1392
- a(this, "_clock");
1393
- a(this, "_settings");
1394
- this._settings = {
1395
- ...et,
1396
- ...s ?? {}
1397
- }, this._scene = new ui(), this._camera = new Qt(this._settings), this._renderer = new mi(
1398
- this._scene,
1399
- this._camera,
1400
- this._settings
1401
- ), this._resizeManager = new fi(
1402
- this._renderer,
1403
- this._camera
1404
- ), this._clock = new pi(), this._clock.setRenderer(this._renderer), this._settings.autoStart && this.start();
1405
- }
1406
- get scene() {
1407
- return this._scene;
1408
- }
1409
- get camera() {
1410
- return this._camera;
1411
- }
1412
- get renderer() {
1413
- return this._renderer;
1414
- }
1415
- setCanvas(s) {
1416
- this._renderer.setCanvas(s), this._resizeManager.setCanvas(s);
1417
- }
1418
- get clock() {
1419
- return this._clock;
1420
- }
1421
- start() {
1422
- this._clock.start();
1423
- }
1424
- stop() {
1425
- this._clock.stop();
1426
- }
1427
- dispose() {
1428
- this._clock.dispose(), this._resizeManager.dispose(), this._renderer.dispose();
574
+ assemble() {
575
+ this._gizmoNode.clear(), this._gizmoPlane.clear(), this._translateGizmo.reset(), this._rotateGizmo.reset(), this._scaleGizmo.reset(), this.object !== null && (this._mode === "translate" && this._gizmoNode.add(this._translateGizmo), this._mode === "rotate" && this._gizmoNode.add(this._rotateGizmo), this._mode === "scale" && this._gizmoNode.add(this._scaleGizmo), this.add(this._gizmoPlane));
1429
576
  }
1430
577
  }
1431
- function x(h, s) {
1432
- const t = (h + "e").split("e");
1433
- return +(t[0] + "e" + (+t[1] + (s || 0)));
1434
- }
1435
- function _i(h, s = 0) {
1436
- const t = x(h, +s);
1437
- return x(Math.ceil(t), -s);
1438
- }
1439
- function yi(h, s = 0) {
1440
- const t = x(h, +s);
1441
- return x(Math.floor(t), -s);
1442
- }
1443
- function tt(h, s = 0) {
1444
- if (h < 0) return -tt(-h, s);
1445
- const t = x(h, +s);
1446
- return x(Math.round(t), -s);
1447
- }
1448
- function bi(h, s, t) {
1449
- return Math.atan2(
1450
- h.clone().cross(s).dot(t),
1451
- s.clone().dot(h)
1452
- );
1453
- }
1454
- function wi(h, s = 0) {
1455
- const t = x(h, +s);
1456
- return x(Math.round(t), -s).toFixed(s);
1457
- }
1458
- function Ei(h, s = 0) {
1459
- const t = x(h, +s);
1460
- return x(Math.trunc(t), -s);
1461
- }
1462
- function Di(h) {
1463
- return (I.radToDeg(h) + 360) % 360;
1464
- }
1465
- function xi(h) {
1466
- return I.degToRad(h);
1467
- }
1468
- const ki = {
1469
- ceilExp: _i,
1470
- floorExp: yi,
1471
- roundExp: tt,
1472
- toFixedExp: wi,
1473
- truncateExp: Ei,
1474
- signedAngleTo: bi,
1475
- radToDeg: Di,
1476
- degToRad: xi
1477
- };
1478
- window.DIVE = {
1479
- instances: [],
1480
- get instance() {
1481
- return window.DIVE.instances[0];
578
+ class J {
579
+ constructor() {
580
+ i(this, "isMovable", !0);
1482
581
  }
1483
- };
1484
- const Ti = {
1485
- ...et,
1486
- ...se
1487
- };
1488
- class it {
1489
- constructor(s) {
1490
- // descriptive members
1491
- a(this, "_instanceId", I.generateUUID());
1492
- a(this, "_settings");
1493
- a(this, "_engine");
1494
- a(this, "orbitController");
1495
- a(this, "axisCamera");
1496
- this._settings = {
1497
- ...Ti,
1498
- ...s ?? {}
1499
- }, this._engine = new gi(s), this.orbitController = new ne(
1500
- this._engine.camera,
1501
- this._engine.renderer.webglrenderer.domElement,
1502
- this._settings
1503
- ), this._engine.clock.addTicker(this.orbitController), this._settings.displayAxes ? (this.axisCamera = new ii(
1504
- this._engine.renderer,
1505
- this._engine.scene,
1506
- this._engine.camera
1507
- ), this._engine.clock.addTicker(this.axisCamera)) : this.axisCamera = null, import("./chunks/package-DeBkqggW.mjs").then((t) => {
1508
- console.log(
1509
- `DIVE ${t.default.version} initialized successfully!`
1510
- ), console.log(`
1511
- @@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@
1512
- @@@@+-:::::::---------------------==------------------------------=#@@@@
1513
- @@%=::::.......::---------------------------------------------------------+@@
1514
- @@+:::...........::-----------------------------------------------------------#@@
1515
- @@=:::.........::::::-------------------------------------------------------------%@
1516
- @%:::.......:::::::-----------------------------------------------------------------#@
1517
- @*:::.....:::::-----------------------------------------------------------------------*@
1518
- @%::::::.::::---------------------------------------------------------------------------@@
1519
- @@-:::::::::-----------------------------------------------------------------------------=@
1520
- @%::::::::--------------------------------------------------------------------------------%@
1521
- @+::::::::--------------------------------=@@@@@%-----------------------------------------%@
1522
- @=:::::::--------------------------------*@@ @@+---------------------------------------#@
1523
- @+:::::::-------------------------------*@ @*--------------------------------------%@
1524
- @#::::::::-----------------------------=@@ @@=-------------------------------------%@
1525
- @@-::::::::----------------------------@@ @@------------------------------------=@
1526
- @%:::::::::--------------------------*@ @*-----------------------------------@@
1527
- @*:::::::::-------------------------@@ @@----------------------------------%@
1528
- @#::::::::::----------------------%@ @%--------------------------------%@
1529
- @#:::::::::::-------------------=@@ @@=------------------------------%@
1530
- @@-::::::::::::----------------%@ @%----------------------------=@@
1531
- @@#::::::::::::::------------*@ @*--------------------------#@@
1532
- @@+::::::::::::::::--------@@ @@------------------------+@@
1533
- @@*:::::::::::::::::----@@ @@---------------------+@@
1534
- @@@-:::::::::::::::--#@ @#-----------------=%@@
1535
- @@%-::::::::::::-%@ @%-------------=%@@
1536
- @@@@+:::::::#@@ @@*-------*@@@@
1537
- @@@@@@@ @@@@@@
1538
-
1539
- `);
1540
- }), window.DIVE.instances.push(this);
1541
- }
1542
- // static members
1543
- static async QuickView(s, t) {
1544
- const e = new it(t);
1545
- e.engine.scene.background = new D(16777215), e.engine.scene.grid.setVisibility(!1), e.engine.scene.root.floor.setVisibility(!0), e.engine.scene.root.floor.setColor(16777215), e.engine.camera.position.set(0, 2, 2), e.orbitController.target.set(0, 0.5, 0);
1546
- const n = new Je();
1547
- n.name = "SceneLight", n.userData.id = I.generateUUID(), n.setEnabled(!0), n.visible = !0, n.setIntensity((t == null ? void 0 : t.lightIntensity) ?? 1), n.setColor(new D(16777215)), e.engine.scene.root.add(n);
1548
- const o = new $e();
1549
- o.name = "object", o.userData.id = I.generateUUID(), o.userData.uri = s, o.visible = !0, e.engine.scene.root.add(o), await o.setFromURL(s);
1550
- const l = e.engine.scene.computeSceneBB(), c = e.orbitController.computeEncompassingView(l);
1551
- return e.engine.camera.position.copy(c.position), e.orbitController.target.copy(c.target), e;
1552
- }
1553
- get engine() {
1554
- return this._engine;
1555
- }
1556
- get canvas() {
1557
- return this._engine.renderer.webglrenderer.domElement;
1558
- }
1559
- setCanvas(s) {
1560
- this._engine.setCanvas(s), this._engine.clock.removeTicker(this.orbitController), this.orbitController.dispose(), this.orbitController = new ne(
1561
- this._engine.camera,
1562
- s,
1563
- this._settings
1564
- ), this._engine.clock.addTicker(this.orbitController);
1565
- }
1566
- async dispose() {
1567
- return new Promise((s) => {
1568
- this._engine.clock.removeTicker(this.orbitController), this.orbitController.dispose(), this.axisCamera && (this._engine.clock.removeTicker(this.axisCamera), this.axisCamera.dispose()), window.DIVE.instances = window.DIVE.instances.filter(
1569
- (t) => t._instanceId !== this._instanceId
1570
- ), s();
1571
- });
582
+ }
583
+ class $ {
584
+ constructor() {
585
+ i(this, "isSelectable", !0);
1572
586
  }
1573
587
  }
1574
- const We = (h, s) => {
1575
- if (Object.keys(h).length === 0 && Object.keys(s).length === 0)
588
+ const V = (r, s) => {
589
+ if (Object.keys(r).length === 0 && Object.keys(s).length === 0)
1576
590
  return {};
1577
- if (typeof h != "object" || typeof s != "object")
591
+ if (typeof r != "object" || typeof s != "object")
1578
592
  return s;
1579
593
  let t = {};
1580
594
  return Object.keys(s).forEach((e) => {
1581
- if (!Object.keys(h).includes(e)) {
595
+ if (!Object.keys(r).includes(e)) {
1582
596
  t = { ...t, [e]: s[e] };
1583
597
  return;
1584
598
  }
1585
599
  if (Array.isArray(s[e])) {
1586
- if (!Array.isArray(h[e])) {
600
+ if (!Array.isArray(r[e])) {
1587
601
  t = { ...t, [e]: s[e] };
1588
602
  return;
1589
603
  }
1590
- const n = h[e], o = s[e];
1591
- if (n.length === 0 && o.length === 0) {
604
+ const a = r[e], n = s[e];
605
+ if (a.length === 0 && n.length === 0) {
1592
606
  t = { ...t };
1593
607
  return;
1594
608
  }
1595
- if (n.length !== o.length) {
609
+ if (a.length !== n.length) {
1596
610
  t = { ...t, [e]: s[e] };
1597
611
  return;
1598
612
  }
1599
- const l = [];
1600
- if (o.forEach((c, p) => {
1601
- const f = We(
1602
- n[p],
1603
- o[p]
613
+ const o = [];
614
+ if (n.forEach((c, l) => {
615
+ const g = V(
616
+ a[l],
617
+ n[l]
1604
618
  );
1605
- Object.keys(f).length && l.push(o[p]);
1606
- }), Object.keys(l).length) {
1607
- t = { ...t, [e]: l };
619
+ Object.keys(g).length && o.push(n[l]);
620
+ }), Object.keys(o).length) {
621
+ t = { ...t, [e]: o };
1608
622
  return;
1609
623
  }
1610
624
  return;
1611
625
  }
1612
626
  if (typeof s[e] == "object") {
1613
- if (typeof h[e] != "object") {
627
+ if (typeof r[e] != "object") {
1614
628
  t = { ...t, [e]: s[e] };
1615
629
  return;
1616
630
  }
1617
- const n = We(
1618
- h[e],
631
+ const a = V(
632
+ r[e],
1619
633
  s[e]
1620
634
  );
1621
- if (Object.keys(n).length) {
1622
- t = { ...t, [e]: n };
635
+ if (Object.keys(a).length) {
636
+ t = { ...t, [e]: a };
1623
637
  return;
1624
638
  }
1625
639
  }
1626
- h[e] !== s[e] && (t = { ...t, [e]: s[e] });
640
+ r[e] !== s[e] && (t = { ...t, [e]: s[e] });
1627
641
  }), t;
1628
642
  };
1629
- function Ri(h, s) {
643
+ function tt(r, s) {
1630
644
  return s.forEach((t) => {
1631
- Object.getOwnPropertyNames(t.prototype).forEach((n) => {
1632
- if (n === "constructor")
645
+ Object.getOwnPropertyNames(t.prototype).forEach((a) => {
646
+ if (a === "constructor")
1633
647
  return;
1634
- const o = Object.getOwnPropertyDescriptor(
648
+ const n = Object.getOwnPropertyDescriptor(
1635
649
  t.prototype,
1636
- n
650
+ a
1637
651
  );
1638
- Object.defineProperty(h.prototype, n, o);
652
+ Object.defineProperty(r.prototype, a, n);
1639
653
  });
1640
654
  const e = new t();
1641
- Object.getOwnPropertyNames(e).forEach((n) => {
1642
- const o = Object.getOwnPropertyDescriptor(
655
+ Object.getOwnPropertyNames(e).forEach((a) => {
656
+ const n = Object.getOwnPropertyDescriptor(
1643
657
  e,
1644
- n
658
+ a
1645
659
  );
1646
- Object.defineProperty(h.prototype, n, o);
660
+ Object.defineProperty(r.prototype, a, n);
1647
661
  });
1648
- }), h;
662
+ }), r;
663
+ }
664
+ function et(r) {
665
+ return r.entityType === "group";
666
+ }
667
+ function rt(r) {
668
+ return r.entityType === "light";
669
+ }
670
+ function it(r) {
671
+ return r.entityType === "primitive";
1649
672
  }
1650
673
  export {
1651
- Ki as ARCompatibilityError,
1652
- it as DIVE,
1653
- Ti as DIVEDefaultSettings,
1654
- ki as DIVEMath,
1655
- Zi as ESystem,
1656
- Xi as EWebXRUnsupportedReason,
1657
- Yi as FILE_TYPES,
1658
- Ji as FileTypeError,
1659
- Ui as NetworkError,
1660
- $i as ParseError,
1661
- Gi as SUPPORTED_FILE_TYPES,
1662
- Ri as applyMixins,
1663
- zi as findInterface,
1664
- ge as findSceneRecursive,
1665
- ji as getFileTypeFromUri,
1666
- w as getModule,
1667
- We as getObjectDelta,
1668
- Ni as implementsInterface,
1669
- Hi as isFileTypeSupported
674
+ y as AxesColorBlue,
675
+ nt as AxesColorBlueLetter,
676
+ I as AxesColorGreen,
677
+ ot as AxesColorGreenLetter,
678
+ x as AxesColorRed,
679
+ ht as AxesColorRedLetter,
680
+ jt as COORDINATE_LAYER_MASK,
681
+ Ot as DEFAULT_LAYER_MASK,
682
+ lt as DIVE,
683
+ ct as DIVEAmbientLight,
684
+ dt as DIVEClock,
685
+ _t as DIVEDefaultSettings,
686
+ pt as DIVEEngine,
687
+ ut as DIVEFloor,
688
+ B as DIVEGizmo,
689
+ gt as DIVEGrid,
690
+ ft as DIVEGroup,
691
+ N as DIVEMath,
692
+ mt as DIVEModel,
693
+ J as DIVEMovable,
694
+ Et as DIVENode,
695
+ Rt as DIVEPerspectiveCamera,
696
+ Tt as DIVEPerspectiveCameraDefaultSettings,
697
+ Dt as DIVEPointLight,
698
+ Mt as DIVEPrimitive,
699
+ wt as DIVERenderPipeline,
700
+ bt as DIVERenderPipelineDefaultSettings,
701
+ xt as DIVEResizeManager,
702
+ It as DIVERoot,
703
+ yt as DIVEScene,
704
+ Pt as DIVESceneLight,
705
+ $ as DIVESelectable,
706
+ Ht as EngineDefaultSettings,
707
+ Vt as FILE_TYPES,
708
+ Wt as FileTypeError,
709
+ zt as GRID_CENTER_LINE_COLOR,
710
+ vt as GRID_SIDE_LINE_COLOR,
711
+ Yt as HELPER_LAYER_MASK,
712
+ Xt as NetworkError,
713
+ Lt as PRODUCT_LAYER_MASK,
714
+ kt as ParseError,
715
+ Gt as SUPPORTED_FILE_TYPES,
716
+ d as UI_LAYER_MASK,
717
+ tt as applyMixins,
718
+ qt as findInterface,
719
+ St as findSceneRecursive,
720
+ Nt as getFileTypeFromUri,
721
+ V as getObjectDelta,
722
+ Qt as implementsInterface,
723
+ Ft as isFileTypeSupported,
724
+ et as isGroupSchema,
725
+ rt as isLightSchema,
726
+ Bt as isModelSchema,
727
+ Jt as isPovSchema,
728
+ it as isPrimitiveSchema
1670
729
  };