@shopware-ag/dive 2.0.1-beta.6 → 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 (267) hide show
  1. package/build/chunks/{AssetExporter-ClYQ4gnb.mjs → AssetExporter-QnOue3VT.mjs} +19 -19
  2. package/build/chunks/{AssetExporter-CAqADFbL.cjs → AssetExporter-TzKB2FHh.cjs} +4 -4
  3. package/build/chunks/AssetLoader-DCBiLwef.cjs +4 -0
  4. package/build/chunks/{AssetLoader-BewzFwHi.mjs → AssetLoader-Dqrg0Re8.mjs} +38 -35
  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-DLXheZay.mjs → SelectTool-DVFL7BtX.mjs} +10 -10
  17. package/build/chunks/network-error-CHvryg-4.mjs +18 -0
  18. package/build/chunks/network-error-D_pq8VU6.cjs +1 -0
  19. package/build/chunks/package-CeZyVg2G.mjs +39 -0
  20. package/build/chunks/package-D_hIrGNz.cjs +1 -0
  21. package/build/dive.cjs +1 -30
  22. package/build/dive.mjs +617 -1089
  23. package/build/plugins/animation/index.cjs +1 -0
  24. package/build/plugins/animation/index.d.ts +2 -0
  25. package/build/plugins/animation/index.mjs +126 -0
  26. package/build/plugins/ar/index.cjs +1 -0
  27. package/build/plugins/ar/index.d.ts +2 -0
  28. package/build/{chunks/ARSystem-D27w7Pck.mjs → plugins/ar/index.mjs} +38 -44
  29. package/build/plugins/assetconverter/index.d.ts +2 -0
  30. package/build/plugins/assetexporter/index.cjs +1 -0
  31. package/build/plugins/assetexporter/index.d.ts +2 -0
  32. package/build/plugins/assetexporter/index.mjs +4 -0
  33. package/build/plugins/assetloader/index.cjs +1 -0
  34. package/build/plugins/assetloader/index.d.ts +2 -0
  35. package/build/plugins/assetloader/index.mjs +6 -0
  36. package/build/plugins/axiscamera/index.cjs +1 -0
  37. package/build/plugins/axiscamera/index.d.ts +2 -0
  38. package/build/plugins/axiscamera/index.mjs +4 -0
  39. package/build/plugins/mediacreator/index.cjs +1 -0
  40. package/build/plugins/mediacreator/index.d.ts +2 -0
  41. package/build/{chunks/MediaCreator-psLAAyJA.mjs → plugins/mediacreator/index.mjs} +1 -1
  42. package/build/{modules/controller → plugins/orbitcontroller}/index.cjs +1 -1
  43. package/build/plugins/orbitcontroller/index.d.ts +2 -0
  44. package/build/plugins/orbitcontroller/index.mjs +5 -0
  45. package/build/plugins/state/index.cjs +27 -0
  46. package/build/plugins/state/index.d.ts +2 -0
  47. package/build/plugins/state/index.mjs +4265 -0
  48. package/build/plugins/systeminfo/index.cjs +1 -0
  49. package/build/plugins/systeminfo/index.d.ts +2 -0
  50. package/build/{modules → plugins}/systeminfo/index.mjs +24 -23
  51. package/build/plugins/toolbox/index.cjs +1 -0
  52. package/build/plugins/toolbox/index.d.ts +2 -0
  53. package/build/{chunks/Toolbox-DKuyL8n5.mjs → plugins/toolbox/index.mjs} +8 -2
  54. package/build/src/components/gizmo/Gizmo.d.ts +1 -1
  55. package/build/src/components/gizmo/handles/AxisHandle.d.ts +1 -1
  56. package/build/src/components/gizmo/handles/RadialHandle.d.ts +1 -1
  57. package/build/src/components/gizmo/handles/ScaleHandle.d.ts +1 -1
  58. package/build/src/components/gizmo/rotate/RotateGizmo.d.ts +2 -2
  59. package/build/src/components/gizmo/scale/ScaleGizmo.d.ts +2 -2
  60. package/build/src/components/gizmo/translate/TranslateGizmo.d.ts +2 -2
  61. package/build/src/components/model/Model.d.ts +2 -2
  62. package/build/src/components/primitive/Primitive.d.ts +3 -3
  63. package/build/src/components/root/Root.d.ts +5 -7
  64. package/build/src/core/Dive.d.ts +1 -1
  65. package/build/src/engine/clock/Clock.d.ts +1 -0
  66. package/build/src/index.d.ts +2 -1
  67. package/build/src/interfaces/Draggable.d.ts +1 -1
  68. package/build/src/plugins/animation/index.d.ts +2 -0
  69. package/build/src/{modules/animation → plugins/animation/src}/animator/Animator.d.ts +2 -3
  70. package/build/src/plugins/animation/src/index.d.ts +3 -0
  71. package/build/src/plugins/animation/src/system/AnimationSystem.d.ts +23 -0
  72. package/build/src/plugins/ar/index.d.ts +4 -0
  73. package/build/src/{modules/ar → plugins/ar/src}/ARSystem.d.ts +0 -27
  74. package/build/src/{modules/ar → plugins/ar/src}/webxr/WebXR.d.ts +2 -2
  75. package/build/src/{modules/ar → plugins/ar/src}/webxr/controller/WebXRController.d.ts +2 -2
  76. package/build/src/{modules/ar → plugins/ar/src}/webxr/origin/WebXROrigin.d.ts +1 -1
  77. package/build/src/{modules/ar → plugins/ar/src}/webxr/raycaster/WebXRRaycaster.d.ts +3 -3
  78. package/build/src/{modules/ar → plugins/ar/src}/webxr/raycaster/ar/WebXRRaycasterAR.d.ts +1 -1
  79. package/build/src/{modules/ar → plugins/ar/src}/webxr/raycaster/three/WebXRRaycasterTHREE.d.ts +2 -2
  80. package/build/src/{modules/ar → plugins/ar/src}/webxr/touchscreencontrols/WebXRTouchscreenControls.d.ts +1 -1
  81. package/build/src/plugins/assetconverter/index.d.ts +1 -0
  82. package/build/src/plugins/assetconverter/src/AssetConverter.d.ts +13 -0
  83. package/build/src/plugins/assetexporter/index.d.ts +1 -0
  84. package/build/src/{modules/assetexporter → plugins/assetexporter/src}/AssetExporter.d.ts +1 -18
  85. package/build/src/plugins/assetloader/index.d.ts +3 -0
  86. package/build/src/plugins/assetloader/src/loader/AssetLoader.d.ts +8 -0
  87. package/build/src/plugins/axiscamera/index.d.ts +1 -0
  88. package/build/src/{modules/axiscamera → plugins/axiscamera/src}/AxisCamera.d.ts +1 -4
  89. package/build/src/plugins/mediacreator/index.d.ts +1 -0
  90. package/build/src/plugins/mediacreator/src/MediaCreator.d.ts +15 -0
  91. package/build/src/plugins/orbitcontroller/index.d.ts +1 -0
  92. package/build/src/{modules/controller/orbit → plugins/orbitcontroller/src}/OrbitController.d.ts +3 -3
  93. package/build/src/plugins/state/index.d.ts +4 -0
  94. package/build/src/{modules/state → plugins/state/src}/State.d.ts +4 -27
  95. package/build/src/{modules/state → plugins/state/src}/actions/action.d.ts +1 -1
  96. package/build/src/{modules/state → plugins/state/src}/actions/ar/launchar.d.ts +2 -2
  97. package/build/src/{modules/state → plugins/state/src}/actions/camera/computeencompassingview.d.ts +1 -1
  98. package/build/src/{modules/state → plugins/state/src}/actions/camera/getcameratransform.d.ts +1 -1
  99. package/build/src/{modules/state → plugins/state/src}/actions/camera/lockcamera.d.ts +1 -1
  100. package/build/src/{modules/state → plugins/state/src}/actions/camera/movecamera.d.ts +3 -3
  101. package/build/src/{modules/state → plugins/state/src}/actions/camera/setcameralayer.d.ts +1 -1
  102. package/build/src/{modules/state → plugins/state/src}/actions/camera/setcameratransform.d.ts +1 -1
  103. package/build/src/{modules/state → plugins/state/src}/actions/camera/zoomcamera.d.ts +1 -1
  104. package/build/src/{modules/state → plugins/state/src}/actions/media/generatemedia.d.ts +1 -1
  105. package/build/src/plugins/state/src/actions/object/addobject.d.ts +9 -0
  106. package/build/src/plugins/state/src/actions/object/deleteobject.d.ts +13 -0
  107. package/build/src/plugins/state/src/actions/object/deselectobject.d.ts +13 -0
  108. package/build/src/{modules/state → plugins/state/src}/actions/object/dropit.d.ts +3 -3
  109. package/build/src/{modules/state → plugins/state/src}/actions/object/getallobjects.d.ts +3 -2
  110. package/build/src/plugins/state/src/actions/object/getobjects.d.ts +13 -0
  111. package/build/src/{modules/state → plugins/state/src}/actions/object/modelloaded.d.ts +1 -1
  112. package/build/src/{modules/state → plugins/state/src}/actions/object/placeonfloor.d.ts +3 -3
  113. package/build/src/plugins/state/src/actions/object/selectobject.d.ts +13 -0
  114. package/build/src/plugins/state/src/actions/object/setparent.d.ts +23 -0
  115. package/build/src/plugins/state/src/actions/object/updateobject.d.ts +13 -0
  116. package/build/src/{modules/state → plugins/state/src}/actions/renderer/startrender.d.ts +1 -1
  117. package/build/src/{modules/state → plugins/state/src}/actions/scene/exportscene.d.ts +4 -4
  118. package/build/src/plugins/state/src/actions/scene/getallscenedata.d.ts +9 -0
  119. package/build/src/{modules/state → plugins/state/src}/actions/scene/setbackground.d.ts +1 -1
  120. package/build/src/{modules/state → plugins/state/src}/actions/scene/updatescene.d.ts +1 -1
  121. package/build/src/{modules/state → plugins/state/src}/actions/toolbox/setgizmomode.d.ts +1 -1
  122. package/build/src/{modules/state → plugins/state/src}/actions/toolbox/setgizmoscalelinked.d.ts +1 -1
  123. package/build/src/{modules/state → plugins/state/src}/actions/toolbox/setgizmovisible.d.ts +1 -1
  124. package/build/src/{modules/state → plugins/state/src}/actions/toolbox/usetool.d.ts +2 -2
  125. package/build/src/{modules → plugins}/state/types/ActionTypes.d.ts +8 -9
  126. package/build/src/{types/SceneType.d.ts → plugins/state/types/StateExportFileType.d.ts} +1 -1
  127. package/build/src/plugins/state/types/StateSceneData.d.ts +19 -0
  128. package/build/src/plugins/state/types/index.d.ts +1 -0
  129. package/build/src/plugins/systeminfo/index.d.ts +2 -0
  130. package/build/src/{modules/systeminfo → plugins/systeminfo/src}/SystemInfo.d.ts +1 -32
  131. package/build/src/plugins/toolbox/index.d.ts +4 -0
  132. package/build/src/{modules/toolbox → plugins/toolbox/src}/BaseTool.d.ts +2 -4
  133. package/build/src/{modules/toolbox → plugins/toolbox/src}/Toolbox.d.ts +2 -11
  134. package/build/src/{modules/toolbox → plugins/toolbox/src}/select/SelectTool.d.ts +2 -3
  135. package/build/src/{modules/toolbox → plugins/toolbox/src}/transform/TransformTool.d.ts +2 -3
  136. package/build/src/types/components/DIVELight.d.ts +4 -0
  137. package/build/src/types/components/DIVESceneObject.d.ts +6 -0
  138. package/build/src/types/components/index.d.ts +2 -0
  139. package/build/src/types/index.d.ts +2 -5
  140. package/build/src/types/schema/BaseEntitySchema.d.ts +8 -0
  141. package/build/src/types/schema/EntitySchema.d.ts +11 -0
  142. package/build/src/types/schema/EntityTypeSchema.d.ts +1 -0
  143. package/build/src/types/schema/GeometrySchema.d.ts +7 -0
  144. package/build/src/types/schema/GeometryTypeSchema.d.ts +1 -0
  145. package/build/src/types/schema/GroupSchema.d.ts +11 -0
  146. package/build/src/types/schema/LightSchema.d.ts +28 -0
  147. package/build/src/{modules/state/types/COMMaterial.d.ts → types/schema/MaterialSchema.d.ts} +1 -1
  148. package/build/src/types/schema/ModelSchema.d.ts +14 -0
  149. package/build/src/types/schema/PovSchema.d.ts +10 -0
  150. package/build/src/types/schema/PrimitiveSchema.d.ts +14 -0
  151. package/build/src/types/schema/index.d.ts +11 -0
  152. package/package.json +41 -41
  153. package/build/chunks/ARSystem-_0cLAxyG.cjs +0 -1
  154. package/build/chunks/AnimationSystem-Bf-xhqRe.mjs +0 -101
  155. package/build/chunks/AnimationSystem-DFUYMNpj.cjs +0 -1
  156. package/build/chunks/AssetLoader-Bq-Ekxil.cjs +0 -4
  157. package/build/chunks/AxisCamera-CUb3g8WX.cjs +0 -1
  158. package/build/chunks/AxisCamera-lXJLIPLK.mjs +0 -39
  159. package/build/chunks/AxisHelperColors-BrGqktN5.cjs +0 -1
  160. package/build/chunks/AxisHelperColors-JLBHYQDi.mjs +0 -9
  161. package/build/chunks/FileTypes-DuVGjbcR.mjs +0 -36
  162. package/build/chunks/FileTypes-DzVpDu_p.cjs +0 -1
  163. package/build/chunks/MediaCreator-CEWeS42n.cjs +0 -1
  164. package/build/chunks/ModuleRegistry-CBfx1EVd.mjs +0 -13
  165. package/build/chunks/ModuleRegistry-CDIxOzgZ.cjs +0 -1
  166. package/build/chunks/OrbitController-B8VkQV1e.cjs +0 -1
  167. package/build/chunks/OrbitController-CXu1ko6E.mjs +0 -462
  168. package/build/chunks/PerspectiveCamera-BByyG5R4.cjs +0 -1
  169. package/build/chunks/PerspectiveCamera-PMJPzAn3.mjs +0 -34
  170. package/build/chunks/SelectTool-9eiKZXT4.cjs +0 -1
  171. package/build/chunks/State-BNgqNPrs.mjs +0 -4296
  172. package/build/chunks/State-Mvu0hG-n.cjs +0 -27
  173. package/build/chunks/Toolbox-qFN47t2F.cjs +0 -1
  174. package/build/chunks/VisibilityLayerMask-BI7jPKdx.cjs +0 -1
  175. package/build/chunks/VisibilityLayerMask-CXgt1fJc.mjs +0 -8
  176. package/build/chunks/index-C_uFFwT2.mjs +0 -5
  177. package/build/chunks/index-DAwIH9xh.cjs +0 -1
  178. package/build/chunks/package-CHgGmFCa.cjs +0 -1
  179. package/build/chunks/package-CIkS9WF6.mjs +0 -39
  180. package/build/modules/animation/index.cjs +0 -1
  181. package/build/modules/animation/index.d.ts +0 -2
  182. package/build/modules/animation/index.mjs +0 -5
  183. package/build/modules/ar/index.cjs +0 -1
  184. package/build/modules/ar/index.d.ts +0 -2
  185. package/build/modules/ar/index.mjs +0 -11
  186. package/build/modules/assetconverter/index.cjs +0 -1
  187. package/build/modules/assetconverter/index.d.ts +0 -2
  188. package/build/modules/assetconverter/index.mjs +0 -4
  189. package/build/modules/assetexporter/index.cjs +0 -1
  190. package/build/modules/assetexporter/index.d.ts +0 -2
  191. package/build/modules/assetexporter/index.mjs +0 -4
  192. package/build/modules/assetloader/index.cjs +0 -1
  193. package/build/modules/assetloader/index.d.ts +0 -2
  194. package/build/modules/assetloader/index.mjs +0 -4
  195. package/build/modules/axiscamera/index.cjs +0 -1
  196. package/build/modules/axiscamera/index.d.ts +0 -2
  197. package/build/modules/axiscamera/index.mjs +0 -4
  198. package/build/modules/controller/index.d.ts +0 -2
  199. package/build/modules/controller/index.mjs +0 -5
  200. package/build/modules/mediacreator/index.cjs +0 -1
  201. package/build/modules/mediacreator/index.d.ts +0 -2
  202. package/build/modules/mediacreator/index.mjs +0 -4
  203. package/build/modules/state/index.cjs +0 -1
  204. package/build/modules/state/index.d.ts +0 -2
  205. package/build/modules/state/index.mjs +0 -39
  206. package/build/modules/systeminfo/index.cjs +0 -1
  207. package/build/modules/systeminfo/index.d.ts +0 -2
  208. package/build/modules/toolbox/index.cjs +0 -1
  209. package/build/modules/toolbox/index.d.ts +0 -2
  210. package/build/modules/toolbox/index.mjs +0 -10
  211. package/build/src/modules/ModuleRegistry.d.ts +0 -19
  212. package/build/src/modules/animation/AnimationSystem.d.ts +0 -36
  213. package/build/src/modules/animation/index.d.ts +0 -2
  214. package/build/src/modules/ar/index.d.ts +0 -4
  215. package/build/src/modules/assetconverter/AssetConverter.d.ts +0 -30
  216. package/build/src/modules/assetconverter/index.d.ts +0 -1
  217. package/build/src/modules/assetexporter/index.d.ts +0 -1
  218. package/build/src/modules/assetloader/AssetLoader.d.ts +0 -29
  219. package/build/src/modules/assetloader/index.d.ts +0 -1
  220. package/build/src/modules/axiscamera/index.d.ts +0 -1
  221. package/build/src/modules/controller/index.d.ts +0 -1
  222. package/build/src/modules/mediacreator/MediaCreator.d.ts +0 -44
  223. package/build/src/modules/mediacreator/index.d.ts +0 -1
  224. package/build/src/modules/state/actions/object/addobject.d.ts +0 -8
  225. package/build/src/modules/state/actions/object/deleteobject.d.ts +0 -12
  226. package/build/src/modules/state/actions/object/deselectobject.d.ts +0 -12
  227. package/build/src/modules/state/actions/object/getobjects.d.ts +0 -12
  228. package/build/src/modules/state/actions/object/selectobject.d.ts +0 -12
  229. package/build/src/modules/state/actions/object/setparent.d.ts +0 -22
  230. package/build/src/modules/state/actions/object/updateobject.d.ts +0 -12
  231. package/build/src/modules/state/actions/scene/getallscenedata.d.ts +0 -9
  232. package/build/src/modules/state/index.d.ts +0 -4
  233. package/build/src/modules/state/types/COMBaseEntity.d.ts +0 -8
  234. package/build/src/modules/state/types/COMEntity.d.ts +0 -11
  235. package/build/src/modules/state/types/COMEntityType.d.ts +0 -1
  236. package/build/src/modules/state/types/COMGeometry.d.ts +0 -7
  237. package/build/src/modules/state/types/COMGeometryType.d.ts +0 -1
  238. package/build/src/modules/state/types/COMGroup.d.ts +0 -11
  239. package/build/src/modules/state/types/COMLight.d.ts +0 -28
  240. package/build/src/modules/state/types/COMModel.d.ts +0 -14
  241. package/build/src/modules/state/types/COMPov.d.ts +0 -10
  242. package/build/src/modules/state/types/COMPrimitive.d.ts +0 -14
  243. package/build/src/modules/state/types/index.d.ts +0 -11
  244. package/build/src/modules/systeminfo/index.d.ts +0 -1
  245. package/build/src/modules/toolbox/index.d.ts +0 -4
  246. package/build/src/types/SceneData.d.ts +0 -19
  247. package/build/src/types/SceneObjects.d.ts +0 -9
  248. package/build/src/types/UUID.d.ts +0 -1
  249. /package/build/{chunks/AssetConverter-BTAb23e8.cjs → plugins/assetconverter/index.cjs} +0 -0
  250. /package/build/{chunks/AssetConverter-D-qOTLs1.mjs → plugins/assetconverter/index.mjs} +0 -0
  251. /package/build/src/{modules/animation → plugins/animation/src}/types/AnimatorParameters.d.ts +0 -0
  252. /package/build/src/{modules/ar → plugins/ar/src}/arquicklook/ARQuickLook.d.ts +0 -0
  253. /package/build/src/{modules/ar → plugins/ar/src}/error/ar-errors.d.ts +0 -0
  254. /package/build/src/{modules/ar → plugins/ar/src}/sceneviewer/SceneViewer.d.ts +0 -0
  255. /package/build/src/{modules/ar → plugins/ar/src}/webxr/crosshair/WebXRCrosshair.d.ts +0 -0
  256. /package/build/src/{modules/ar → plugins/ar/src}/webxr/overlay/Overlay.d.ts +0 -0
  257. /package/build/src/{modules/assetloader → plugins/assetloader/src}/draco/DracoLoader.d.ts +0 -0
  258. /package/build/src/{modules/state → plugins/state/src}/ActionRegistry.d.ts +0 -0
  259. /package/build/src/{modules/state → plugins/state/src}/actions/ar/index.d.ts +0 -0
  260. /package/build/src/{modules/state → plugins/state/src}/actions/camera/index.d.ts +0 -0
  261. /package/build/src/{modules/state → plugins/state/src}/actions/index.d.ts +0 -0
  262. /package/build/src/{modules/state → plugins/state/src}/actions/media/index.d.ts +0 -0
  263. /package/build/src/{modules/state → plugins/state/src}/actions/object/index.d.ts +0 -0
  264. /package/build/src/{modules/state → plugins/state/src}/actions/renderer/index.d.ts +0 -0
  265. /package/build/src/{modules/state → plugins/state/src}/actions/scene/index.d.ts +0 -0
  266. /package/build/src/{modules/state → plugins/state/src}/actions/toolbox/index.d.ts +0 -0
  267. /package/build/src/{types/info → plugins/systeminfo/types}/index.d.ts +0 -0
package/build/dive.mjs CHANGED
@@ -1,1201 +1,729 @@
1
- var z = Object.defineProperty;
2
- var F = (n, i, e) => i in n ? z(n, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[i] = e;
3
- var r = (n, i, e) => F(n, typeof i != "symbol" ? i + "" : i, e);
4
- import { O as U, a as I } from "./chunks/OrbitController-CXu1ko6E.mjs";
5
- import { D as W } from "./chunks/AxisCamera-lXJLIPLK.mjs";
6
- import { Object3D as p, AmbientLight as N, PointLight as J, SphereGeometry as C, MeshBasicMaterial as Y, FrontSide as M, Mesh as E, HemisphereLight as $, DirectionalLight as H, Vector3 as m, Box3 as V, MeshStandardMaterial as b, Raycaster as P, Color as f, CylinderGeometry as Q, BufferGeometry as T, BufferAttribute as S, BoxGeometry as y, ConeGeometry as K, LineDashedMaterial as q, Line as X, PlaneGeometry as Z, GridHelper as j, Scene as ee, WebGLRenderer as L, PCFSoftShadowMap as te, PCFShadowMap as ie, BasicShadowMap as se, MathUtils as w } from "three";
7
- import { P as g, U as ne, H as re } from "./chunks/VisibilityLayerMask-CXgt1fJc.mjs";
8
- import { g as d } from "./chunks/ModuleRegistry-CBfx1EVd.mjs";
9
- import { a as oe, D as ae } from "./chunks/PerspectiveCamera-PMJPzAn3.mjs";
10
- import { F as Ne, N as Je, S as Ye, g as $e, i as He } from "./chunks/FileTypes-DuVGjbcR.mjs";
11
- import { f as Ke, i as qe } from "./chunks/findInterface-DbJ5qzbc.mjs";
12
- import { F as Ze, P as je } from "./chunks/parse-error-BFRJyIxM.mjs";
13
- import { E as tt, a as it } from "./chunks/index-C_uFFwT2.mjs";
14
- class he extends p {
15
- constructor() {
16
- super();
17
- r(this, "isDIVELight", !0);
18
- r(this, "isDIVEAmbientLight", !0);
19
- r(this, "_light");
20
- this.name = "DIVEAmbientLight", this._light = new N(16777215, 1), this._light.layers.mask = g, this.add(this._light);
21
- }
22
- setColor(e) {
23
- this._light.color = e;
24
- }
25
- setIntensity(e) {
26
- this._light.intensity = e;
27
- }
28
- setEnabled(e) {
29
- this._light.visible = e;
30
- }
31
- }
32
- class le extends p {
33
- constructor() {
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) {
34
15
  super();
35
- r(this, "isDIVELight", !0);
36
- r(this, "isDIVEPointLight", !0);
37
- r(this, "isMovable", !0);
38
- r(this, "isSelectable", !0);
39
- r(this, "gizmo", null);
40
- r(this, "light");
41
- r(this, "mesh");
42
- this.name = "DIVEPointLight", this.light = new J(16777215, 1), this.light.layers.mask = g, this.light.castShadow = !0, this.light.shadow.mapSize.width = 512, this.light.shadow.mapSize.height = 512, this.add(this.light);
43
- const e = 0.1, t = new C(
44
- e,
45
- e * 320,
46
- e * 320
47
- ), s = new Y({
48
- color: this.light.color,
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,
49
37
  transparent: !0,
50
- opacity: 0.8,
51
- side: M
38
+ opacity: 0.15,
39
+ depthTest: !1,
40
+ depthWrite: !1
52
41
  });
53
- this.mesh = new E(t, s), this.mesh.layers.mask = ne, this.add(this.mesh);
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);
54
43
  }
55
- setColor(e) {
56
- this.light.color = e, this.mesh.material.color = e;
44
+ set debug(t) {
45
+ this._colliderMesh.visible = t;
57
46
  }
58
- setIntensity(e) {
59
- this.light.intensity = e, this.mesh.material.opacity = e > 0.8 ? 0.8 : e * 0.8;
47
+ get highlight() {
48
+ return this._highlight;
60
49
  }
61
- setEnabled(e) {
62
- this.light.visible = e;
50
+ set highlight(t) {
51
+ this._highlight = t, this._lineMaterial.color = this._highlight || this._hovered ? this._colorHover : this._color;
63
52
  }
64
- onMove() {
65
- d("State").then((e) => {
66
- var t;
67
- (t = e.get(this.userData.id)) == null || t.performAction("UPDATE_OBJECT", {
68
- id: this.userData.id,
69
- position: this.position
70
- });
71
- });
53
+ get forwardVector() {
54
+ return new h(0, 0, 1).applyQuaternion(this.quaternion).normalize();
72
55
  }
73
- onSelect() {
74
- d("State").then((e) => {
75
- var t;
76
- (t = e.get(this.userData.id)) == null || t.performAction("SELECT_OBJECT", {
77
- id: this.userData.id
78
- });
79
- });
56
+ get rightVector() {
57
+ return new h(1, 0, 0).applyQuaternion(this.quaternion).normalize();
80
58
  }
81
- onDeselect() {
82
- d("State").then((e) => {
83
- var t;
84
- (t = e.get(this.userData.id)) == null || t.performAction("DESELECT_OBJECT", {
85
- id: this.userData.id
86
- });
87
- });
59
+ get upVector() {
60
+ return new h(0, 1, 0).applyQuaternion(this.quaternion).normalize();
88
61
  }
89
- }
90
- class B extends p {
91
- constructor() {
92
- super();
93
- r(this, "isDIVELight", !0);
94
- r(this, "isDIVESceneLight", !0);
95
- r(this, "_hemiLight");
96
- r(this, "_dirLight");
97
- this.name = "DIVESceneLight", this._hemiLight = new $(16777215, 16777215, 2), this._hemiLight.layers.mask = g, this._hemiLight.position.set(0, 50, 0), this.add(this._hemiLight), this._dirLight = new H(16777215, 3), this._dirLight.layers.mask = g, 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;
98
- const e = 5;
99
- this._dirLight.shadow.camera.left = -5, this._dirLight.shadow.camera.right = e, this._dirLight.shadow.camera.top = e, this._dirLight.shadow.camera.bottom = -5, this._dirLight.shadow.camera.far = 3500, this.add(this._dirLight);
62
+ reset() {
63
+ this._lineMaterial.color = this._color;
100
64
  }
101
- setColor(e) {
102
- this._hemiLight.color = e, this._dirLight.color = e;
65
+ onPointerEnter() {
66
+ this._hovered = !0, this.parent && this.parent.onHandleHover(this, !0);
103
67
  }
104
- setIntensity(e) {
105
- this._hemiLight.intensity = e * 2, this._dirLight.intensity = e * 3;
68
+ onPointerLeave() {
69
+ this._hovered = !1, this.parent && this.parent.onHandleHover(this, !1);
106
70
  }
107
- setEnabled(e) {
108
- this._hemiLight.visible = e, this._dirLight.visible = e;
71
+ onDragStart() {
72
+ this.parent && this.parent.onHandleDragStart(this);
73
+ }
74
+ onDrag(t) {
75
+ this.parent && this.parent.onHandleDrag(this, t);
76
+ }
77
+ onDragEnd() {
78
+ this.parent && this.parent.onHandleDragEnd(this);
109
79
  }
110
80
  }
111
- const v = (n) => n.parent ? v(n.parent) : n;
112
- class D extends p {
113
- constructor() {
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) {
114
130
  super();
115
- r(this, "isSelectable", !0);
116
- r(this, "isMovable", !0);
117
- r(this, "isDIVENode", !0);
118
- r(this, "gizmo", null);
119
- r(this, "_positionWorldBuffer");
120
- r(this, "_boundingBox");
121
- this.layers.mask = g, this._positionWorldBuffer = new m(), this._boundingBox = new V();
122
- }
123
- setPosition(e) {
124
- if (!this.parent) {
125
- this.position.set(e.x, e.y, e.z);
126
- return;
127
- }
128
- const t = new m(e.x, e.y, e.z);
129
- this.position.copy(this.parent.worldToLocal(t)), "isDIVEGroup" in this.parent && this.parent.updateLineTo(this);
130
- }
131
- setRotation(e) {
132
- this.rotation.set(e.x, e.y, e.z);
133
- }
134
- setScale(e) {
135
- this.scale.set(e.x, e.y, e.z);
136
- }
137
- setVisibility(e) {
138
- this.visible = e;
139
- }
140
- setToWorldOrigin() {
141
- this.position.set(0, 0, 0), d("State").then((e) => {
142
- var t;
143
- (t = e.get(this.userData.id)) == null || t.performAction("UPDATE_OBJECT", {
144
- id: this.userData.id,
145
- position: this.getWorldPosition(this._positionWorldBuffer),
146
- rotation: this.rotation,
147
- scale: this.scale
148
- });
149
- });
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
+ );
150
159
  }
151
- /**
152
- * Can be called when the object is moved from a foreign object (gizmo, parent, etc.) to update the object's position.
153
- */
154
- onMove() {
155
- d("State").then((e) => {
156
- var t;
157
- (t = e.get(this.userData.id)) == null || t.performAction("UPDATE_OBJECT", {
158
- id: this.userData.id,
159
- position: this.getWorldPosition(this._positionWorldBuffer),
160
- rotation: this.rotation,
161
- scale: this.scale
162
- });
160
+ set debug(t) {
161
+ this.children.forEach((e) => {
162
+ e.debug = t;
163
163
  });
164
164
  }
165
- onSelect() {
166
- d("State").then((e) => {
167
- var t;
168
- (t = e.get(this.userData.id)) == null || t.performAction("SELECT_OBJECT", {
169
- id: this.userData.id
170
- });
165
+ reset() {
166
+ this.children.forEach((t) => {
167
+ t.reset();
171
168
  });
172
169
  }
173
- onDeselect() {
174
- d("State").then((e) => {
175
- var t;
176
- (t = e.get(this.userData.id)) == null || t.performAction("DESELECT_OBJECT", {
177
- id: this.userData.id
178
- });
170
+ handleHighlight(t, e, a) {
171
+ this.children.forEach((n) => {
172
+ a ? n.highlight = n.axis === t && a : n.highlight = n.axis === t && e;
179
173
  });
180
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
+ }
181
199
  }
182
- class k extends D {
183
- constructor() {
184
- super(...arguments);
185
- r(this, "isDIVEModel", !0);
186
- r(this, "_mesh", null);
187
- r(this, "_material", null);
188
- r(this, "_assetLoader", null);
189
- }
190
- async _getAssetLoader() {
191
- return this._assetLoader || (this._assetLoader = new (await d("AssetLoader"))()), this._assetLoader;
192
- }
193
- async setFromURL(e) {
194
- const s = await (await this._getAssetLoader()).load(e);
195
- this.setFromGLTF(s), d("State").then((o) => {
196
- var a;
197
- (a = o.get(this.userData.id)) == null || a.performAction("MODEL_LOADED", {
198
- id: this.userData.id
199
- });
200
+ class w extends u {
201
+ constructor(t, e, a, n) {
202
+ super();
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
200
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);
201
230
  }
202
- setFromGLTF(e) {
203
- this.clear(), this._boundingBox.makeEmpty(), e.traverse((t) => {
204
- t.castShadow = !0, t.receiveShadow = !0, t.layers.mask = this.layers.mask, this._boundingBox.expandByObject(t), !this._mesh && "isMesh" in t && (this._mesh = t, this._material ? this._mesh.material = this._material : this._material = t.material);
205
- }), this.add(e);
206
- }
207
- setMaterial(e) {
208
- this._material || (this._material = new b()), e.vertexColors !== void 0 && (this._material.vertexColors = e.vertexColors), e.color !== void 0 && this._material.color.set(e.color), e.map !== void 0 && (this._material.map = e.map), e.normalMap !== void 0 && (this._material.normalMap = e.normalMap), e.roughness !== void 0 && (this._material.roughness = e.roughness), e.roughnessMap !== void 0 && (this._material.roughnessMap = e.roughnessMap, this._material.roughnessMap && (this._material.roughness = 1)), e.metalness !== void 0 && (this._material.metalness = e.metalness), e.metalnessMap !== void 0 && (this._material.metalnessMap = e.metalnessMap, this._material.metalnessMap && (this._material.metalness = 1)), this._mesh && (this._mesh.material = this._material);
209
- }
210
- placeOnFloor() {
211
- var o, a, h, l;
212
- const e = this.getWorldPosition(this._positionWorldBuffer), t = e.clone();
213
- (a = (o = this._mesh) == null ? void 0 : o.geometry) == null || a.computeBoundingBox();
214
- const s = (l = (h = this._mesh) == null ? void 0 : h.geometry) == null ? void 0 : l.boundingBox;
215
- !s || !this._mesh || (e.y = e.y - this._mesh.localToWorld(s.min.clone()).y, e.y !== t.y && d("State").then((u) => {
216
- var _;
217
- (_ = u.get(this.userData.id)) == null || _.performAction("UPDATE_OBJECT", {
218
- id: this.userData.id,
219
- position: e,
220
- rotation: this.rotation,
221
- scale: this.scale
222
- });
223
- }));
224
- }
225
- dropIt() {
226
- if (!this.parent) {
227
- console.warn(
228
- "DIVEModel: dropIt() called on a model that is not in the scene.",
229
- this
230
- );
231
- return;
232
- }
233
- const e = this._boundingBox.min.y * this.scale.y, t = this.localToWorld(
234
- this._boundingBox.getCenter(new m()).multiply(this.scale)
235
- );
236
- t.y = e + this.position.y;
237
- const s = new P(t, new m(0, -1, 0));
238
- s.layers.mask = g;
239
- const o = s.intersectObjects(
240
- v(this).root.children,
241
- !0
242
- );
243
- if (o.length > 0) {
244
- const a = o[0].object;
245
- a.geometry.computeBoundingBox();
246
- const h = a.geometry.boundingBox, l = a.localToWorld(h.max.clone()), u = this.position.clone(), _ = this.position.clone().setY(l.y).sub(new m(0, e, 0));
247
- if (this.position.copy(_), this.position.y === u.y) return;
248
- this.onMove();
249
- }
231
+ set debug(t) {
232
+ this._colliderMesh.visible = t;
233
+ }
234
+ get highlight() {
235
+ return this._highlight;
236
+ }
237
+ set highlight(t) {
238
+ this._highlight = t, this._lineMaterial.color = this._highlight || this._hovered ? this._colorHover : this._color;
239
+ }
240
+ get forwardVector() {
241
+ return new h(0, 0, 1).applyQuaternion(this.quaternion).normalize();
242
+ }
243
+ get rightVector() {
244
+ return new h(1, 0, 0).applyQuaternion(this.quaternion).normalize();
245
+ }
246
+ get upVector() {
247
+ return new h(0, 1, 0).applyQuaternion(this.quaternion).normalize();
248
+ }
249
+ reset() {
250
+ this._lineMaterial.color = this._color;
251
+ }
252
+ onPointerEnter() {
253
+ this._hovered = !0, this.parent && this.parent.onHandleHover(this, !0);
254
+ }
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);
250
266
  }
251
267
  }
252
- class de extends D {
253
- constructor() {
268
+ class Z extends u {
269
+ constructor(t) {
254
270
  super();
255
- r(this, "isDIVEPrimitive", !0);
256
- r(this, "_mesh");
257
- this._mesh = new E(), this._mesh.layers.mask = g, this._mesh.castShadow = !0, this._mesh.receiveShadow = !0, this._mesh.material = new b(), this.add(this._mesh);
258
- }
259
- setGeometry(e) {
260
- const t = this.assembleGeometry(e);
261
- t && (this._mesh.geometry = t, this._boundingBox.setFromObject(this._mesh));
262
- }
263
- setMaterial(e) {
264
- const t = this._mesh.material;
265
- e.vertexColors !== void 0 && (t.vertexColors = e.vertexColors), e.color !== void 0 && (t.color = new f(e.color)), e.map !== void 0 && (t.map = e.map), e.normalMap !== void 0 && (t.normalMap = e.normalMap), e.roughness !== void 0 && (t.roughness = e.roughness), e.roughnessMap !== void 0 && (t.roughnessMap = e.roughnessMap, t.roughnessMap && (t.roughness = 1)), e.metalness !== void 0 && (t.metalness = e.metalness), e.metalnessMap !== void 0 && (t.metalnessMap = e.metalnessMap, t.metalnessMap && (t.metalness = 0)), this._mesh && (this._mesh.material = t);
266
- }
267
- placeOnFloor() {
268
- var o, a, h, l;
269
- const e = this.getWorldPosition(this._positionWorldBuffer), t = e.clone();
270
- (a = (o = this._mesh) == null ? void 0 : o.geometry) == null || a.computeBoundingBox();
271
- const s = (l = (h = this._mesh) == null ? void 0 : h.geometry) == null ? void 0 : l.boundingBox;
272
- !s || !this._mesh || (e.y = e.y - this._mesh.localToWorld(s.min.clone()).y, e.y !== t.y && d("State").then((u) => {
273
- var _;
274
- (_ = u.get(this.userData.id)) == null || _.performAction("UPDATE_OBJECT", {
275
- id: this.userData.id,
276
- position: e,
277
- rotation: this.rotation,
278
- scale: this.scale
279
- });
280
- }));
281
- }
282
- dropIt() {
283
- if (!this.parent) {
284
- console.warn(
285
- "DIVEPrimitive: dropIt() called on a model that is not in the scene.",
286
- this
287
- );
288
- return;
289
- }
290
- const e = this._boundingBox.min.y * this.scale.y, t = this.localToWorld(
291
- this._boundingBox.getCenter(new m()).multiply(this.scale)
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)
292
280
  );
293
- t.y = e + this.position.y;
294
- const s = new P(t, new m(0, -1, 0));
295
- s.layers.mask = g;
296
- const o = s.intersectObjects(
297
- v(this).root.children,
298
- !0
299
- );
300
- if (o.length > 0) {
301
- const a = o[0].object;
302
- a.geometry.computeBoundingBox();
303
- const h = a.geometry.boundingBox, l = a.localToWorld(h.max.clone()), u = this.position.clone(), _ = this.position.clone().setY(l.y).sub(new m(0, e, 0));
304
- if (this.position.copy(_), this.position.y === u.y) return;
305
- this.onMove();
306
- }
307
281
  }
308
- assembleGeometry(e) {
309
- switch (this._mesh.material.flatShading = !1, e.name.toLowerCase()) {
310
- case "cylinder":
311
- return this.createCylinderGeometry(e);
312
- case "sphere":
313
- return this.createSphereGeometry(e);
314
- case "pyramid":
315
- return this._mesh.material.flatShading = !0, this.createPyramidGeometry(e);
316
- case "cube":
317
- case "box":
318
- return this.createBoxGeometry(e);
319
- case "cone":
320
- return this.createConeGeometry(e);
321
- case "wall":
322
- return this.createWallGeometry(e);
323
- case "plane":
324
- return this.createPlaneGeometry(e);
325
- default:
326
- return console.warn(
327
- "DIVEPrimitive.assembleGeometry: Invalid geometry type:",
328
- e.name.toLowerCase()
329
- ), null;
330
- }
282
+ set debug(t) {
283
+ this.children.forEach((e) => {
284
+ e.debug = t;
285
+ });
331
286
  }
332
- createCylinderGeometry(e) {
333
- const t = new Q(
334
- e.width / 2,
335
- e.width / 2,
336
- e.height,
337
- 64
338
- );
339
- return t.translate(0, e.height / 2, 0), t;
340
- }
341
- createSphereGeometry(e) {
342
- return new C(e.width / 2, 256, 256);
343
- }
344
- createPyramidGeometry(e) {
345
- const t = new Float32Array([
346
- -e.width / 2,
347
- 0,
348
- -e.depth / 2,
349
- // 0
350
- e.width / 2,
351
- 0,
352
- -e.depth / 2,
353
- // 1
354
- e.width / 2,
355
- 0,
356
- e.depth / 2,
357
- // 2
358
- -e.width / 2,
359
- 0,
360
- e.depth / 2,
361
- // 3
362
- 0,
363
- e.height,
364
- 0
365
- ]), s = new Uint16Array([
366
- 0,
367
- 1,
368
- 2,
369
- 0,
370
- 2,
371
- 3,
372
- 0,
373
- 4,
374
- 1,
375
- 1,
376
- 4,
377
- 2,
378
- 2,
379
- 4,
380
- 3,
381
- 3,
382
- 4,
383
- 0
384
- ]), o = new T();
385
- return o.setAttribute(
386
- "position",
387
- new S(t, 3)
388
- ), o.setIndex(new S(s, 1)), o.computeVertexNormals(), o.computeBoundingBox(), o.computeBoundingSphere(), o;
389
- }
390
- createBoxGeometry(e) {
391
- const t = new y(
392
- e.width,
393
- e.height,
394
- e.depth
395
- );
396
- return t.translate(0, e.height / 2, 0), t;
397
- }
398
- createConeGeometry(e) {
399
- const t = new K(e.width / 2, e.height, 256);
400
- return t.translate(0, e.height / 2, 0), t;
401
- }
402
- createWallGeometry(e) {
403
- const t = new y(
404
- e.width,
405
- e.height,
406
- e.depth || 0.05,
407
- 16
408
- );
409
- return t.translate(0, e.height / 2, 0), t;
287
+ reset() {
288
+ this.children.forEach((t) => {
289
+ t.reset();
290
+ });
291
+ }
292
+ handleHighlight(t, e, a) {
293
+ this.children.forEach((n) => {
294
+ a ? n.highlight = n.axis === t && a : n.highlight = n.axis === t && e;
295
+ });
410
296
  }
411
- createPlaneGeometry(e) {
412
- const t = new y(
413
- e.width,
414
- e.height,
415
- e.depth
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)
416
314
  );
417
- return t.translate(0, e.height / 2, 0), t;
315
+ }
316
+ onHandleDragEnd(t) {
317
+ this._startPos = null, this.handleHighlight(t.axis, !1, !1);
418
318
  }
419
319
  }
420
- class ce extends D {
421
- // lines to children
422
- constructor() {
320
+ class b extends u {
321
+ constructor(t, e, a, n, o = 0.05) {
423
322
  super();
424
- r(this, "isDIVEGroup", !0);
425
- r(this, "_members");
426
- r(this, "_lines");
427
- this.name = "DIVEGroup", this._members = [], this._lines = [];
428
- }
429
- // children objects
430
- get members() {
431
- return this._members;
432
- }
433
- setPosition(e) {
434
- super.setPosition(e), this._members.forEach((t) => {
435
- "isDIVENode" in t && t.onMove();
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
341
+ );
342
+ this._lineMaterial = new f({
343
+ color: n,
344
+ depthTest: !1,
345
+ depthWrite: !1
436
346
  });
437
- }
438
- setLinesVisibility(e, t) {
439
- if (!t) {
440
- this._lines.forEach((o) => {
441
- o.visible = e;
442
- });
443
- return;
444
- }
445
- const s = this._members.indexOf(t);
446
- s !== -1 && (this._lines[s].visible = e);
447
- }
448
- attach(e) {
449
- if (this._members.includes(e))
450
- return this;
451
- const t = this.createLine();
452
- return this.add(t), this._lines.push(t), super.attach(e), this._members.push(e), this._updateLineTo(t, e), this.setLinesVisibility(!0, e), this;
453
- }
454
- /**
455
- * Removes an object from the group.
456
- * @param object - The object to remove.
457
- * @returns The group instance.
458
- */
459
- remove(e) {
460
- const t = this._members.indexOf(e);
461
- if (t === -1)
462
- return this;
463
- const s = this._lines[t];
464
- return super.remove(s), this._lines.splice(t, 1), super.remove(e), this._members.splice(t, 1), this;
465
- }
466
- updateLineTo(e) {
467
- const t = this._members.indexOf(e);
468
- t !== -1 && this._updateLineTo(this._lines[t], e);
469
- }
470
- /**
471
- * Creates a line for visualization.
472
- */
473
- createLine() {
474
- const e = new T(), t = new q({
475
- color: 6710886,
476
- dashSize: 0.05,
477
- gapSize: 0.025
478
- }), s = new X(e, t);
479
- return s.visible = !1, s;
480
- }
481
- /**
482
- * Updates a line to the object.
483
- */
484
- _updateLineTo(e, t) {
485
- const s = [
486
- new m(0, 0, 0),
487
- t.position.clone()
488
- ];
489
- e.geometry.setFromPoints(s), e.computeLineDistances();
490
- }
491
- // public setBoundingBoxVisibility(visible: boolean): void {
492
- // this._boxMesh.visible = visible;
493
- // }
494
- // /**
495
- // * Recalculates the position of the group based on it's bounding box.
496
- // * Children's world positions are kept.
497
- // */
498
- // private recalculatePosition(): void {
499
- // // store all children's world positions
500
- // const childrensWorldPositions: Vector3[] = this.children.map((child) => child.getWorldPosition(new Vector3()));
501
- // // calculate new center and set it as the group's position
502
- // const bbcenter = this.updateBB();
503
- // this.position.copy(bbcenter);
504
- // // set childrens's positions so their world positions are kept
505
- // this.children.forEach((child, i) => {
506
- // if (child.uuid === this._boxMesh.uuid) return;
507
- // child.position.copy(this.worldToLocal(childrensWorldPositions[i]));
508
- // });
509
- // DIVECommunication.get(this.userData.id)?.performAction('UPDATE_OBJECT', { id: this.userData.id, position: this.position });
510
- // }
511
- // /**
512
- // * Updates the bounding box of the group.
513
- // * @returns {Vector3} The new center of the bounding box.
514
- // */
515
- // private updateBB(): Vector3 {
516
- // this._boundingBox.makeEmpty();
517
- // if (this.children.length === 1) {
518
- // // because we always have the box mesh as 1 child
519
- // return this.position.clone();
520
- // }
521
- // this.children.forEach((child) => {
522
- // if (child.uuid === this._boxMesh.uuid) return;
523
- // this._boundingBox.expandByObject(child);
524
- // });
525
- // return this._boundingBox.getCenter(new Vector3());
526
- // }
527
- // private updateBoxMesh(): void {
528
- // if (this.children.length === 1) {
529
- // // because we always have the box mesh as 1 child
530
- // this._boxMesh.visible = false;
531
- // return;
532
- // }
533
- // this._boxMesh.quaternion.copy(this.quaternion.clone().invert());
534
- // this._boxMesh.scale.set(1 / this.scale.x, 1 / this.scale.y, 1 / this.scale.z);
535
- // 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);
536
- // this._boxMesh.visible = true;
537
- // }
538
- }
539
- class ue extends E {
540
- constructor() {
541
- const e = new Z(1, 1);
542
- e.scale(1e3, 1e3, 1), e.rotateX(-Math.PI / 2);
543
- const t = new b({
544
- color: new f(16777215),
545
- side: M
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
546
363
  });
547
- super(e, t);
548
- r(this, "isDIVEFloor", !0);
549
- this.name = "Floor", this.layers.mask = g, this.receiveShadow = !0;
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);
550
365
  }
551
- setVisibility(e) {
552
- this.visible = e;
366
+ set debug(t) {
367
+ this._colliderMesh.visible = t;
553
368
  }
554
- setColor(e) {
555
- this.material.color = new f(e);
369
+ get highlight() {
370
+ return this._highlight;
556
371
  }
557
- }
558
- class _e extends p {
559
- constructor() {
560
- super();
561
- r(this, "isDIVERoot", !0);
562
- r(this, "_floor");
563
- r(this, "_assetLoader", null);
564
- this.name = "Root", this._floor = new ue(), this.add(this._floor);
565
- }
566
- get floor() {
567
- return this._floor;
568
- }
569
- async _getAssetLoader() {
570
- return this._assetLoader || (this._assetLoader = new (await d("AssetLoader"))()), this._assetLoader;
571
- }
572
- computeSceneBB() {
573
- const e = new V();
574
- return this.children.forEach((t) => {
575
- "isDIVEFloor" in t || t.traverse((s) => {
576
- "isObject3D" in s && e.expandByObject(s);
577
- });
578
- }), e;
579
- }
580
- getSceneObject(e) {
581
- let t;
582
- return this.traverse((s) => {
583
- t || s.userData.id === e.id && (t = s);
584
- }), t;
585
- }
586
- addSceneObject(e) {
587
- let t = this.getSceneObject(e);
588
- if (t)
589
- return console.warn(
590
- `DIVERoot.addSceneObject: Scene object with id ${e.id} already exists`
591
- ), t;
592
- switch (e.entityType) {
593
- case "pov":
594
- break;
595
- case "light": {
596
- switch (e.type) {
597
- case "scene": {
598
- t = new B();
599
- break;
600
- }
601
- case "ambient": {
602
- t = new he();
603
- break;
604
- }
605
- case "point": {
606
- t = new le();
607
- break;
608
- }
609
- default:
610
- throw new Error(
611
- `DIVERoot.addSceneObject: Unknown light type: ${e.type}`
612
- );
613
- }
614
- t.name = e.name, t.userData.id = e.id, this.add(t), this._updateLight(t, e);
615
- break;
616
- }
617
- case "model": {
618
- t = new k(), t.name = e.name, t.userData.id = e.id, t.userData.uri = e.uri, this.add(t), this._updateModel(t, e);
619
- break;
620
- }
621
- case "primitive": {
622
- t = new de(), t.name = e.name, t.userData.id = e.id, this.add(t), this._updatePrimitive(t, e);
623
- break;
624
- }
625
- case "group": {
626
- t = new ce(), t.name = e.name, t.userData.id = e.id, this.add(t), this._updateGroup(t, e);
627
- break;
628
- }
629
- default:
630
- throw new Error(
631
- `DIVERoot.addSceneObject: Unknown entity type: ${e.entityType}`
632
- );
633
- }
634
- return t;
372
+ set highlight(t) {
373
+ this._highlight = t, this._lineMaterial.color = this._highlight || this._hovered ? this._colorHover : this._color;
635
374
  }
636
- updateSceneObject(e) {
637
- const t = this.getSceneObject(e);
638
- if (!t) {
639
- console.warn(
640
- `DIVERoot.updateSceneObject: Scene object with id ${e.id} does not exist`
641
- );
642
- return;
643
- }
644
- switch (e.entityType) {
645
- case "pov":
646
- break;
647
- case "light": {
648
- this._updateLight(t, e);
649
- break;
650
- }
651
- case "model": {
652
- this._updateModel(t, e);
653
- break;
654
- }
655
- case "primitive": {
656
- this._updatePrimitive(t, e);
657
- break;
658
- }
659
- case "group": {
660
- this._updateGroup(t, e);
661
- break;
662
- }
663
- default:
664
- throw new Error(
665
- `DIVERoot.updateSceneObject: Unknown entity type: ${e.entityType}`
666
- );
667
- }
375
+ get forwardVector() {
376
+ return new h(0, 0, 1).applyQuaternion(this.quaternion).normalize();
668
377
  }
669
- deleteSceneObject(e) {
670
- const t = this.getSceneObject(e);
671
- if (!t) {
672
- console.warn(
673
- `DIVERoot.deleteSceneObject: Object with id ${e.id} not found`
674
- );
675
- return;
676
- }
677
- switch (e.entityType) {
678
- case "pov":
679
- break;
680
- case "light": {
681
- this._deleteLight(t);
682
- break;
683
- }
684
- case "model": {
685
- this._deleteModel(t);
686
- break;
687
- }
688
- case "primitive": {
689
- this._deletePrimitive(t);
690
- break;
691
- }
692
- case "group": {
693
- this._deleteGroup(t);
694
- break;
695
- }
696
- default:
697
- throw new Error(
698
- `DIVERoot.deleteSceneObject: Unknown entity type: ${e.entityType}`
699
- );
700
- }
378
+ get rightVector() {
379
+ return new h(1, 0, 0).applyQuaternion(this.quaternion).normalize();
701
380
  }
702
- _updateLight(e, t) {
703
- t.name !== void 0 && t.name !== null && (e.name = t.name), t.position !== void 0 && t.position !== null && e.position.set(
704
- t.position.x,
705
- t.position.y,
706
- t.position.z
707
- ), t.intensity !== void 0 && t.intensity !== null && e.setIntensity(t.intensity), t.enabled !== void 0 && t.enabled !== null && e.setEnabled(t.enabled), t.color !== void 0 && t.color !== null && e.setColor(new f(t.color)), t.visible !== void 0 && t.visible !== null && (e.visible = t.visible), t.parentId !== void 0 && this._setParent({ ...t, parentId: t.parentId });
708
- }
709
- _updateModel(e, t) {
710
- t.uri !== void 0 && e.setFromURL(t.uri), t.name !== void 0 && (e.name = t.name), t.position !== void 0 && e.setPosition(t.position), t.rotation !== void 0 && e.setRotation(t.rotation), t.scale !== void 0 && e.setScale(t.scale), t.visible !== void 0 && e.setVisibility(t.visible), t.material !== void 0 && e.setMaterial(t.material), t.parentId !== void 0 && this._setParent({ ...t, parentId: t.parentId });
711
- }
712
- _updatePrimitive(e, t) {
713
- t.name !== void 0 && (e.name = t.name), t.geometry !== void 0 && e.setGeometry(t.geometry), t.position !== void 0 && e.setPosition(t.position), t.rotation !== void 0 && e.setRotation(t.rotation), t.scale !== void 0 && e.setScale(t.scale), t.visible !== void 0 && e.setVisibility(t.visible), t.material !== void 0 && e.setMaterial(t.material), t.parentId !== void 0 && this._setParent({ ...t, parentId: t.parentId });
714
- }
715
- _updateGroup(e, t) {
716
- t.name !== void 0 && (e.name = t.name), t.position !== void 0 && e.setPosition(t.position), t.rotation !== void 0 && e.setRotation(t.rotation), t.scale !== void 0 && e.setScale(t.scale), t.visible !== void 0 && e.setVisibility(t.visible), t.bbVisible !== void 0 && e.setLinesVisibility(t.bbVisible), t.parentId !== void 0 && this._setParent({ ...t, parentId: t.parentId });
717
- }
718
- _deleteLight(e) {
719
- this._detachTransformControls(e), e.parent.remove(e);
720
- }
721
- _deleteModel(e) {
722
- this._detachTransformControls(e), e.parent.remove(e);
723
- }
724
- _deletePrimitive(e) {
725
- this._detachTransformControls(e), e.parent.remove(e);
726
- }
727
- _deleteGroup(e) {
728
- this._detachTransformControls(e);
729
- for (let t = e.members.length - 1; t >= 0; t--)
730
- this.attach(e.members[t]);
731
- e.parent.remove(e);
732
- }
733
- _setParent(e) {
734
- const t = this.getSceneObject(e);
735
- if (e.parentId !== null) {
736
- const s = this.getSceneObject({
737
- id: e.parentId,
738
- entityType: e.entityType
739
- });
740
- if (!s) return;
741
- s.attach(t);
742
- } else
743
- this.attach(t);
744
- }
745
- _detachTransformControls(e) {
746
- this._findScene(e).children.find((t) => {
747
- "isTransformControls" in t && t.detach();
748
- });
381
+ get upVector() {
382
+ return new h(0, 1, 0).applyQuaternion(this.quaternion).normalize();
749
383
  }
750
- _findScene(e) {
751
- return e.parent !== null ? this._findScene(e.parent) : e;
384
+ reset() {
385
+ this._lineMaterial.color = this._color;
752
386
  }
753
- }
754
- const me = "#888888", ge = "#dddddd";
755
- class fe extends p {
756
- constructor() {
757
- super(), this.name = "Grid";
758
- const i = new j(
759
- 100,
760
- 100,
761
- me,
762
- ge
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
+ )
763
394
  );
764
- i.material.depthTest = !1, i.layers.mask = re, this.add(i);
765
395
  }
766
- setVisibility(i) {
767
- this.visible = i;
396
+ onPointerEnter() {
397
+ this._hovered = !0, this.parent && this.parent.onHoverAxis(this, !0);
768
398
  }
769
- }
770
- class pe extends ee {
771
- constructor() {
772
- super();
773
- r(this, "_root");
774
- r(this, "_grid");
775
- this.background = new f(16777215), this._root = new _e(), this.add(this._root), this._grid = new fe(), this.add(this._grid);
776
- }
777
- get root() {
778
- return this._root;
399
+ onPointerLeave() {
400
+ this._hovered = !1, this.parent && this.parent.onHoverAxis(this, !1);
779
401
  }
780
- get grid() {
781
- return this._grid;
402
+ onDragStart() {
403
+ this.parent && this.parent.onAxisDragStart(this);
782
404
  }
783
- setBackground(e) {
784
- this.background = new f(e);
405
+ onDrag(t) {
406
+ this.parent && this.parent.onAxisDrag(this, t);
785
407
  }
786
- computeSceneBB() {
787
- return this.root.computeSceneBB();
408
+ onDragEnd() {
409
+ this.parent && this.parent.onAxisDragEnd(this);
788
410
  }
789
411
  }
790
- const R = {
791
- canvas: void 0,
792
- antialias: !0,
793
- alpha: !0,
794
- powerPreference: "high-performance",
795
- precision: "highp",
796
- stencil: !1,
797
- depth: !0,
798
- logarithmicDepthBuffer: !1,
799
- shadows: !0,
800
- shadowQuality: "high"
801
- };
802
- class we {
803
- constructor(i, e, t) {
804
- r(this, "_webglrenderer");
805
- r(this, "_settings");
806
- this._scene = i, this._camera = e, this._settings = {
807
- ...R,
808
- ...t ?? {}
809
- }, this._webglrenderer = new L(this._settings), this._webglrenderer.shadowMap.enabled = this._settings.shadows, this._webglrenderer.shadowMap.type = this._settings.shadowQuality === "high" ? te : this._settings.shadowQuality === "medium" ? ie : se;
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
+ );
810
426
  }
811
- get webglrenderer() {
812
- return this._webglrenderer;
427
+ set debug(t) {
428
+ this.children.forEach((e) => {
429
+ e.debug = t;
430
+ });
813
431
  }
814
- setCanvas(i) {
815
- this._webglrenderer.dispose(), this._settings.canvas = i, this._webglrenderer = new L(this._settings);
432
+ reset() {
433
+ this.children.forEach((t) => {
434
+ t.reset();
435
+ });
436
+ }
437
+ update(t) {
438
+ this.children.forEach((e) => {
439
+ e.update(t);
440
+ });
816
441
  }
817
- render() {
818
- 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
+ });
819
446
  }
820
- onResize(i, e) {
821
- this._webglrenderer.setSize(i, e, !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
+ );
822
467
  }
823
- dispose() {
824
- this._webglrenderer.dispose();
468
+ onAxisDragEnd(t) {
469
+ this._startScale = null, this.handleHighlight(t.axis, !1, !1);
825
470
  }
826
471
  }
827
- class ye {
472
+ class Q extends u {
828
473
  constructor() {
829
- r(this, "_renderer", null);
830
- r(this, "_lastTime", 0);
831
- r(this, "_isRunning", !1);
832
- r(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
+ }
833
526
  }
834
- start() {
835
- 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;
836
543
  }
837
- stop() {
838
- this._isRunning = !1;
544
+ get mode() {
545
+ return this._mode;
839
546
  }
840
- setRenderer(i) {
841
- this._renderer = i;
547
+ set mode(t) {
548
+ this._mode = t, this.assemble();
842
549
  }
843
- addTicker(i) {
844
- this._tickers.find((e) => e.uuid === i.uuid) || this._tickers.push(i);
550
+ set debug(t) {
551
+ this._translateGizmo.debug = t, this._rotateGizmo.debug = t, this._scaleGizmo.debug = t;
845
552
  }
846
- removeTicker(i) {
847
- const e = this._tickers.findIndex((t) => t.uuid === i.uuid);
848
- e !== -1 && this._tickers.splice(e, 1);
553
+ get gizmoNode() {
554
+ return this._gizmoNode;
849
555
  }
850
- dispose() {
851
- this.stop(), this._tickers.forEach((i) => {
852
- var e;
853
- return (e = i.dispose) == null ? void 0 : e.call(i);
854
- }), this._tickers = [], this._isRunning = !1, this._lastTime = 0;
556
+ get gizmoPlane() {
557
+ return this._gizmoPlane;
855
558
  }
856
- _tick(i) {
857
- var t;
858
- if (!this._isRunning) return;
859
- const e = (i - this._lastTime) / 1e3;
860
- this._lastTime = i, this._tickers.forEach((s) => s.tick(e)), (t = this._renderer) == null || t.render(), requestAnimationFrame(this._tick.bind(this));
559
+ get object() {
560
+ return this._object;
861
561
  }
862
- }
863
- class Ee {
864
- constructor(i, e) {
865
- r(this, "_resizeObserver");
866
- r(this, "_width", 0);
867
- r(this, "_height", 0);
868
- this._resizeObserver = new ResizeObserver((t) => {
869
- for (const s of t) {
870
- const { width: o, height: a } = s.contentRect;
871
- o === this._width && a === this._height || (i.onResize(o, a), e.onResize(o, a), this._width = o, this._height = a);
872
- }
873
- }), this._observeCanvas(i.webglrenderer.domElement);
562
+ attach(t) {
563
+ return this._object = t, this.assemble(), this;
874
564
  }
875
- setCanvas(i) {
876
- this._resizeObserver.disconnect(), this._observeCanvas(i);
565
+ detach() {
566
+ return this._object = null, this.assemble(), this;
877
567
  }
878
- dispose() {
879
- this._resizeObserver.disconnect();
568
+ onHover(t, e, a) {
569
+ a && this._gizmoPlane.assemble(t, e);
880
570
  }
881
- _observeCanvas(i) {
882
- if (i.parentElement)
883
- this._resizeObserver.observe(i.parentElement);
884
- else {
885
- const e = setInterval(() => {
886
- i.parentElement && (this._resizeObserver.observe(i.parentElement), clearInterval(e));
887
- }, 16);
888
- }
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)));
889
573
  }
890
- }
891
- const O = {
892
- autoStart: !0,
893
- displayAxes: !1,
894
- ...oe,
895
- ...R
896
- };
897
- class be {
898
- constructor(i) {
899
- r(this, "_renderer");
900
- r(this, "_scene");
901
- r(this, "_camera");
902
- r(this, "_resizeManager");
903
- r(this, "_clock");
904
- r(this, "_settings");
905
- this._settings = {
906
- ...O,
907
- ...i ?? {}
908
- }, this._scene = new pe(), this._camera = new ae(this._settings), this._renderer = new we(
909
- this._scene,
910
- this._camera,
911
- this._settings
912
- ), this._resizeManager = new Ee(
913
- this._renderer,
914
- this._camera
915
- ), this._clock = new ye(), this._clock.setRenderer(this._renderer), this._settings.autoStart && this.start();
916
- }
917
- get scene() {
918
- return this._scene;
919
- }
920
- get camera() {
921
- return this._camera;
922
- }
923
- get renderer() {
924
- return this._renderer;
925
- }
926
- setCanvas(i) {
927
- this._renderer.setCanvas(i), this._resizeManager.setCanvas(i);
928
- }
929
- get clock() {
930
- return this._clock;
931
- }
932
- start() {
933
- this._clock.start();
934
- }
935
- stop() {
936
- this._clock.stop();
937
- }
938
- dispose() {
939
- 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));
940
576
  }
941
577
  }
942
- function c(n, i) {
943
- const e = (n + "e").split("e");
944
- return +(e[0] + "e" + (+e[1] + (i || 0)));
945
- }
946
- function ve(n, i = 0) {
947
- const e = c(n, +i);
948
- return c(Math.ceil(e), -i);
949
- }
950
- function De(n, i = 0) {
951
- const e = c(n, +i);
952
- return c(Math.floor(e), -i);
953
- }
954
- function A(n, i = 0) {
955
- if (n < 0) return -A(-n, i);
956
- const e = c(n, +i);
957
- return c(Math.round(e), -i);
958
- }
959
- function Ie(n, i, e) {
960
- return Math.atan2(
961
- n.clone().cross(i).dot(e),
962
- i.clone().dot(n)
963
- );
964
- }
965
- function Se(n, i = 0) {
966
- const e = c(n, +i);
967
- return c(Math.round(e), -i).toFixed(i);
968
- }
969
- function Le(n, i = 0) {
970
- const e = c(n, +i);
971
- return c(Math.trunc(e), -i);
972
- }
973
- function xe(n) {
974
- return (w.radToDeg(n) + 360) % 360;
975
- }
976
- function Ce(n) {
977
- return w.degToRad(n);
978
- }
979
- const Ae = {
980
- ceilExp: ve,
981
- floorExp: De,
982
- roundExp: A,
983
- toFixedExp: Se,
984
- truncateExp: Le,
985
- signedAngleTo: Ie,
986
- radToDeg: xe,
987
- degToRad: Ce
988
- };
989
- window.DIVE = {
990
- instances: [],
991
- get instance() {
992
- return window.DIVE.instances[0];
993
- }
994
- };
995
- const Me = {
996
- ...O,
997
- ...U
998
- };
999
- class G {
1000
- constructor(i) {
1001
- // descriptive members
1002
- r(this, "_instanceId", w.generateUUID());
1003
- r(this, "_settings");
1004
- r(this, "_engine");
1005
- r(this, "orbitController");
1006
- r(this, "axisCamera");
1007
- this._settings = {
1008
- ...Me,
1009
- ...i ?? {}
1010
- }, this._engine = new be(i), this.orbitController = new I(
1011
- this._engine.camera,
1012
- this._engine.renderer.webglrenderer.domElement,
1013
- this._settings
1014
- ), this._engine.clock.addTicker(this.orbitController), this._settings.displayAxes ? (this.axisCamera = new W(
1015
- this._engine.renderer,
1016
- this._engine.scene,
1017
- this._engine.camera
1018
- ), this._engine.clock.addTicker(this.axisCamera)) : this.axisCamera = null, import("./chunks/package-CIkS9WF6.mjs").then((e) => {
1019
- console.log(
1020
- `DIVE ${e.default.version} initialized successfully!`
1021
- ), console.log(`
1022
- @@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@
1023
- @@@@+-:::::::---------------------==------------------------------=#@@@@
1024
- @@%=::::.......::---------------------------------------------------------+@@
1025
- @@+:::...........::-----------------------------------------------------------#@@
1026
- @@=:::.........::::::-------------------------------------------------------------%@
1027
- @%:::.......:::::::-----------------------------------------------------------------#@
1028
- @*:::.....:::::-----------------------------------------------------------------------*@
1029
- @%::::::.::::---------------------------------------------------------------------------@@
1030
- @@-:::::::::-----------------------------------------------------------------------------=@
1031
- @%::::::::--------------------------------------------------------------------------------%@
1032
- @+::::::::--------------------------------=@@@@@%-----------------------------------------%@
1033
- @=:::::::--------------------------------*@@ @@+---------------------------------------#@
1034
- @+:::::::-------------------------------*@ @*--------------------------------------%@
1035
- @#::::::::-----------------------------=@@ @@=-------------------------------------%@
1036
- @@-::::::::----------------------------@@ @@------------------------------------=@
1037
- @%:::::::::--------------------------*@ @*-----------------------------------@@
1038
- @*:::::::::-------------------------@@ @@----------------------------------%@
1039
- @#::::::::::----------------------%@ @%--------------------------------%@
1040
- @#:::::::::::-------------------=@@ @@=------------------------------%@
1041
- @@-::::::::::::----------------%@ @%----------------------------=@@
1042
- @@#::::::::::::::------------*@ @*--------------------------#@@
1043
- @@+::::::::::::::::--------@@ @@------------------------+@@
1044
- @@*:::::::::::::::::----@@ @@---------------------+@@
1045
- @@@-:::::::::::::::--#@ @#-----------------=%@@
1046
- @@%-::::::::::::-%@ @%-------------=%@@
1047
- @@@@+:::::::#@@ @@*-------*@@@@
1048
- @@@@@@@ @@@@@@
1049
-
1050
- `);
1051
- }), window.DIVE.instances.push(this);
1052
- }
1053
- // static members
1054
- static async QuickView(i, e) {
1055
- const t = new G(e);
1056
- t.engine.scene.background = new f(16777215), t.engine.scene.grid.setVisibility(!1), t.engine.scene.root.floor.setVisibility(!0), t.engine.camera.position.set(0, 2, 2), t.orbitController.target.set(0, 0.5, 0);
1057
- const s = new B();
1058
- s.name = "SceneLight", s.userData.id = w.generateUUID(), s.setEnabled(!0), s.visible = !0, s.setIntensity((e == null ? void 0 : e.lightIntensity) ?? 1), s.setColor(new f(16777215)), t.engine.scene.root.add(s);
1059
- const o = new k();
1060
- o.name = "object", o.userData.id = w.generateUUID(), o.userData.uri = i, o.visible = !0, t.engine.scene.root.add(o), await o.setFromURL(i);
1061
- const a = t.engine.scene.computeSceneBB(), h = t.orbitController.computeEncompassingView(a);
1062
- return t.engine.camera.position.copy(h.position), t.orbitController.target.copy(h.target), t;
1063
- }
1064
- get engine() {
1065
- return this._engine;
1066
- }
1067
- get canvas() {
1068
- return this._engine.renderer.webglrenderer.domElement;
1069
- }
1070
- setCanvas(i) {
1071
- this._engine.setCanvas(i), this._engine.clock.removeTicker(this.orbitController), this.orbitController.dispose(), this.orbitController = new I(
1072
- this._engine.camera,
1073
- i,
1074
- this._settings
1075
- ), this._engine.clock.addTicker(this.orbitController);
1076
- }
1077
- async dispose() {
1078
- return new Promise((i) => {
1079
- 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(
1080
- (e) => e._instanceId !== this._instanceId
1081
- ), i();
1082
- });
1083
- }
1084
- }
1085
- class Ge {
578
+ class J {
1086
579
  constructor() {
1087
- r(this, "isMovable", !0);
580
+ i(this, "isMovable", !0);
1088
581
  }
1089
582
  }
1090
- class ze {
583
+ class $ {
1091
584
  constructor() {
1092
- r(this, "isSelectable", !0);
585
+ i(this, "isSelectable", !0);
1093
586
  }
1094
587
  }
1095
- const x = (n, i) => {
1096
- if (Object.keys(n).length === 0 && Object.keys(i).length === 0)
588
+ const V = (r, s) => {
589
+ if (Object.keys(r).length === 0 && Object.keys(s).length === 0)
1097
590
  return {};
1098
- if (typeof n != "object" || typeof i != "object")
1099
- return i;
1100
- let e = {};
1101
- return Object.keys(i).forEach((t) => {
1102
- if (!Object.keys(n).includes(t)) {
1103
- e = { ...e, [t]: i[t] };
591
+ if (typeof r != "object" || typeof s != "object")
592
+ return s;
593
+ let t = {};
594
+ return Object.keys(s).forEach((e) => {
595
+ if (!Object.keys(r).includes(e)) {
596
+ t = { ...t, [e]: s[e] };
1104
597
  return;
1105
598
  }
1106
- if (Array.isArray(i[t])) {
1107
- if (!Array.isArray(n[t])) {
1108
- e = { ...e, [t]: i[t] };
599
+ if (Array.isArray(s[e])) {
600
+ if (!Array.isArray(r[e])) {
601
+ t = { ...t, [e]: s[e] };
1109
602
  return;
1110
603
  }
1111
- const s = n[t], o = i[t];
1112
- if (s.length === 0 && o.length === 0) {
1113
- e = { ...e };
604
+ const a = r[e], n = s[e];
605
+ if (a.length === 0 && n.length === 0) {
606
+ t = { ...t };
1114
607
  return;
1115
608
  }
1116
- if (s.length !== o.length) {
1117
- e = { ...e, [t]: i[t] };
609
+ if (a.length !== n.length) {
610
+ t = { ...t, [e]: s[e] };
1118
611
  return;
1119
612
  }
1120
- const a = [];
1121
- if (o.forEach((h, l) => {
1122
- const u = x(
1123
- s[l],
1124
- o[l]
613
+ const o = [];
614
+ if (n.forEach((c, l) => {
615
+ const g = V(
616
+ a[l],
617
+ n[l]
1125
618
  );
1126
- Object.keys(u).length && a.push(o[l]);
1127
- }), Object.keys(a).length) {
1128
- e = { ...e, [t]: a };
619
+ Object.keys(g).length && o.push(n[l]);
620
+ }), Object.keys(o).length) {
621
+ t = { ...t, [e]: o };
1129
622
  return;
1130
623
  }
1131
624
  return;
1132
625
  }
1133
- if (typeof i[t] == "object") {
1134
- if (typeof n[t] != "object") {
1135
- e = { ...e, [t]: i[t] };
626
+ if (typeof s[e] == "object") {
627
+ if (typeof r[e] != "object") {
628
+ t = { ...t, [e]: s[e] };
1136
629
  return;
1137
630
  }
1138
- const s = x(
1139
- n[t],
1140
- i[t]
631
+ const a = V(
632
+ r[e],
633
+ s[e]
1141
634
  );
1142
- if (Object.keys(s).length) {
1143
- e = { ...e, [t]: s };
635
+ if (Object.keys(a).length) {
636
+ t = { ...t, [e]: a };
1144
637
  return;
1145
638
  }
1146
639
  }
1147
- n[t] !== i[t] && (e = { ...e, [t]: i[t] });
1148
- }), e;
640
+ r[e] !== s[e] && (t = { ...t, [e]: s[e] });
641
+ }), t;
1149
642
  };
1150
- function Fe(n, i) {
1151
- return i.forEach((e) => {
1152
- Object.getOwnPropertyNames(e.prototype).forEach((s) => {
1153
- if (s === "constructor")
643
+ function tt(r, s) {
644
+ return s.forEach((t) => {
645
+ Object.getOwnPropertyNames(t.prototype).forEach((a) => {
646
+ if (a === "constructor")
1154
647
  return;
1155
- const o = Object.getOwnPropertyDescriptor(
1156
- e.prototype,
1157
- s
648
+ const n = Object.getOwnPropertyDescriptor(
649
+ t.prototype,
650
+ a
1158
651
  );
1159
- Object.defineProperty(n.prototype, s, o);
652
+ Object.defineProperty(r.prototype, a, n);
1160
653
  });
1161
- const t = new e();
1162
- Object.getOwnPropertyNames(t).forEach((s) => {
1163
- const o = Object.getOwnPropertyDescriptor(
1164
- t,
1165
- s
654
+ const e = new t();
655
+ Object.getOwnPropertyNames(e).forEach((a) => {
656
+ const n = Object.getOwnPropertyDescriptor(
657
+ e,
658
+ a
1166
659
  );
1167
- Object.defineProperty(n.prototype, s, o);
660
+ Object.defineProperty(r.prototype, a, n);
1168
661
  });
1169
- }), n;
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";
1170
672
  }
1171
673
  export {
1172
- G as DIVE,
1173
- ye as DIVEClock,
1174
- Me as DIVEDefaultSettings,
1175
- be as DIVEEngine,
1176
- Ae as DIVEMath,
1177
- Ge as DIVEMovable,
1178
- ae as DIVEPerspectiveCamera,
1179
- oe as DIVEPerspectiveCameraDefaultSettings,
1180
- we as DIVERenderPipeline,
1181
- R as DIVERenderPipelineDefaultSettings,
1182
- Ee as DIVEResizeManager,
1183
- pe as DIVEScene,
1184
- ze as DIVESelectable,
1185
- tt as ESystem,
1186
- it as EWebXRUnsupportedReason,
1187
- O as EngineDefaultSettings,
1188
- Ne as FILE_TYPES,
1189
- Ze as FileTypeError,
1190
- Je as NetworkError,
1191
- je as ParseError,
1192
- Ye as SUPPORTED_FILE_TYPES,
1193
- Fe as applyMixins,
1194
- Ke as findInterface,
1195
- v as findSceneRecursive,
1196
- $e as getFileTypeFromUri,
1197
- d as getModule,
1198
- x as getObjectDelta,
1199
- qe as implementsInterface,
1200
- He 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
1201
729
  };