@shopware-ag/dive 2.0.2 → 2.1.0

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 (255) hide show
  1. package/README.md +0 -1
  2. package/build/chunks/{AssetCache-CuVztq_7.cjs → AssetCache-BQRROeKj.cjs} +1 -1
  3. package/build/chunks/{AssetCache-CiC4wZkh.mjs → AssetCache-D-tIG2cD.mjs} +1 -1
  4. package/build/chunks/{AssetLoader-DUhBw4FF.cjs → AssetLoader-CoPAaRfM.cjs} +1 -1
  5. package/build/chunks/{AssetLoader-o_4syRGj.mjs → AssetLoader-Da8hFXRL.mjs} +2 -2
  6. package/build/chunks/FileTypes-B2n185uW.cjs +29 -0
  7. package/build/chunks/FileTypes-CTHWb2IV.mjs +1878 -0
  8. package/build/chunks/PerspectiveCamera-8tnOn5YS.mjs +39 -0
  9. package/build/chunks/PerspectiveCamera-Dp8ElZGj.cjs +1 -0
  10. package/build/chunks/{SelectTool-6ZRGPwYE.mjs → SelectTool-Bcc2oxWf.mjs} +2 -2
  11. package/build/chunks/SelectTool-ut3Qwv63.cjs +1 -0
  12. package/build/{src/components → components}/index.d.ts +1 -0
  13. package/build/{src/components → components}/model/Model.d.ts +3 -2
  14. package/build/dive.cjs +1 -1
  15. package/build/dive.d.ts +1 -1
  16. package/build/dive.mjs +69 -68
  17. package/build/engine/AsciiArt.d.ts +1 -0
  18. package/build/engine/Dive.d.ts +98 -0
  19. package/build/{src/engine → engine}/camera/PerspectiveCamera.d.ts +1 -0
  20. package/build/{src/engine → engine}/clock/Clock.d.ts +1 -4
  21. package/build/{src/engine → engine}/index.d.ts +2 -1
  22. package/build/{src/engine → engine}/renderer/Renderer.d.ts +12 -5
  23. package/build/{src/engine → engine}/resize/ResizeManager.d.ts +5 -2
  24. package/build/engine/scene/Scene.d.ts +41 -0
  25. package/build/{src/engine → engine}/scene/xrroot/XRRoot.d.ts +2 -2
  26. package/build/{src/engine → engine}/scene/xrroot/xrlightroot/XRLightRoot.d.ts +2 -2
  27. package/build/engine/view/View.d.ts +24 -0
  28. package/build/{src/index.d.ts → index.d.ts} +1 -1
  29. package/build/plugins/animation/index.cjs +1 -1
  30. package/build/plugins/animation/index.d.ts +2 -2
  31. package/build/plugins/animation/index.mjs +11 -11
  32. package/build/plugins/ar/index.cjs +1 -1
  33. package/build/plugins/ar/index.d.ts +4 -2
  34. package/build/plugins/ar/index.mjs +27 -27
  35. package/build/{src/plugins → plugins}/ar/src/webxr/WebXR.d.ts +2 -2
  36. package/build/{src/plugins → plugins}/ar/src/webxr/controller/WebXRController.d.ts +2 -2
  37. package/build/{src/plugins → plugins}/ar/src/webxr/origin/WebXROrigin.d.ts +2 -2
  38. package/build/{src/plugins → plugins}/ar/src/webxr/raycaster/WebXRRaycaster.d.ts +2 -2
  39. package/build/{src/plugins → plugins}/ar/src/webxr/raycaster/ar/WebXRRaycasterAR.d.ts +2 -2
  40. package/build/{src/plugins → plugins}/ar/src/webxr/raycaster/three/WebXRRaycasterTHREE.d.ts +2 -2
  41. package/build/plugins/assetcache/index.cjs +1 -1
  42. package/build/plugins/assetcache/index.d.ts +1 -2
  43. package/build/plugins/assetcache/index.mjs +1 -1
  44. package/build/plugins/assetconverter/index.d.ts +1 -2
  45. package/build/plugins/assetexporter/index.d.ts +1 -2
  46. package/build/plugins/assetloader/index.cjs +1 -1
  47. package/build/plugins/assetloader/index.d.ts +3 -2
  48. package/build/plugins/assetloader/index.mjs +1 -1
  49. package/build/plugins/mediacreator/index.cjs +1 -1
  50. package/build/plugins/mediacreator/index.d.ts +2 -2
  51. package/build/plugins/mediacreator/index.mjs +8 -8
  52. package/build/{src/plugins → plugins}/mediacreator/src/MediaCreator.d.ts +2 -2
  53. package/build/plugins/orbitcontroller/index.cjs +1 -1
  54. package/build/plugins/orbitcontroller/index.d.ts +1 -2
  55. package/build/plugins/orbitcontroller/index.mjs +1 -1
  56. package/build/plugins/orbitcontroller/src/OrbitController.d.ts +195 -0
  57. package/build/plugins/orbitcontroller/types/OrbitControllerState.types.d.ts +9 -0
  58. package/build/plugins/orbitcontroller/types/index.d.ts +1 -0
  59. package/build/plugins/orientationdisplay/index.cjs +1 -1
  60. package/build/plugins/orientationdisplay/index.d.ts +2 -2
  61. package/build/plugins/orientationdisplay/index.mjs +1 -1
  62. package/build/{src/plugins → plugins}/orientationdisplay/src/OrientationDisplay.d.ts +2 -2
  63. package/build/plugins/quickview/index.cjs +1 -0
  64. package/build/plugins/quickview/index.d.ts +2 -0
  65. package/build/plugins/quickview/index.mjs +28 -0
  66. package/build/plugins/quickview/src/QuickView.d.ts +14 -0
  67. package/build/plugins/quickview/types/QuickViewSettings.d.ts +4 -0
  68. package/build/plugins/quickview/types/index.d.ts +1 -0
  69. package/build/plugins/state/index.cjs +7 -7
  70. package/build/plugins/state/index.d.ts +4 -2
  71. package/build/plugins/state/index.mjs +498 -500
  72. package/build/{src/plugins → plugins}/state/src/State.d.ts +2 -2
  73. package/build/{src/plugins → plugins}/state/src/actions/media/generatemedia.d.ts +1 -1
  74. package/build/{src/plugins → plugins}/state/types/ActionTypes.d.ts +2 -2
  75. package/build/plugins/systeminfo/index.d.ts +2 -2
  76. package/build/plugins/toolbox/index.cjs +1 -1
  77. package/build/plugins/toolbox/index.d.ts +5 -2
  78. package/build/plugins/toolbox/index.mjs +2 -2
  79. package/package.json +6 -1
  80. package/build/chunks/FileTypes-B2VTJIm5.cjs +0 -30
  81. package/build/chunks/FileTypes-C8pTXmiC.mjs +0 -1059
  82. package/build/chunks/MathUtils-CBW56ZuG.cjs +0 -1
  83. package/build/chunks/MathUtils-CFGjHuVF.mjs +0 -159
  84. package/build/chunks/OrbitController-BQ6SV1O_.mjs +0 -1159
  85. package/build/chunks/OrbitController-CpFQ3A1H.cjs +0 -1
  86. package/build/chunks/PerspectiveCamera-BByyG5R4.cjs +0 -1
  87. package/build/chunks/PerspectiveCamera-PMJPzAn3.mjs +0 -34
  88. package/build/chunks/SelectTool-B1awJ9PA.cjs +0 -1
  89. package/build/chunks/VisibilityLayerMask-BI7jPKdx.cjs +0 -1
  90. package/build/chunks/VisibilityLayerMask-CXgt1fJc.mjs +0 -8
  91. package/build/chunks/package-AmvzOXm_.cjs +0 -1
  92. package/build/chunks/package-BrpVRfq7.mjs +0 -39
  93. package/build/src/core/Dive.d.ts +0 -58
  94. package/build/src/core/index.d.ts +0 -1
  95. package/build/src/engine/Engine.d.ts +0 -28
  96. package/build/src/engine/scene/Scene.d.ts +0 -19
  97. package/build/src/plugins/animation/index.d.ts +0 -2
  98. package/build/src/plugins/ar/index.d.ts +0 -4
  99. package/build/src/plugins/assetcache/index.d.ts +0 -1
  100. package/build/src/plugins/assetconverter/index.d.ts +0 -1
  101. package/build/src/plugins/assetexporter/index.d.ts +0 -1
  102. package/build/src/plugins/assetloader/index.d.ts +0 -3
  103. package/build/src/plugins/mediacreator/index.d.ts +0 -2
  104. package/build/src/plugins/orbitcontroller/index.d.ts +0 -1
  105. package/build/src/plugins/orbitcontroller/src/OrbitController.d.ts +0 -45
  106. package/build/src/plugins/orientationdisplay/index.d.ts +0 -2
  107. package/build/src/plugins/state/index.d.ts +0 -4
  108. package/build/src/plugins/systeminfo/index.d.ts +0 -2
  109. package/build/src/plugins/toolbox/index.d.ts +0 -5
  110. /package/build/{src/components → components}/boundingbox/BoundingBox.d.ts +0 -0
  111. /package/build/{src/components → components}/floor/Floor.d.ts +0 -0
  112. /package/build/{src/components → components}/gizmo/Gizmo.d.ts +0 -0
  113. /package/build/{src/components → components}/gizmo/handles/AxisHandle.d.ts +0 -0
  114. /package/build/{src/components → components}/gizmo/handles/RadialHandle.d.ts +0 -0
  115. /package/build/{src/components → components}/gizmo/handles/ScaleHandle.d.ts +0 -0
  116. /package/build/{src/components → components}/gizmo/plane/GizmoPlane.d.ts +0 -0
  117. /package/build/{src/components → components}/gizmo/rotate/RotateGizmo.d.ts +0 -0
  118. /package/build/{src/components → components}/gizmo/scale/ScaleGizmo.d.ts +0 -0
  119. /package/build/{src/components → components}/gizmo/translate/TranslateGizmo.d.ts +0 -0
  120. /package/build/{src/components → components}/grid/Grid.d.ts +0 -0
  121. /package/build/{src/components → components}/group/Group.d.ts +0 -0
  122. /package/build/{src/components → components}/light/AmbientLight.d.ts +0 -0
  123. /package/build/{src/components → components}/light/PointLight.d.ts +0 -0
  124. /package/build/{src/components → components}/light/SceneLight.d.ts +0 -0
  125. /package/build/{src/components → components}/light/index.d.ts +0 -0
  126. /package/build/{src/components → components}/node/Node.d.ts +0 -0
  127. /package/build/{src/components → components}/primitive/Primitive.d.ts +0 -0
  128. /package/build/{src/components → components}/root/Root.d.ts +0 -0
  129. /package/build/{src/constants → constants}/AxisHelperColors.d.ts +0 -0
  130. /package/build/{src/constants → constants}/GridColors.d.ts +0 -0
  131. /package/build/{src/constants → constants}/VisibilityLayerMask.d.ts +0 -0
  132. /package/build/{src/constants → constants}/index.d.ts +0 -0
  133. /package/build/{src/error → error}/file-content/file-content-error.d.ts +0 -0
  134. /package/build/{src/error → error}/file-type/file-type-error.d.ts +0 -0
  135. /package/build/{src/error → error}/index.d.ts +0 -0
  136. /package/build/{src/error → error}/network/network-error.d.ts +0 -0
  137. /package/build/{src/error → error}/parse/parse-error.d.ts +0 -0
  138. /package/build/{src/events → events}/dispatcher/EventDispatcher.d.ts +0 -0
  139. /package/build/{src/events → events}/index.d.ts +0 -0
  140. /package/build/{src/helpers → helpers}/applyMixins/applyMixins.d.ts +0 -0
  141. /package/build/{src/helpers → helpers}/deepClone/deepClone.d.ts +0 -0
  142. /package/build/{src/helpers → helpers}/findInterface/findInterface.d.ts +0 -0
  143. /package/build/{src/helpers → helpers}/findSceneRecursive/findSceneRecursive.d.ts +0 -0
  144. /package/build/{src/helpers → helpers}/getFileTypeFromUri/getFileTypeFromUri.d.ts +0 -0
  145. /package/build/{src/helpers → helpers}/getObjectDelta/getObjectDelta.d.ts +0 -0
  146. /package/build/{src/helpers → helpers}/implementsInterface/implementsInterface.d.ts +0 -0
  147. /package/build/{src/helpers → helpers}/index.d.ts +0 -0
  148. /package/build/{src/helpers → helpers}/isFileTypeSupported/isFileTypeSupported.d.ts +0 -0
  149. /package/build/{src/helpers → helpers}/math/ceil/ceilExp.d.ts +0 -0
  150. /package/build/{src/helpers → helpers}/math/degToRad/degToRad.d.ts +0 -0
  151. /package/build/{src/helpers → helpers}/math/floor/floorExp.d.ts +0 -0
  152. /package/build/{src/helpers → helpers}/math/helper/shift.d.ts +0 -0
  153. /package/build/{src/helpers → helpers}/math/index.d.ts +0 -0
  154. /package/build/{src/helpers → helpers}/math/radToDeg/radToDeg.d.ts +0 -0
  155. /package/build/{src/helpers → helpers}/math/round/roundExp.d.ts +0 -0
  156. /package/build/{src/helpers → helpers}/math/signedAngleTo/signedAngleTo.d.ts +0 -0
  157. /package/build/{src/helpers → helpers}/math/toFixed/toFixedExp.d.ts +0 -0
  158. /package/build/{src/helpers → helpers}/math/truncate/truncateExp.d.ts +0 -0
  159. /package/build/{src/interfaces → interfaces}/Draggable.d.ts +0 -0
  160. /package/build/{src/interfaces → interfaces}/Hoverable.d.ts +0 -0
  161. /package/build/{src/interfaces → interfaces}/Movable.d.ts +0 -0
  162. /package/build/{src/interfaces → interfaces}/Rotatable.d.ts +0 -0
  163. /package/build/{src/interfaces → interfaces}/Scalable.d.ts +0 -0
  164. /package/build/{src/interfaces → interfaces}/Selectable.d.ts +0 -0
  165. /package/build/{src/interfaces → interfaces}/index.d.ts +0 -0
  166. /package/build/{src/plugins → plugins}/animation/src/animator/Animator.d.ts +0 -0
  167. /package/build/{src/plugins → plugins}/animation/src/index.d.ts +0 -0
  168. /package/build/{src/plugins → plugins}/animation/src/system/AnimationSystem.d.ts +0 -0
  169. /package/build/{src/plugins → plugins}/animation/src/types/AnimatorParameters.d.ts +0 -0
  170. /package/build/{src/plugins → plugins}/ar/src/ARSystem.d.ts +0 -0
  171. /package/build/{src/plugins → plugins}/ar/src/arquicklook/ARQuickLook.d.ts +0 -0
  172. /package/build/{src/plugins → plugins}/ar/src/error/ar-errors.d.ts +0 -0
  173. /package/build/{src/plugins → plugins}/ar/src/sceneviewer/SceneViewer.d.ts +0 -0
  174. /package/build/{src/plugins → plugins}/ar/src/webxr/crosshair/WebXRCrosshair.d.ts +0 -0
  175. /package/build/{src/plugins → plugins}/ar/src/webxr/overlay/Overlay.d.ts +0 -0
  176. /package/build/{src/plugins → plugins}/ar/src/webxr/touchscreencontrols/WebXRTouchscreenControls.d.ts +0 -0
  177. /package/build/{src/plugins → plugins}/assetcache/src/cache/AssetCache.d.ts +0 -0
  178. /package/build/{src/plugins → plugins}/assetcache/src/chunk/Chunk.d.ts +0 -0
  179. /package/build/{src/plugins → plugins}/assetcache/src/index.d.ts +0 -0
  180. /package/build/{src/plugins → plugins}/assetconverter/src/AssetConverter.d.ts +0 -0
  181. /package/build/{src/plugins → plugins}/assetexporter/src/AssetExporter.d.ts +0 -0
  182. /package/build/{src/plugins → plugins}/assetloader/src/draco/DracoLoader.d.ts +0 -0
  183. /package/build/{src/plugins → plugins}/assetloader/src/loader/AssetLoader.d.ts +0 -0
  184. /package/build/{src/plugins → plugins}/mediacreator/types/MediaGenerationById.d.ts +0 -0
  185. /package/build/{src/plugins → plugins}/mediacreator/types/MediaGenerationByPosition.d.ts +0 -0
  186. /package/build/{src/plugins → plugins}/mediacreator/types/MediaGenerationResolution.d.ts +0 -0
  187. /package/build/{src/plugins → plugins}/mediacreator/types/index.d.ts +0 -0
  188. /package/build/{src/plugins → plugins}/orientationdisplay/src/axes/Axes.d.ts +0 -0
  189. /package/build/{src/plugins → plugins}/state/src/ActionRegistry.d.ts +0 -0
  190. /package/build/{src/plugins → plugins}/state/src/actions/action.d.ts +0 -0
  191. /package/build/{src/plugins → plugins}/state/src/actions/ar/index.d.ts +0 -0
  192. /package/build/{src/plugins → plugins}/state/src/actions/ar/launchar.d.ts +0 -0
  193. /package/build/{src/plugins → plugins}/state/src/actions/camera/computeencompassingview.d.ts +0 -0
  194. /package/build/{src/plugins → plugins}/state/src/actions/camera/getcameratransform.d.ts +0 -0
  195. /package/build/{src/plugins → plugins}/state/src/actions/camera/index.d.ts +0 -0
  196. /package/build/{src/plugins → plugins}/state/src/actions/camera/lockcamera.d.ts +0 -0
  197. /package/build/{src/plugins → plugins}/state/src/actions/camera/movecamera.d.ts +0 -0
  198. /package/build/{src/plugins → plugins}/state/src/actions/camera/setcameralayer.d.ts +0 -0
  199. /package/build/{src/plugins → plugins}/state/src/actions/camera/setcameratransform.d.ts +0 -0
  200. /package/build/{src/plugins → plugins}/state/src/actions/camera/zoomcamera.d.ts +0 -0
  201. /package/build/{src/plugins → plugins}/state/src/actions/index.d.ts +0 -0
  202. /package/build/{src/plugins → plugins}/state/src/actions/media/index.d.ts +0 -0
  203. /package/build/{src/plugins → plugins}/state/src/actions/object/addobject.d.ts +0 -0
  204. /package/build/{src/plugins → plugins}/state/src/actions/object/deleteobject.d.ts +0 -0
  205. /package/build/{src/plugins → plugins}/state/src/actions/object/deselectobject.d.ts +0 -0
  206. /package/build/{src/plugins → plugins}/state/src/actions/object/dropit.d.ts +0 -0
  207. /package/build/{src/plugins → plugins}/state/src/actions/object/getallobjects.d.ts +0 -0
  208. /package/build/{src/plugins → plugins}/state/src/actions/object/getobjects.d.ts +0 -0
  209. /package/build/{src/plugins → plugins}/state/src/actions/object/index.d.ts +0 -0
  210. /package/build/{src/plugins → plugins}/state/src/actions/object/modelloaded.d.ts +0 -0
  211. /package/build/{src/plugins → plugins}/state/src/actions/object/placeonfloor.d.ts +0 -0
  212. /package/build/{src/plugins → plugins}/state/src/actions/object/selectobject.d.ts +0 -0
  213. /package/build/{src/plugins → plugins}/state/src/actions/object/setparent.d.ts +0 -0
  214. /package/build/{src/plugins → plugins}/state/src/actions/object/updateobject.d.ts +0 -0
  215. /package/build/{src/plugins → plugins}/state/src/actions/renderer/index.d.ts +0 -0
  216. /package/build/{src/plugins → plugins}/state/src/actions/renderer/startrender.d.ts +0 -0
  217. /package/build/{src/plugins → plugins}/state/src/actions/scene/exportscene.d.ts +0 -0
  218. /package/build/{src/plugins → plugins}/state/src/actions/scene/getallscenedata.d.ts +0 -0
  219. /package/build/{src/plugins → plugins}/state/src/actions/scene/index.d.ts +0 -0
  220. /package/build/{src/plugins → plugins}/state/src/actions/scene/setbackground.d.ts +0 -0
  221. /package/build/{src/plugins → plugins}/state/src/actions/scene/updatescene.d.ts +0 -0
  222. /package/build/{src/plugins → plugins}/state/src/actions/toolbox/index.d.ts +0 -0
  223. /package/build/{src/plugins → plugins}/state/src/actions/toolbox/setgizmomode.d.ts +0 -0
  224. /package/build/{src/plugins → plugins}/state/src/actions/toolbox/setgizmoscalelinked.d.ts +0 -0
  225. /package/build/{src/plugins → plugins}/state/src/actions/toolbox/setgizmovisible.d.ts +0 -0
  226. /package/build/{src/plugins → plugins}/state/src/actions/toolbox/usetool.d.ts +0 -0
  227. /package/build/{src/plugins → plugins}/state/types/StateExportFileType.d.ts +0 -0
  228. /package/build/{src/plugins → plugins}/state/types/StateSceneData.d.ts +0 -0
  229. /package/build/{src/plugins → plugins}/state/types/index.d.ts +0 -0
  230. /package/build/{src/plugins → plugins}/systeminfo/src/SystemInfo.d.ts +0 -0
  231. /package/build/{src/plugins → plugins}/systeminfo/types/index.d.ts +0 -0
  232. /package/build/{src/plugins → plugins}/toolbox/src/BaseTool.d.ts +0 -0
  233. /package/build/{src/plugins → plugins}/toolbox/src/Toolbox.d.ts +0 -0
  234. /package/build/{src/plugins → plugins}/toolbox/src/select/SelectTool.d.ts +0 -0
  235. /package/build/{src/plugins → plugins}/toolbox/src/transform/TransformTool.d.ts +0 -0
  236. /package/build/{src/plugins → plugins}/toolbox/types/ToolType.d.ts +0 -0
  237. /package/build/{src/plugins → plugins}/toolbox/types/index.d.ts +0 -0
  238. /package/build/{src/types → types}/components/DIVELight.d.ts +0 -0
  239. /package/build/{src/types → types}/components/DIVESceneObject.d.ts +0 -0
  240. /package/build/{src/types → types}/components/index.d.ts +0 -0
  241. /package/build/{src/types → types}/file/FileTypes.d.ts +0 -0
  242. /package/build/{src/types → types}/file/index.d.ts +0 -0
  243. /package/build/{src/types → types}/index.d.ts +0 -0
  244. /package/build/{src/types → types}/schema/BaseEntitySchema.d.ts +0 -0
  245. /package/build/{src/types → types}/schema/EntitySchema.d.ts +0 -0
  246. /package/build/{src/types → types}/schema/EntityTypeSchema.d.ts +0 -0
  247. /package/build/{src/types → types}/schema/GeometrySchema.d.ts +0 -0
  248. /package/build/{src/types → types}/schema/GeometryTypeSchema.d.ts +0 -0
  249. /package/build/{src/types → types}/schema/GroupSchema.d.ts +0 -0
  250. /package/build/{src/types → types}/schema/LightSchema.d.ts +0 -0
  251. /package/build/{src/types → types}/schema/MaterialSchema.d.ts +0 -0
  252. /package/build/{src/types → types}/schema/ModelSchema.d.ts +0 -0
  253. /package/build/{src/types → types}/schema/PovSchema.d.ts +0 -0
  254. /package/build/{src/types → types}/schema/PrimitiveSchema.d.ts +0 -0
  255. /package/build/{src/types → types}/schema/index.d.ts +0 -0
@@ -1 +0,0 @@
1
- "use strict";var Jt=Object.defineProperty;var $t=(D,e,i)=>e in D?Jt(D,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):D[e]=i;var b=(D,e,i)=>$t(D,typeof e!="symbol"?e+"":e,i);const p=require("three"),Z=require("./MathUtils-CBW56ZuG.cjs"),vt=require("./VisibilityLayerMask-BI7jPKdx.cjs"),Pt={type:"change"},st={type:"start"},Ct={type:"end"},W=new p.Ray,Dt=new p.Plane,te=Math.cos(70*p.MathUtils.DEG2RAD);class ee extends p.EventDispatcher{constructor(e,i){super(),this.object=e,this.domElement=i,this.domElement.style.touchAction="none",this.enabled=!0,this.target=new p.Vector3,this.cursor=new p.Vector3,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=.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:p.MOUSE.ROTATE,MIDDLE:p.MOUSE.DOLLY,RIGHT:p.MOUSE.PAN},this.touches={ONE:p.TOUCH.ROTATE,TWO:p.TOUCH.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this.getPolarAngle=function(){return a.phi},this.getAzimuthalAngle=function(){return a.theta},this.getDistance=function(){return this.object.position.distanceTo(this.target)},this.listenToKeyEvents=function(s){s.addEventListener("keydown",it),this._domElementKeyEvents=s},this.stopListenToKeyEvents=function(){this._domElementKeyEvents.removeEventListener("keydown",it),this._domElementKeyEvents=null},this.saveState=function(){t.target0.copy(t.target),t.position0.copy(t.object.position),t.zoom0=t.object.zoom},this.reset=function(){t.target.copy(t.target0),t.object.position.copy(t.position0),t.object.zoom=t.zoom0,t.object.updateProjectionMatrix(),t.dispatchEvent(Pt),t.update(),n=o.NONE},this.update=function(){const s=new p.Vector3,l=new p.Quaternion().setFromUnitVectors(e.up,new p.Vector3(0,1,0)),_=l.clone().invert(),g=new p.Vector3,w=new p.Quaternion,k=new p.Vector3,T=2*Math.PI;return function(Gt=null){const Et=t.object.position;s.copy(Et).sub(t.target),s.applyQuaternion(l),a.setFromVector3(s),t.autoRotate&&n===o.NONE&&Y(jt(Gt)),t.enableDamping?(a.theta+=m.theta*t.dampingFactor,a.phi+=m.phi*t.dampingFactor):(a.theta+=m.theta,a.phi+=m.phi);let A=t.minAzimuthAngle,O=t.maxAzimuthAngle;isFinite(A)&&isFinite(O)&&(A<-Math.PI?A+=T:A>Math.PI&&(A-=T),O<-Math.PI?O+=T:O>Math.PI&&(O-=T),A<=O?a.theta=Math.max(A,Math.min(O,a.theta)):a.theta=a.theta>(A+O)/2?Math.max(A,a.theta):Math.min(O,a.theta)),a.phi=Math.max(t.minPolarAngle,Math.min(t.maxPolarAngle,a.phi)),a.makeSafe(),t.enableDamping===!0?t.target.addScaledVector(c,t.dampingFactor):t.target.add(c),t.target.sub(t.cursor),t.target.clampLength(t.minTargetRadius,t.maxTargetRadius),t.target.add(t.cursor);let U=!1;if(t.zoomToCursor&&R||t.object.isOrthographicCamera)a.radius=tt(a.radius);else{const j=a.radius;a.radius=tt(a.radius*r),U=j!=a.radius}if(s.setFromSpherical(a),s.applyQuaternion(_),Et.copy(t.target).add(s),t.object.lookAt(t.target),t.enableDamping===!0?(m.theta*=1-t.dampingFactor,m.phi*=1-t.dampingFactor,c.multiplyScalar(1-t.dampingFactor)):(m.set(0,0,0),c.set(0,0,0)),t.zoomToCursor&&R){let j=null;if(t.object.isPerspectiveCamera){const F=s.length();j=tt(F*r);const K=F-j;t.object.position.addScaledVector(L,K),t.object.updateMatrixWorld(),U=!!K}else if(t.object.isOrthographicCamera){const F=new p.Vector3(f.x,f.y,0);F.unproject(t.object);const K=t.object.zoom;t.object.zoom=Math.max(t.minZoom,Math.min(t.maxZoom,t.object.zoom/r)),t.object.updateProjectionMatrix(),U=K!==t.object.zoom;const Tt=new p.Vector3(f.x,f.y,0);Tt.unproject(t.object),t.object.position.sub(Tt).add(F),t.object.updateMatrixWorld(),j=s.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),t.zoomToCursor=!1;j!==null&&(this.screenSpacePanning?t.target.set(0,0,-1).transformDirection(t.object.matrix).multiplyScalar(j).add(t.object.position):(W.origin.copy(t.object.position),W.direction.set(0,0,-1).transformDirection(t.object.matrix),Math.abs(t.object.up.dot(W.direction))<te?e.lookAt(t.target):(Dt.setFromNormalAndCoplanarPoint(t.object.up,t.target),W.intersectPlane(Dt,t.target))))}else if(t.object.isOrthographicCamera){const j=t.object.zoom;t.object.zoom=Math.max(t.minZoom,Math.min(t.maxZoom,t.object.zoom/r)),j!==t.object.zoom&&(t.object.updateProjectionMatrix(),U=!0)}return r=1,R=!1,U||g.distanceToSquared(t.object.position)>y||8*(1-w.dot(t.object.quaternion))>y||k.distanceToSquared(t.target)>y?(t.dispatchEvent(Pt),g.copy(t.object.position),w.copy(t.object.quaternion),k.copy(t.target),!0):!1}}(),this.dispose=function(){t.domElement.removeEventListener("contextmenu",Mt),t.domElement.removeEventListener("pointerdown",_t),t.domElement.removeEventListener("pointercancel",H),t.domElement.removeEventListener("wheel",gt),t.domElement.removeEventListener("pointermove",et),t.domElement.removeEventListener("pointerup",H),t.domElement.getRootNode().removeEventListener("keydown",ft,{capture:!0}),t._domElementKeyEvents!==null&&(t._domElementKeyEvents.removeEventListener("keydown",it),t._domElementKeyEvents=null)};const t=this,o={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let n=o.NONE;const y=1e-6,a=new p.Spherical,m=new p.Spherical;let r=1;const c=new p.Vector3,u=new p.Vector2,d=new p.Vector2,h=new p.Vector2,x=new p.Vector2,E=new p.Vector2,M=new p.Vector2,P=new p.Vector2,S=new p.Vector2,C=new p.Vector2,L=new p.Vector3,f=new p.Vector2;let R=!1;const z=[],V={};let J=!1;function jt(s){return s!==null?2*Math.PI/60*t.autoRotateSpeed*s:2*Math.PI/60/60*t.autoRotateSpeed}function q(s){const l=Math.abs(s*.01);return Math.pow(.95,t.zoomSpeed*l)}function Y(s){m.theta-=s}function X(s){m.phi-=s}const rt=function(){const s=new p.Vector3;return function(_,g){s.setFromMatrixColumn(g,0),s.multiplyScalar(-_),c.add(s)}}(),at=function(){const s=new p.Vector3;return function(_,g){t.screenSpacePanning===!0?s.setFromMatrixColumn(g,1):(s.setFromMatrixColumn(g,0),s.crossVectors(t.object.up,s)),s.multiplyScalar(_),c.add(s)}}(),N=function(){const s=new p.Vector3;return function(_,g){const w=t.domElement;if(t.object.isPerspectiveCamera){const k=t.object.position;s.copy(k).sub(t.target);let T=s.length();T*=Math.tan(t.object.fov/2*Math.PI/180),rt(2*_*T/w.clientHeight,t.object.matrix),at(2*g*T/w.clientHeight,t.object.matrix)}else t.object.isOrthographicCamera?(rt(_*(t.object.right-t.object.left)/t.object.zoom/w.clientWidth,t.object.matrix),at(g*(t.object.top-t.object.bottom)/t.object.zoom/w.clientHeight,t.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),t.enablePan=!1)}}();function $(s){t.object.isPerspectiveCamera||t.object.isOrthographicCamera?r/=s:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),t.enableZoom=!1)}function ht(s){t.object.isPerspectiveCamera||t.object.isOrthographicCamera?r*=s:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),t.enableZoom=!1)}function v(s,l){if(!t.zoomToCursor)return;R=!0;const _=t.domElement.getBoundingClientRect(),g=s-_.left,w=l-_.top,k=_.width,T=_.height;f.x=g/k*2-1,f.y=-(w/T)*2+1,L.set(f.x,f.y,1).unproject(t.object).sub(t.object.position).normalize()}function tt(s){return Math.max(t.minDistance,Math.min(t.maxDistance,s))}function ct(s){u.set(s.clientX,s.clientY)}function kt(s){v(s.clientX,s.clientX),P.set(s.clientX,s.clientY)}function lt(s){x.set(s.clientX,s.clientY)}function Lt(s){d.set(s.clientX,s.clientY),h.subVectors(d,u).multiplyScalar(t.rotateSpeed);const l=t.domElement;Y(2*Math.PI*h.x/l.clientHeight),X(2*Math.PI*h.y/l.clientHeight),u.copy(d),t.update()}function Rt(s){S.set(s.clientX,s.clientY),C.subVectors(S,P),C.y>0?$(q(C.y)):C.y<0&&ht(q(C.y)),P.copy(S),t.update()}function Nt(s){E.set(s.clientX,s.clientY),M.subVectors(E,x).multiplyScalar(t.panSpeed),N(M.x,M.y),x.copy(E),t.update()}function It(s){v(s.clientX,s.clientY),s.deltaY<0?ht(q(s.deltaY)):s.deltaY>0&&$(q(s.deltaY)),t.update()}function Vt(s){let l=!1;switch(s.code){case t.keys.UP:s.ctrlKey||s.metaKey||s.shiftKey?X(2*Math.PI*t.rotateSpeed/t.domElement.clientHeight):N(0,t.keyPanSpeed),l=!0;break;case t.keys.BOTTOM:s.ctrlKey||s.metaKey||s.shiftKey?X(-2*Math.PI*t.rotateSpeed/t.domElement.clientHeight):N(0,-t.keyPanSpeed),l=!0;break;case t.keys.LEFT:s.ctrlKey||s.metaKey||s.shiftKey?Y(2*Math.PI*t.rotateSpeed/t.domElement.clientHeight):N(t.keyPanSpeed,0),l=!0;break;case t.keys.RIGHT:s.ctrlKey||s.metaKey||s.shiftKey?Y(-2*Math.PI*t.rotateSpeed/t.domElement.clientHeight):N(-t.keyPanSpeed,0),l=!0;break}l&&(s.preventDefault(),t.update())}function ut(s){if(z.length===1)u.set(s.pageX,s.pageY);else{const l=I(s),_=.5*(s.pageX+l.x),g=.5*(s.pageY+l.y);u.set(_,g)}}function pt(s){if(z.length===1)x.set(s.pageX,s.pageY);else{const l=I(s),_=.5*(s.pageX+l.x),g=.5*(s.pageY+l.y);x.set(_,g)}}function mt(s){const l=I(s),_=s.pageX-l.x,g=s.pageY-l.y,w=Math.sqrt(_*_+g*g);P.set(0,w)}function Yt(s){t.enableZoom&&mt(s),t.enablePan&&pt(s)}function Ht(s){t.enableZoom&&mt(s),t.enableRotate&&ut(s)}function dt(s){if(z.length==1)d.set(s.pageX,s.pageY);else{const _=I(s),g=.5*(s.pageX+_.x),w=.5*(s.pageY+_.y);d.set(g,w)}h.subVectors(d,u).multiplyScalar(t.rotateSpeed);const l=t.domElement;Y(2*Math.PI*h.x/l.clientHeight),X(2*Math.PI*h.y/l.clientHeight),u.copy(d)}function yt(s){if(z.length===1)E.set(s.pageX,s.pageY);else{const l=I(s),_=.5*(s.pageX+l.x),g=.5*(s.pageY+l.y);E.set(_,g)}M.subVectors(E,x).multiplyScalar(t.panSpeed),N(M.x,M.y),x.copy(E)}function xt(s){const l=I(s),_=s.pageX-l.x,g=s.pageY-l.y,w=Math.sqrt(_*_+g*g);S.set(0,w),C.set(0,Math.pow(S.y/P.y,t.zoomSpeed)),$(C.y),P.copy(S);const k=(s.pageX+l.x)*.5,T=(s.pageY+l.y)*.5;v(k,T)}function Ut(s){t.enableZoom&&xt(s),t.enablePan&&yt(s)}function Ft(s){t.enableZoom&&xt(s),t.enableRotate&&dt(s)}function _t(s){t.enabled!==!1&&(z.length===0&&(t.domElement.setPointerCapture(s.pointerId),t.domElement.addEventListener("pointermove",et),t.domElement.addEventListener("pointerup",H)),!Qt(s)&&(Kt(s),s.pointerType==="touch"?bt(s):Zt(s)))}function et(s){t.enabled!==!1&&(s.pointerType==="touch"?Xt(s):Bt(s))}function H(s){switch(Wt(s),z.length){case 0:t.domElement.releasePointerCapture(s.pointerId),t.domElement.removeEventListener("pointermove",et),t.domElement.removeEventListener("pointerup",H),t.dispatchEvent(Ct),n=o.NONE;break;case 1:const l=z[0],_=V[l];bt({pointerId:l,pageX:_.x,pageY:_.y});break}}function Zt(s){let l;switch(s.button){case 0:l=t.mouseButtons.LEFT;break;case 1:l=t.mouseButtons.MIDDLE;break;case 2:l=t.mouseButtons.RIGHT;break;default:l=-1}switch(l){case p.MOUSE.DOLLY:if(t.enableZoom===!1)return;kt(s),n=o.DOLLY;break;case p.MOUSE.ROTATE:if(s.ctrlKey||s.metaKey||s.shiftKey){if(t.enablePan===!1)return;lt(s),n=o.PAN}else{if(t.enableRotate===!1)return;ct(s),n=o.ROTATE}break;case p.MOUSE.PAN:if(s.ctrlKey||s.metaKey||s.shiftKey){if(t.enableRotate===!1)return;ct(s),n=o.ROTATE}else{if(t.enablePan===!1)return;lt(s),n=o.PAN}break;default:n=o.NONE}n!==o.NONE&&t.dispatchEvent(st)}function Bt(s){switch(n){case o.ROTATE:if(t.enableRotate===!1)return;Lt(s);break;case o.DOLLY:if(t.enableZoom===!1)return;Rt(s);break;case o.PAN:if(t.enablePan===!1)return;Nt(s);break}}function gt(s){t.enabled===!1||t.enableZoom===!1||n!==o.NONE||(s.preventDefault(),t.dispatchEvent(st),It(qt(s)),t.dispatchEvent(Ct))}function qt(s){const l=s.deltaMode,_={clientX:s.clientX,clientY:s.clientY,deltaY:s.deltaY};switch(l){case 1:_.deltaY*=16;break;case 2:_.deltaY*=100;break}return s.ctrlKey&&!J&&(_.deltaY*=10),_}function ft(s){s.key==="Control"&&(J=!0,t.domElement.getRootNode().addEventListener("keyup",zt,{passive:!0,capture:!0}))}function zt(s){s.key==="Control"&&(J=!1,t.domElement.getRootNode().removeEventListener("keyup",zt,{passive:!0,capture:!0}))}function it(s){t.enabled===!1||t.enablePan===!1||Vt(s)}function bt(s){switch(wt(s),z.length){case 1:switch(t.touches.ONE){case p.TOUCH.ROTATE:if(t.enableRotate===!1)return;ut(s),n=o.TOUCH_ROTATE;break;case p.TOUCH.PAN:if(t.enablePan===!1)return;pt(s),n=o.TOUCH_PAN;break;default:n=o.NONE}break;case 2:switch(t.touches.TWO){case p.TOUCH.DOLLY_PAN:if(t.enableZoom===!1&&t.enablePan===!1)return;Yt(s),n=o.TOUCH_DOLLY_PAN;break;case p.TOUCH.DOLLY_ROTATE:if(t.enableZoom===!1&&t.enableRotate===!1)return;Ht(s),n=o.TOUCH_DOLLY_ROTATE;break;default:n=o.NONE}break;default:n=o.NONE}n!==o.NONE&&t.dispatchEvent(st)}function Xt(s){switch(wt(s),n){case o.TOUCH_ROTATE:if(t.enableRotate===!1)return;dt(s),t.update();break;case o.TOUCH_PAN:if(t.enablePan===!1)return;yt(s),t.update();break;case o.TOUCH_DOLLY_PAN:if(t.enableZoom===!1&&t.enablePan===!1)return;Ut(s),t.update();break;case o.TOUCH_DOLLY_ROTATE:if(t.enableZoom===!1&&t.enableRotate===!1)return;Ft(s),t.update();break;default:n=o.NONE}}function Mt(s){t.enabled!==!1&&s.preventDefault()}function Kt(s){z.push(s.pointerId)}function Wt(s){delete V[s.pointerId];for(let l=0;l<z.length;l++)if(z[l]==s.pointerId){z.splice(l,1);return}}function Qt(s){for(let l=0;l<z.length;l++)if(z[l]==s.pointerId)return!0;return!1}function wt(s){let l=V[s.pointerId];l===void 0&&(l=new p.Vector2,V[s.pointerId]=l),l.set(s.pageX,s.pageY)}function I(s){const l=s.pointerId===z[0]?z[1]:z[0];return V[l]}t.domElement.addEventListener("contextmenu",Mt),t.domElement.addEventListener("pointerdown",_t),t.domElement.addEventListener("pointercancel",H),t.domElement.addEventListener("wheel",gt,{passive:!1}),t.domElement.getRootNode().addEventListener("keydown",ft,{passive:!0,capture:!0}),this.update()}}class ie{constructor(e=0,i=0,t=0,o=1){this.isQuaternion=!0,this._x=e,this._y=i,this._z=t,this._w=o}static slerpFlat(e,i,t,o,n,y,a){let m=t[o+0],r=t[o+1],c=t[o+2],u=t[o+3];const d=n[y+0],h=n[y+1],x=n[y+2],E=n[y+3];if(a===0){e[i+0]=m,e[i+1]=r,e[i+2]=c,e[i+3]=u;return}if(a===1){e[i+0]=d,e[i+1]=h,e[i+2]=x,e[i+3]=E;return}if(u!==E||m!==d||r!==h||c!==x){let M=1-a;const P=m*d+r*h+c*x+u*E,S=P>=0?1:-1,C=1-P*P;if(C>Number.EPSILON){const f=Math.sqrt(C),R=Math.atan2(f,P*S);M=Math.sin(M*R)/f,a=Math.sin(a*R)/f}const L=a*S;if(m=m*M+d*L,r=r*M+h*L,c=c*M+x*L,u=u*M+E*L,M===1-a){const f=1/Math.sqrt(m*m+r*r+c*c+u*u);m*=f,r*=f,c*=f,u*=f}}e[i]=m,e[i+1]=r,e[i+2]=c,e[i+3]=u}static multiplyQuaternionsFlat(e,i,t,o,n,y){const a=t[o],m=t[o+1],r=t[o+2],c=t[o+3],u=n[y],d=n[y+1],h=n[y+2],x=n[y+3];return e[i]=a*x+c*u+m*h-r*d,e[i+1]=m*x+c*d+r*u-a*h,e[i+2]=r*x+c*h+a*d-m*u,e[i+3]=c*x-a*u-m*d-r*h,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,i,t,o){return this._x=e,this._y=i,this._z=t,this._w=o,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,i=!0){const t=e._x,o=e._y,n=e._z,y=e._order,a=Math.cos,m=Math.sin,r=a(t/2),c=a(o/2),u=a(n/2),d=m(t/2),h=m(o/2),x=m(n/2);switch(y){case"XYZ":this._x=d*c*u+r*h*x,this._y=r*h*u-d*c*x,this._z=r*c*x+d*h*u,this._w=r*c*u-d*h*x;break;case"YXZ":this._x=d*c*u+r*h*x,this._y=r*h*u-d*c*x,this._z=r*c*x-d*h*u,this._w=r*c*u+d*h*x;break;case"ZXY":this._x=d*c*u-r*h*x,this._y=r*h*u+d*c*x,this._z=r*c*x+d*h*u,this._w=r*c*u-d*h*x;break;case"ZYX":this._x=d*c*u-r*h*x,this._y=r*h*u+d*c*x,this._z=r*c*x-d*h*u,this._w=r*c*u+d*h*x;break;case"YZX":this._x=d*c*u+r*h*x,this._y=r*h*u+d*c*x,this._z=r*c*x-d*h*u,this._w=r*c*u-d*h*x;break;case"XZY":this._x=d*c*u-r*h*x,this._y=r*h*u-d*c*x,this._z=r*c*x+d*h*u,this._w=r*c*u+d*h*x;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+y)}return i===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,i){const t=i/2,o=Math.sin(t);return this._x=e.x*o,this._y=e.y*o,this._z=e.z*o,this._w=Math.cos(t),this._onChangeCallback(),this}setFromRotationMatrix(e){const i=e.elements,t=i[0],o=i[4],n=i[8],y=i[1],a=i[5],m=i[9],r=i[2],c=i[6],u=i[10],d=t+a+u;if(d>0){const h=.5/Math.sqrt(d+1);this._w=.25/h,this._x=(c-m)*h,this._y=(n-r)*h,this._z=(y-o)*h}else if(t>a&&t>u){const h=2*Math.sqrt(1+t-a-u);this._w=(c-m)/h,this._x=.25*h,this._y=(o+y)/h,this._z=(n+r)/h}else if(a>u){const h=2*Math.sqrt(1+a-t-u);this._w=(n-r)/h,this._x=(o+y)/h,this._y=.25*h,this._z=(m+c)/h}else{const h=2*Math.sqrt(1+u-t-a);this._w=(y-o)/h,this._x=(n+r)/h,this._y=(m+c)/h,this._z=.25*h}return this._onChangeCallback(),this}setFromUnitVectors(e,i){let t=e.dot(i)+1;return t<Number.EPSILON?(t=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=t):(this._x=0,this._y=-e.z,this._z=e.y,this._w=t)):(this._x=e.y*i.z-e.z*i.y,this._y=e.z*i.x-e.x*i.z,this._z=e.x*i.y-e.y*i.x,this._w=t),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Z.clamp(this.dot(e),-1,1)))}rotateTowards(e,i){const t=this.angleTo(e);if(t===0)return this;const o=Math.min(1,i/t);return this.slerp(e,o),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,i){const t=e._x,o=e._y,n=e._z,y=e._w,a=i._x,m=i._y,r=i._z,c=i._w;return this._x=t*c+y*a+o*r-n*m,this._y=o*c+y*m+n*a-t*r,this._z=n*c+y*r+t*m-o*a,this._w=y*c-t*a-o*m-n*r,this._onChangeCallback(),this}slerp(e,i){if(i===0)return this;if(i===1)return this.copy(e);const t=this._x,o=this._y,n=this._z,y=this._w;let a=y*e._w+t*e._x+o*e._y+n*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=y,this._x=t,this._y=o,this._z=n,this;const m=1-a*a;if(m<=Number.EPSILON){const h=1-i;return this._w=h*y+i*this._w,this._x=h*t+i*this._x,this._y=h*o+i*this._y,this._z=h*n+i*this._z,this.normalize(),this}const r=Math.sqrt(m),c=Math.atan2(r,a),u=Math.sin((1-i)*c)/r,d=Math.sin(i*c)/r;return this._w=y*u+this._w*d,this._x=t*u+this._x*d,this._y=o*u+this._y*d,this._z=n*u+this._z*d,this._onChangeCallback(),this}slerpQuaternions(e,i,t){return this.copy(e).slerp(i,t)}random(){const e=2*Math.PI*Math.random(),i=2*Math.PI*Math.random(),t=Math.random(),o=Math.sqrt(1-t),n=Math.sqrt(t);return this.set(o*Math.sin(e),o*Math.cos(e),n*Math.sin(i),n*Math.cos(i))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,i=0){return this._x=e[i],this._y=e[i+1],this._z=e[i+2],this._w=e[i+3],this._onChangeCallback(),this}toArray(e=[],i=0){return e[i]=this._x,e[i+1]=this._y,e[i+2]=this._z,e[i+3]=this._w,e}fromBufferAttribute(e,i){return this._x=e.getX(i),this._y=e.getY(i),this._z=e.getZ(i),this._w=e.getW(i),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class G{constructor(e=0,i=0,t=0){G.prototype.isVector3=!0,this.x=e,this.y=i,this.z=t}set(e,i,t){return t===void 0&&(t=this.z),this.x=e,this.y=i,this.z=t,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,i){switch(e){case 0:this.x=i;break;case 1:this.y=i;break;case 2:this.z=i;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,i){return this.x=e.x+i.x,this.y=e.y+i.y,this.z=e.z+i.z,this}addScaledVector(e,i){return this.x+=e.x*i,this.y+=e.y*i,this.z+=e.z*i,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,i){return this.x=e.x-i.x,this.y=e.y-i.y,this.z=e.z-i.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,i){return this.x=e.x*i.x,this.y=e.y*i.y,this.z=e.z*i.z,this}applyEuler(e){return this.applyQuaternion(St.setFromEuler(e))}applyAxisAngle(e,i){return this.applyQuaternion(St.setFromAxisAngle(e,i))}applyMatrix3(e){const i=this.x,t=this.y,o=this.z,n=e.elements;return this.x=n[0]*i+n[3]*t+n[6]*o,this.y=n[1]*i+n[4]*t+n[7]*o,this.z=n[2]*i+n[5]*t+n[8]*o,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const i=this.x,t=this.y,o=this.z,n=e.elements,y=1/(n[3]*i+n[7]*t+n[11]*o+n[15]);return this.x=(n[0]*i+n[4]*t+n[8]*o+n[12])*y,this.y=(n[1]*i+n[5]*t+n[9]*o+n[13])*y,this.z=(n[2]*i+n[6]*t+n[10]*o+n[14])*y,this}applyQuaternion(e){const i=this.x,t=this.y,o=this.z,n=e.x,y=e.y,a=e.z,m=e.w,r=2*(y*o-a*t),c=2*(a*i-n*o),u=2*(n*t-y*i);return this.x=i+m*r+y*u-a*c,this.y=t+m*c+a*r-n*u,this.z=o+m*u+n*c-y*r,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const i=this.x,t=this.y,o=this.z,n=e.elements;return this.x=n[0]*i+n[4]*t+n[8]*o,this.y=n[1]*i+n[5]*t+n[9]*o,this.z=n[2]*i+n[6]*t+n[10]*o,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,i){return this.x=Math.max(e.x,Math.min(i.x,this.x)),this.y=Math.max(e.y,Math.min(i.y,this.y)),this.z=Math.max(e.z,Math.min(i.z,this.z)),this}clampScalar(e,i){return this.x=Math.max(e,Math.min(i,this.x)),this.y=Math.max(e,Math.min(i,this.y)),this.z=Math.max(e,Math.min(i,this.z)),this}clampLength(e,i){const t=this.length();return this.divideScalar(t||1).multiplyScalar(Math.max(e,Math.min(i,t)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,i){return this.x+=(e.x-this.x)*i,this.y+=(e.y-this.y)*i,this.z+=(e.z-this.z)*i,this}lerpVectors(e,i,t){return this.x=e.x+(i.x-e.x)*t,this.y=e.y+(i.y-e.y)*t,this.z=e.z+(i.z-e.z)*t,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,i){const t=e.x,o=e.y,n=e.z,y=i.x,a=i.y,m=i.z;return this.x=o*m-n*a,this.y=n*y-t*m,this.z=t*a-o*y,this}projectOnVector(e){const i=e.lengthSq();if(i===0)return this.set(0,0,0);const t=e.dot(this)/i;return this.copy(e).multiplyScalar(t)}projectOnPlane(e){return nt.copy(this).projectOnVector(e),this.sub(nt)}reflect(e){return this.sub(nt.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const i=Math.sqrt(this.lengthSq()*e.lengthSq());if(i===0)return Math.PI/2;const t=this.dot(e)/i;return Math.acos(Z.clamp(t,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const i=this.x-e.x,t=this.y-e.y,o=this.z-e.z;return i*i+t*t+o*o}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,i,t){const o=Math.sin(i)*e;return this.x=o*Math.sin(t),this.y=Math.cos(i)*e,this.z=o*Math.cos(t),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,i,t){return this.x=e*Math.sin(i),this.y=t,this.z=e*Math.cos(i),this}setFromMatrixPosition(e){const i=e.elements;return this.x=i[12],this.y=i[13],this.z=i[14],this}setFromMatrixScale(e){const i=this.setFromMatrixColumn(e,0).length(),t=this.setFromMatrixColumn(e,1).length(),o=this.setFromMatrixColumn(e,2).length();return this.x=i,this.y=t,this.z=o,this}setFromMatrixColumn(e,i){return this.fromArray(e.elements,i*4)}setFromMatrix3Column(e,i){return this.fromArray(e.elements,i*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,i=0){return this.x=e[i],this.y=e[i+1],this.z=e[i+2],this}toArray(e=[],i=0){return e[i]=this.x,e[i+1]=this.y,e[i+2]=this.z,e}fromBufferAttribute(e,i){return this.x=e.getX(i),this.y=e.getY(i),this.z=e.getZ(i),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=Math.random()*Math.PI*2,i=Math.random()*2-1,t=Math.sqrt(1-i*i);return this.x=t*Math.cos(e),this.y=i,this.z=t*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const nt=new G,St=new ie;class At extends p.Object3D{constructor(){super();b(this,"isSelectable",!0);b(this,"isMovable",!0);b(this,"isDIVENode",!0);b(this,"gizmo",null);b(this,"_positionWorldBuffer");b(this,"_boundingBox");this.layers.mask=vt.PRODUCT_LAYER_MASK,this._positionWorldBuffer=new p.Vector3,this._boundingBox=new p.Box3}setPosition(i){if(!this.parent){this.position.set(i.x,i.y,i.z);return}const t=new p.Vector3(i.x,i.y,i.z);this.position.copy(this.parent.worldToLocal(t)),"isDIVEGroup"in this.parent&&this.parent.updateLineTo(this)}setRotation(i){this.rotation.set(i.x,i.y,i.z)}setScale(i){this.scale.set(i.x,i.y,i.z)}setVisibility(i){this.visible=i}setToWorldOrigin(){this.position.set(0,0,0),Promise.resolve().then(()=>require("../plugins/state/index.cjs")).then(({State:i})=>{var t;(t=i.get(this.userData.id))==null||t.performAction("UPDATE_OBJECT",{id:this.userData.id,position:this.getWorldPosition(this._positionWorldBuffer),rotation:this.rotation,scale:this.scale})})}onMove(){Promise.resolve().then(()=>require("../plugins/state/index.cjs")).then(({State:i})=>{var t;(t=i.get(this.userData.id))==null||t.performAction("UPDATE_OBJECT",{id:this.userData.id,position:this.getWorldPosition(this._positionWorldBuffer),rotation:this.rotation,scale:this.scale})})}onSelect(){Promise.resolve().then(()=>require("../plugins/state/index.cjs")).then(({State:i})=>{var t;(t=i.get(this.userData.id))==null||t.performAction("SELECT_OBJECT",{id:this.userData.id})})}onDeselect(){Promise.resolve().then(()=>require("../plugins/state/index.cjs")).then(({State:i})=>{var t;(t=i.get(this.userData.id))==null||t.performAction("DESELECT_OBJECT",{id:this.userData.id})})}}class Ot extends At{constructor(i,t=!1,o=65280){super();b(this,"_box");b(this,"_sphere");b(this,"_center");b(this,"_radius");b(this,"_boxHelper");b(this,"_sphereHelper");b(this,"_size");const n=new p.Box3;t?n.setFromObject(i):(i.updateWorldMatrix(!0,!0),i.traverse(a=>{if(a.isMesh){const m=a,r=m.geometry.clone();r.applyMatrix4(m.matrixWorld);const c=m.getWorldQuaternion(new p.Quaternion).invert();r.applyQuaternion(c),r.computeBoundingBox(),r.boundingBox&&n.union(r.boundingBox)}})),this.rotation.copy(i.rotation),this._box=n,this._size=n.getSize(new p.Vector3),this._center=n.getCenter(new p.Vector3),this._boxHelper=new p.Box3Helper(this._box,o),this._boxHelper.visible=!1,this.add(this._boxHelper),this._sphere=n.getBoundingSphere(new p.Sphere),this._radius=this._sphere.radius;const y=new p.SphereGeometry(this._radius,32,32);y.translate(this._center.x,this._center.y,this._center.z),this._sphereHelper=new p.Mesh(y,new p.MeshBasicMaterial({color:o,wireframe:!0})),this._sphereHelper.visible=!1,this.add(this._sphereHelper)}get box(){return this._box}get sphere(){return this._sphere}get center(){return this._center}get radius(){return this._radius}get size(){return this._size}setBoxHelperVisible(i){this._boxHelper.visible=i}setSphereHelperVisible(i){this._sphereHelper.visible=i}}const Q={enableDamping:!0,dampingFactor:.05},B=class B extends ee{constructor(i,t,o=Q){super(i,t);b(this,"uuid",Z.MathUtils.generateUUID());b(this,"object");this.domElement=t,this.domElement=t,this.object=i,this.enableDamping=o.enableDamping??Q.enableDamping,this.dampingFactor=o.dampingFactor??Q.dampingFactor,this.object.position.set(0,2,2),this.target.copy({x:0,y:.5,z:0}),this.update()}tick(){this.enabled&&this.update()}computeEncompassingView(i,t=0){const o=i.center,y=i.sphere.radius,a=this.object.fov*Math.PI/180,m=this.object.aspect,r=a/2,c=Math.atan(Math.tan(r)*m),u=y/Math.sin(r),d=y/Math.sin(c),h=Math.max(u,d)*(1+t),x=this.object.position.clone().sub(this.target).normalize(),E=x.length()>.001?x:new G(0,0,1);return{position:o.clone().add(E.multiplyScalar(h)),target:o}}focusOnObject(i,t=0){const o=new Ot(i,!1,65280),n=this.computeEncompassingView(o,t);this.object.position.copy(n.position),this.target.copy(n.target),this.update()}zoomIn(i){const t=i||B.DEFAULT_ZOOM_FACTOR,{minDistance:o,maxDistance:n}=this;this.minDistance=this.maxDistance=Z.MathUtils.clamp(this.getDistance()-t,o+t,n-t),this.update(),this.minDistance=o,this.maxDistance=n}zoomOut(i){const t=i||B.DEFAULT_ZOOM_FACTOR,{minDistance:o,maxDistance:n}=this;this.minDistance=this.maxDistance=Z.MathUtils.clamp(this.getDistance()+t,o+t,n-t),this.update(),this.minDistance=o,this.maxDistance=n}};b(B,"DEFAULT_ZOOM_FACTOR",1);let ot=B;exports.BoundingBox=Ot;exports.DIVENode=At;exports.OrbitController=ot;exports.OrbitControllerDefaultSettings=Q;
@@ -1 +0,0 @@
1
- "use strict";var L=Object.defineProperty;var R=(r,a,e)=>a in r?L(r,a,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[a]=e;var A=(r,a,e)=>R(r,typeof a!="symbol"?a+"":a,e);const S=require("three"),s=require("./VisibilityLayerMask-BI7jPKdx.cjs"),E={fov:70,near:.1,far:1e3},t=class t extends S.PerspectiveCamera{constructor(e=E){super(e.fov||E.fov,1,e.near||E.near,e.far||E.far);A(this,"onSetCameraLayer",()=>{});this.layers.mask=t.EDITOR_VIEW_LAYER_MASK}onResize(e,i){this.aspect=e/i,this.updateProjectionMatrix()}setCameraLayer(e){this.layers.mask=e==="LIVE"?t.LIVE_VIEW_LAYER_MASK:t.EDITOR_VIEW_LAYER_MASK,this.onSetCameraLayer(this.layers.mask)}};A(t,"EDITOR_VIEW_LAYER_MASK",s.DEFAULT_LAYER_MASK|s.UI_LAYER_MASK|s.HELPER_LAYER_MASK|s.PRODUCT_LAYER_MASK),A(t,"LIVE_VIEW_LAYER_MASK",s.PRODUCT_LAYER_MASK);let _=t;exports.DIVEPerspectiveCamera=_;exports.DIVEPerspectiveCameraDefaultSettings=E;
@@ -1,34 +0,0 @@
1
- var o = Object.defineProperty;
2
- var R = (t, s, a) => s in t ? o(t, s, { enumerable: !0, configurable: !0, writable: !0, value: a }) : t[s] = a;
3
- var e = (t, s, a) => R(t, typeof s != "symbol" ? s + "" : s, a);
4
- import { PerspectiveCamera as S } from "three";
5
- import { D as i, U as I, H as M, P as A } from "./VisibilityLayerMask-CXgt1fJc.mjs";
6
- const E = {
7
- fov: 70,
8
- near: 0.1,
9
- far: 1e3
10
- }, r = class r extends S {
11
- constructor(a = E) {
12
- super(
13
- a.fov || E.fov,
14
- 1,
15
- a.near || E.near,
16
- a.far || E.far
17
- );
18
- e(this, "onSetCameraLayer", () => {
19
- });
20
- this.layers.mask = r.EDITOR_VIEW_LAYER_MASK;
21
- }
22
- onResize(a, L) {
23
- this.aspect = a / L, this.updateProjectionMatrix();
24
- }
25
- setCameraLayer(a) {
26
- this.layers.mask = a === "LIVE" ? r.LIVE_VIEW_LAYER_MASK : r.EDITOR_VIEW_LAYER_MASK, this.onSetCameraLayer(this.layers.mask);
27
- }
28
- };
29
- e(r, "EDITOR_VIEW_LAYER_MASK", i | I | M | A), e(r, "LIVE_VIEW_LAYER_MASK", A);
30
- let _ = r;
31
- export {
32
- _ as D,
33
- E as a
34
- };
@@ -1 +0,0 @@
1
- "use strict";var wt=Object.defineProperty;var gt=(r,n,e)=>n in r?wt(r,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[n]=e;var h=(r,n,e)=>gt(r,typeof n!="symbol"?n+"":n,e);const Q=require("./FileTypes-B2VTJIm5.cjs"),t=require("three"),j=require("./findInterface-C6mrvf_t.cjs"),$=require("./VisibilityLayerMask-BI7jPKdx.cjs"),D=new t.Raycaster,p=new t.Vector3,P=new t.Vector3,c=new t.Quaternion,tt={X:new t.Vector3(1,0,0),Y:new t.Vector3(0,1,0),Z:new t.Vector3(0,0,1)},U={type:"change"},et={type:"mouseDown"},it={type:"mouseUp",mode:null},nt={type:"objectChange"};class bt extends t.Object3D{constructor(n,e){super(),e===void 0&&(console.warn('THREE.TransformControls: The second parameter "domElement" is now mandatory.'),e=document),this.isTransformControls=!0,this.visible=!1,this.domElement=e,this.domElement.style.touchAction="none";const o=new xt;this._gizmo=o,this.add(o);const s=new Dt;this._plane=s,this.add(s);const a=this;function i(m,y){let A=y;Object.defineProperty(a,m,{get:function(){return A!==void 0?A:y},set:function(x){A!==x&&(A=x,s[m]=x,o[m]=x,a.dispatchEvent({type:m+"-changed",value:x}),a.dispatchEvent(U))}}),a[m]=y,s[m]=y,o[m]=y}i("camera",n),i("object",void 0),i("enabled",!0),i("axis",null),i("mode","translate"),i("translationSnap",null),i("rotationSnap",null),i("scaleSnap",null),i("space","world"),i("size",1),i("dragging",!1),i("showX",!0),i("showY",!0),i("showZ",!0);const d=new t.Vector3,f=new t.Vector3,E=new t.Quaternion,T=new t.Quaternion,z=new t.Vector3,C=new t.Quaternion,K=new t.Vector3,V=new t.Vector3,M=new t.Vector3,S=0,g=new t.Vector3;i("worldPosition",d),i("worldPositionStart",f),i("worldQuaternion",E),i("worldQuaternionStart",T),i("cameraPosition",z),i("cameraQuaternion",C),i("pointStart",K),i("pointEnd",V),i("rotationAxis",M),i("rotationAngle",S),i("eye",g),this._offset=new t.Vector3,this._startNorm=new t.Vector3,this._endNorm=new t.Vector3,this._cameraScale=new t.Vector3,this._parentPosition=new t.Vector3,this._parentQuaternion=new t.Quaternion,this._parentQuaternionInv=new t.Quaternion,this._parentScale=new t.Vector3,this._worldScaleStart=new t.Vector3,this._worldQuaternionInv=new t.Quaternion,this._worldScale=new t.Vector3,this._positionStart=new t.Vector3,this._quaternionStart=new t.Quaternion,this._scaleStart=new t.Vector3,this._getPointer=Mt.bind(this),this._onPointerDown=vt.bind(this),this._onPointerHover=St.bind(this),this._onPointerMove=Pt.bind(this),this._onPointerUp=Et.bind(this),this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointermove",this._onPointerHover),this.domElement.addEventListener("pointerup",this._onPointerUp)}updateMatrixWorld(n){this.object!==void 0&&(this.object.updateMatrixWorld(),this.object.parent===null?console.error("TransformControls: The attached 3D object must be a part of the scene graph."):this.object.parent.matrixWorld.decompose(this._parentPosition,this._parentQuaternion,this._parentScale),this.object.matrixWorld.decompose(this.worldPosition,this.worldQuaternion,this._worldScale),this._parentQuaternionInv.copy(this._parentQuaternion).invert(),this._worldQuaternionInv.copy(this.worldQuaternion).invert()),this.camera.updateMatrixWorld(),this.camera.matrixWorld.decompose(this.cameraPosition,this.cameraQuaternion,this._cameraScale),this.camera.isOrthographicCamera?this.camera.getWorldDirection(this.eye).negate():this.eye.copy(this.cameraPosition).sub(this.worldPosition).normalize(),super.updateMatrixWorld(n)}pointerHover(n){if(this.object===void 0||this.dragging===!0)return;n!==null&&D.setFromCamera(n,this.camera);const e=N(this._gizmo.picker[this.mode],D);e?this.axis=e.object.name:this.axis=null}pointerDown(n){if(!(this.object===void 0||this.dragging===!0||n!=null&&n.button!==0)&&this.axis!==null){n!==null&&D.setFromCamera(n,this.camera);const e=N(this._plane,D,!0);e&&(this.object.updateMatrixWorld(),this.object.parent.updateMatrixWorld(),this._positionStart.copy(this.object.position),this._quaternionStart.copy(this.object.quaternion),this._scaleStart.copy(this.object.scale),this.object.matrixWorld.decompose(this.worldPositionStart,this.worldQuaternionStart,this._worldScaleStart),this.pointStart.copy(e.point).sub(this.worldPositionStart)),this.dragging=!0,et.mode=this.mode,this.dispatchEvent(et)}}pointerMove(n){const e=this.axis,o=this.mode,s=this.object;let a=this.space;if(o==="scale"?a="local":(e==="E"||e==="XYZE"||e==="XYZ")&&(a="world"),s===void 0||e===null||this.dragging===!1||n!==null&&n.button!==-1)return;n!==null&&D.setFromCamera(n,this.camera);const i=N(this._plane,D,!0);if(i){if(this.pointEnd.copy(i.point).sub(this.worldPositionStart),o==="translate")this._offset.copy(this.pointEnd).sub(this.pointStart),a==="local"&&e!=="XYZ"&&this._offset.applyQuaternion(this._worldQuaternionInv),e.indexOf("X")===-1&&(this._offset.x=0),e.indexOf("Y")===-1&&(this._offset.y=0),e.indexOf("Z")===-1&&(this._offset.z=0),a==="local"&&e!=="XYZ"?this._offset.applyQuaternion(this._quaternionStart).divide(this._parentScale):this._offset.applyQuaternion(this._parentQuaternionInv).divide(this._parentScale),s.position.copy(this._offset).add(this._positionStart),this.translationSnap&&(a==="local"&&(s.position.applyQuaternion(c.copy(this._quaternionStart).invert()),e.search("X")!==-1&&(s.position.x=Math.round(s.position.x/this.translationSnap)*this.translationSnap),e.search("Y")!==-1&&(s.position.y=Math.round(s.position.y/this.translationSnap)*this.translationSnap),e.search("Z")!==-1&&(s.position.z=Math.round(s.position.z/this.translationSnap)*this.translationSnap),s.position.applyQuaternion(this._quaternionStart)),a==="world"&&(s.parent&&s.position.add(p.setFromMatrixPosition(s.parent.matrixWorld)),e.search("X")!==-1&&(s.position.x=Math.round(s.position.x/this.translationSnap)*this.translationSnap),e.search("Y")!==-1&&(s.position.y=Math.round(s.position.y/this.translationSnap)*this.translationSnap),e.search("Z")!==-1&&(s.position.z=Math.round(s.position.z/this.translationSnap)*this.translationSnap),s.parent&&s.position.sub(p.setFromMatrixPosition(s.parent.matrixWorld))));else if(o==="scale"){if(e.search("XYZ")!==-1){let d=this.pointEnd.length()/this.pointStart.length();this.pointEnd.dot(this.pointStart)<0&&(d*=-1),P.set(d,d,d)}else p.copy(this.pointStart),P.copy(this.pointEnd),p.applyQuaternion(this._worldQuaternionInv),P.applyQuaternion(this._worldQuaternionInv),P.divide(p),e.search("X")===-1&&(P.x=1),e.search("Y")===-1&&(P.y=1),e.search("Z")===-1&&(P.z=1);s.scale.copy(this._scaleStart).multiply(P),this.scaleSnap&&(e.search("X")!==-1&&(s.scale.x=Math.round(s.scale.x/this.scaleSnap)*this.scaleSnap||this.scaleSnap),e.search("Y")!==-1&&(s.scale.y=Math.round(s.scale.y/this.scaleSnap)*this.scaleSnap||this.scaleSnap),e.search("Z")!==-1&&(s.scale.z=Math.round(s.scale.z/this.scaleSnap)*this.scaleSnap||this.scaleSnap))}else if(o==="rotate"){this._offset.copy(this.pointEnd).sub(this.pointStart);const d=20/this.worldPosition.distanceTo(p.setFromMatrixPosition(this.camera.matrixWorld));let f=!1;e==="XYZE"?(this.rotationAxis.copy(this._offset).cross(this.eye).normalize(),this.rotationAngle=this._offset.dot(p.copy(this.rotationAxis).cross(this.eye))*d):(e==="X"||e==="Y"||e==="Z")&&(this.rotationAxis.copy(tt[e]),p.copy(tt[e]),a==="local"&&p.applyQuaternion(this.worldQuaternion),p.cross(this.eye),p.length()===0?f=!0:this.rotationAngle=this._offset.dot(p.normalize())*d),(e==="E"||f)&&(this.rotationAxis.copy(this.eye),this.rotationAngle=this.pointEnd.angleTo(this.pointStart),this._startNorm.copy(this.pointStart).normalize(),this._endNorm.copy(this.pointEnd).normalize(),this.rotationAngle*=this._endNorm.cross(this._startNorm).dot(this.eye)<0?1:-1),this.rotationSnap&&(this.rotationAngle=Math.round(this.rotationAngle/this.rotationSnap)*this.rotationSnap),a==="local"&&e!=="E"&&e!=="XYZE"?(s.quaternion.copy(this._quaternionStart),s.quaternion.multiply(c.setFromAxisAngle(this.rotationAxis,this.rotationAngle)).normalize()):(this.rotationAxis.applyQuaternion(this._parentQuaternionInv),s.quaternion.copy(c.setFromAxisAngle(this.rotationAxis,this.rotationAngle)),s.quaternion.multiply(this._quaternionStart).normalize())}this.dispatchEvent(U),this.dispatchEvent(nt)}}pointerUp(n){n!==null&&n.button!==0||(this.dragging&&this.axis!==null&&(it.mode=this.mode,this.dispatchEvent(it)),this.dragging=!1,this.axis=null)}dispose(){this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.removeEventListener("pointermove",this._onPointerHover),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.traverse(function(n){n.geometry&&n.geometry.dispose(),n.material&&n.material.dispose()})}attach(n){return this.object=n,this.visible=!0,this}detach(){return this.object=void 0,this.visible=!1,this.axis=null,this}reset(){this.enabled&&this.dragging&&(this.object.position.copy(this._positionStart),this.object.quaternion.copy(this._quaternionStart),this.object.scale.copy(this._scaleStart),this.dispatchEvent(U),this.dispatchEvent(nt),this.pointStart.copy(this.pointEnd))}getRaycaster(){return D}getMode(){return this.mode}setMode(n){this.mode=n}setTranslationSnap(n){this.translationSnap=n}setRotationSnap(n){this.rotationSnap=n}setScaleSnap(n){this.scaleSnap=n}setSize(n){this.size=n}setSpace(n){this.space=n}}function Mt(r){if(this.domElement.ownerDocument.pointerLockElement)return{x:0,y:0,button:r.button};{const n=this.domElement.getBoundingClientRect();return{x:(r.clientX-n.left)/n.width*2-1,y:-(r.clientY-n.top)/n.height*2+1,button:r.button}}}function St(r){if(this.enabled)switch(r.pointerType){case"mouse":case"pen":this.pointerHover(this._getPointer(r));break}}function vt(r){this.enabled&&(document.pointerLockElement||this.domElement.setPointerCapture(r.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.pointerHover(this._getPointer(r)),this.pointerDown(this._getPointer(r)))}function Pt(r){this.enabled&&this.pointerMove(this._getPointer(r))}function Et(r){this.enabled&&(this.domElement.releasePointerCapture(r.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.pointerUp(this._getPointer(r)))}function N(r,n,e){const o=n.intersectObject(r,!0);for(let s=0;s<o.length;s++)if(o[s].object.visible||e)return o[s];return!1}const q=new t.Euler,l=new t.Vector3(0,1,0),ot=new t.Vector3(0,0,0),st=new t.Matrix4,B=new t.Quaternion,F=new t.Quaternion,b=new t.Vector3,rt=new t.Matrix4,O=new t.Vector3(1,0,0),I=new t.Vector3(0,1,0),Z=new t.Vector3(0,0,1),W=new t.Vector3,X=new t.Vector3,Y=new t.Vector3;class xt extends t.Object3D{constructor(){super(),this.isTransformControlsGizmo=!0,this.type="TransformControlsGizmo";const n=new t.MeshBasicMaterial({depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1,transparent:!0}),e=new t.LineBasicMaterial({depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1,transparent:!0}),o=n.clone();o.opacity=.15;const s=e.clone();s.opacity=.5;const a=n.clone();a.color.setHex(16711680);const i=n.clone();i.color.setHex(65280);const d=n.clone();d.color.setHex(255);const f=n.clone();f.color.setHex(16711680),f.opacity=.5;const E=n.clone();E.color.setHex(65280),E.opacity=.5;const T=n.clone();T.color.setHex(255),T.opacity=.5;const z=n.clone();z.opacity=.25;const C=n.clone();C.color.setHex(16776960),C.opacity=.25,n.clone().color.setHex(16776960);const V=n.clone();V.color.setHex(7895160);const M=new t.CylinderGeometry(0,.04,.1,12);M.translate(0,.05,0);const S=new t.BoxGeometry(.08,.08,.08);S.translate(0,.04,0);const g=new t.BufferGeometry;g.setAttribute("position",new t.Float32BufferAttribute([0,0,0,1,0,0],3));const m=new t.CylinderGeometry(.0075,.0075,.5,3);m.translate(0,.25,0);function y(_,H){const w=new t.TorusGeometry(_,.0075,3,64,H*Math.PI*2);return w.rotateY(Math.PI/2),w.rotateX(Math.PI/2),w}function A(){const _=new t.BufferGeometry;return _.setAttribute("position",new t.Float32BufferAttribute([0,0,0,1,1,1],3)),_}const x={X:[[new t.Mesh(M,a),[.5,0,0],[0,0,-Math.PI/2]],[new t.Mesh(M,a),[-.5,0,0],[0,0,Math.PI/2]],[new t.Mesh(m,a),[0,0,0],[0,0,-Math.PI/2]]],Y:[[new t.Mesh(M,i),[0,.5,0]],[new t.Mesh(M,i),[0,-.5,0],[Math.PI,0,0]],[new t.Mesh(m,i)]],Z:[[new t.Mesh(M,d),[0,0,.5],[Math.PI/2,0,0]],[new t.Mesh(M,d),[0,0,-.5],[-Math.PI/2,0,0]],[new t.Mesh(m,d),null,[Math.PI/2,0,0]]],XYZ:[[new t.Mesh(new t.OctahedronGeometry(.1,0),z.clone()),[0,0,0]]],XY:[[new t.Mesh(new t.BoxGeometry(.15,.15,.01),T.clone()),[.15,.15,0]]],YZ:[[new t.Mesh(new t.BoxGeometry(.15,.15,.01),f.clone()),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new t.Mesh(new t.BoxGeometry(.15,.15,.01),E.clone()),[.15,0,.15],[-Math.PI/2,0,0]]]},ht={X:[[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),o),[.3,0,0],[0,0,-Math.PI/2]],[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),o),[-.3,0,0],[0,0,Math.PI/2]]],Y:[[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),o),[0,.3,0]],[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),o),[0,-.3,0],[0,0,Math.PI]]],Z:[[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),o),[0,0,.3],[Math.PI/2,0,0]],[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),o),[0,0,-.3],[-Math.PI/2,0,0]]],XYZ:[[new t.Mesh(new t.OctahedronGeometry(.2,0),o)]],XY:[[new t.Mesh(new t.BoxGeometry(.2,.2,.01),o),[.15,.15,0]]],YZ:[[new t.Mesh(new t.BoxGeometry(.2,.2,.01),o),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new t.Mesh(new t.BoxGeometry(.2,.2,.01),o),[.15,0,.15],[-Math.PI/2,0,0]]]},ct={START:[[new t.Mesh(new t.OctahedronGeometry(.01,2),s),null,null,null,"helper"]],END:[[new t.Mesh(new t.OctahedronGeometry(.01,2),s),null,null,null,"helper"]],DELTA:[[new t.Line(A(),s),null,null,null,"helper"]],X:[[new t.Line(g,s.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]],Y:[[new t.Line(g,s.clone()),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],"helper"]],Z:[[new t.Line(g,s.clone()),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],"helper"]]},dt={XYZE:[[new t.Mesh(y(.5,1),V),null,[0,Math.PI/2,0]]],X:[[new t.Mesh(y(.5,.5),a)]],Y:[[new t.Mesh(y(.5,.5),i),null,[0,0,-Math.PI/2]]],Z:[[new t.Mesh(y(.5,.5),d),null,[0,Math.PI/2,0]]],E:[[new t.Mesh(y(.75,1),C),null,[0,Math.PI/2,0]]]},pt={AXIS:[[new t.Line(g,s.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]]},mt={XYZE:[[new t.Mesh(new t.SphereGeometry(.25,10,8),o)]],X:[[new t.Mesh(new t.TorusGeometry(.5,.1,4,24),o),[0,0,0],[0,-Math.PI/2,-Math.PI/2]]],Y:[[new t.Mesh(new t.TorusGeometry(.5,.1,4,24),o),[0,0,0],[Math.PI/2,0,0]]],Z:[[new t.Mesh(new t.TorusGeometry(.5,.1,4,24),o),[0,0,0],[0,0,-Math.PI/2]]],E:[[new t.Mesh(new t.TorusGeometry(.75,.1,2,24),o)]]},ut={X:[[new t.Mesh(S,a),[.5,0,0],[0,0,-Math.PI/2]],[new t.Mesh(m,a),[0,0,0],[0,0,-Math.PI/2]],[new t.Mesh(S,a),[-.5,0,0],[0,0,Math.PI/2]]],Y:[[new t.Mesh(S,i),[0,.5,0]],[new t.Mesh(m,i)],[new t.Mesh(S,i),[0,-.5,0],[0,0,Math.PI]]],Z:[[new t.Mesh(S,d),[0,0,.5],[Math.PI/2,0,0]],[new t.Mesh(m,d),[0,0,0],[Math.PI/2,0,0]],[new t.Mesh(S,d),[0,0,-.5],[-Math.PI/2,0,0]]],XY:[[new t.Mesh(new t.BoxGeometry(.15,.15,.01),T),[.15,.15,0]]],YZ:[[new t.Mesh(new t.BoxGeometry(.15,.15,.01),f),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new t.Mesh(new t.BoxGeometry(.15,.15,.01),E),[.15,0,.15],[-Math.PI/2,0,0]]],XYZ:[[new t.Mesh(new t.BoxGeometry(.1,.1,.1),z.clone())]]},ft={X:[[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),o),[.3,0,0],[0,0,-Math.PI/2]],[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),o),[-.3,0,0],[0,0,Math.PI/2]]],Y:[[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),o),[0,.3,0]],[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),o),[0,-.3,0],[0,0,Math.PI]]],Z:[[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),o),[0,0,.3],[Math.PI/2,0,0]],[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),o),[0,0,-.3],[-Math.PI/2,0,0]]],XY:[[new t.Mesh(new t.BoxGeometry(.2,.2,.01),o),[.15,.15,0]]],YZ:[[new t.Mesh(new t.BoxGeometry(.2,.2,.01),o),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new t.Mesh(new t.BoxGeometry(.2,.2,.01),o),[.15,0,.15],[-Math.PI/2,0,0]]],XYZ:[[new t.Mesh(new t.BoxGeometry(.2,.2,.2),o),[0,0,0]]]},_t={X:[[new t.Line(g,s.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]],Y:[[new t.Line(g,s.clone()),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],"helper"]],Z:[[new t.Line(g,s.clone()),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],"helper"]]};function v(_){const H=new t.Object3D;for(const w in _)for(let G=_[w].length;G--;){const u=_[w][G][0].clone(),L=_[w][G][1],R=_[w][G][2],k=_[w][G][3],yt=_[w][G][4];u.name=w,u.tag=yt,L&&u.position.set(L[0],L[1],L[2]),R&&u.rotation.set(R[0],R[1],R[2]),k&&u.scale.set(k[0],k[1],k[2]),u.updateMatrix();const J=u.geometry.clone();J.applyMatrix4(u.matrix),u.geometry=J,u.renderOrder=1/0,u.position.set(0,0,0),u.rotation.set(0,0,0),u.scale.set(1,1,1),H.add(u)}return H}this.gizmo={},this.picker={},this.helper={},this.add(this.gizmo.translate=v(x)),this.add(this.gizmo.rotate=v(dt)),this.add(this.gizmo.scale=v(ut)),this.add(this.picker.translate=v(ht)),this.add(this.picker.rotate=v(mt)),this.add(this.picker.scale=v(ft)),this.add(this.helper.translate=v(ct)),this.add(this.helper.rotate=v(pt)),this.add(this.helper.scale=v(_t)),this.picker.translate.visible=!1,this.picker.rotate.visible=!1,this.picker.scale.visible=!1}updateMatrixWorld(n){const o=(this.mode==="scale"?"local":this.space)==="local"?this.worldQuaternion:F;this.gizmo.translate.visible=this.mode==="translate",this.gizmo.rotate.visible=this.mode==="rotate",this.gizmo.scale.visible=this.mode==="scale",this.helper.translate.visible=this.mode==="translate",this.helper.rotate.visible=this.mode==="rotate",this.helper.scale.visible=this.mode==="scale";let s=[];s=s.concat(this.picker[this.mode].children),s=s.concat(this.gizmo[this.mode].children),s=s.concat(this.helper[this.mode].children);for(let a=0;a<s.length;a++){const i=s[a];i.visible=!0,i.rotation.set(0,0,0),i.position.copy(this.worldPosition);let d;if(this.camera.isOrthographicCamera?d=(this.camera.top-this.camera.bottom)/this.camera.zoom:d=this.worldPosition.distanceTo(this.cameraPosition)*Math.min(1.9*Math.tan(Math.PI*this.camera.fov/360)/this.camera.zoom,7),i.scale.set(1,1,1).multiplyScalar(d*this.size/4),i.tag==="helper"){i.visible=!1,i.name==="AXIS"?(i.visible=!!this.axis,this.axis==="X"&&(c.setFromEuler(q.set(0,0,0)),i.quaternion.copy(o).multiply(c),Math.abs(l.copy(O).applyQuaternion(o).dot(this.eye))>.9&&(i.visible=!1)),this.axis==="Y"&&(c.setFromEuler(q.set(0,0,Math.PI/2)),i.quaternion.copy(o).multiply(c),Math.abs(l.copy(I).applyQuaternion(o).dot(this.eye))>.9&&(i.visible=!1)),this.axis==="Z"&&(c.setFromEuler(q.set(0,Math.PI/2,0)),i.quaternion.copy(o).multiply(c),Math.abs(l.copy(Z).applyQuaternion(o).dot(this.eye))>.9&&(i.visible=!1)),this.axis==="XYZE"&&(c.setFromEuler(q.set(0,Math.PI/2,0)),l.copy(this.rotationAxis),i.quaternion.setFromRotationMatrix(st.lookAt(ot,l,I)),i.quaternion.multiply(c),i.visible=this.dragging),this.axis==="E"&&(i.visible=!1)):i.name==="START"?(i.position.copy(this.worldPositionStart),i.visible=this.dragging):i.name==="END"?(i.position.copy(this.worldPosition),i.visible=this.dragging):i.name==="DELTA"?(i.position.copy(this.worldPositionStart),i.quaternion.copy(this.worldQuaternionStart),p.set(1e-10,1e-10,1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1),p.applyQuaternion(this.worldQuaternionStart.clone().invert()),i.scale.copy(p),i.visible=this.dragging):(i.quaternion.copy(o),this.dragging?i.position.copy(this.worldPositionStart):i.position.copy(this.worldPosition),this.axis&&(i.visible=this.axis.search(i.name)!==-1));continue}i.quaternion.copy(o),this.mode==="translate"||this.mode==="scale"?(i.name==="X"&&Math.abs(l.copy(O).applyQuaternion(o).dot(this.eye))>.99&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="Y"&&Math.abs(l.copy(I).applyQuaternion(o).dot(this.eye))>.99&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="Z"&&Math.abs(l.copy(Z).applyQuaternion(o).dot(this.eye))>.99&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="XY"&&Math.abs(l.copy(Z).applyQuaternion(o).dot(this.eye))<.2&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="YZ"&&Math.abs(l.copy(O).applyQuaternion(o).dot(this.eye))<.2&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="XZ"&&Math.abs(l.copy(I).applyQuaternion(o).dot(this.eye))<.2&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1)):this.mode==="rotate"&&(B.copy(o),l.copy(this.eye).applyQuaternion(c.copy(o).invert()),i.name.search("E")!==-1&&i.quaternion.setFromRotationMatrix(st.lookAt(this.eye,ot,I)),i.name==="X"&&(c.setFromAxisAngle(O,Math.atan2(-l.y,l.z)),c.multiplyQuaternions(B,c),i.quaternion.copy(c)),i.name==="Y"&&(c.setFromAxisAngle(I,Math.atan2(l.x,l.z)),c.multiplyQuaternions(B,c),i.quaternion.copy(c)),i.name==="Z"&&(c.setFromAxisAngle(Z,Math.atan2(l.y,l.x)),c.multiplyQuaternions(B,c),i.quaternion.copy(c))),i.visible=i.visible&&(i.name.indexOf("X")===-1||this.showX),i.visible=i.visible&&(i.name.indexOf("Y")===-1||this.showY),i.visible=i.visible&&(i.name.indexOf("Z")===-1||this.showZ),i.visible=i.visible&&(i.name.indexOf("E")===-1||this.showX&&this.showY&&this.showZ),i.material._color=i.material._color||i.material.color.clone(),i.material._opacity=i.material._opacity||i.material.opacity,i.material.color.copy(i.material._color),i.material.opacity=i.material._opacity,this.enabled&&this.axis&&(i.name===this.axis||this.axis.split("").some(function(f){return i.name===f}))&&(i.material.color.setHex(16776960),i.material.opacity=1)}super.updateMatrixWorld(n)}}class Dt extends t.Mesh{constructor(){super(new t.PlaneGeometry(1e5,1e5,2,2),new t.MeshBasicMaterial({visible:!1,wireframe:!0,side:t.DoubleSide,transparent:!0,opacity:.1,toneMapped:!1})),this.isTransformControlsPlane=!0,this.type="TransformControlsPlane"}updateMatrixWorld(n){let e=this.space;switch(this.position.copy(this.worldPosition),this.mode==="scale"&&(e="local"),W.copy(O).applyQuaternion(e==="local"?this.worldQuaternion:F),X.copy(I).applyQuaternion(e==="local"?this.worldQuaternion:F),Y.copy(Z).applyQuaternion(e==="local"?this.worldQuaternion:F),l.copy(X),this.mode){case"translate":case"scale":switch(this.axis){case"X":l.copy(this.eye).cross(W),b.copy(W).cross(l);break;case"Y":l.copy(this.eye).cross(X),b.copy(X).cross(l);break;case"Z":l.copy(this.eye).cross(Y),b.copy(Y).cross(l);break;case"XY":b.copy(Y);break;case"YZ":b.copy(W);break;case"XZ":l.copy(Y),b.copy(X);break;case"XYZ":case"E":b.set(0,0,0);break}break;case"rotate":default:b.set(0,0,0)}b.length()===0?this.quaternion.copy(this.cameraQuaternion):(rt.lookAt(p.set(0,0,0),b,l),this.quaternion.setFromRotationMatrix(rt)),super.updateMatrixWorld(n)}}class at{constructor(n,e){h(this,"POINTER_DRAG_THRESHOLD",.001);h(this,"name");h(this,"_canvas");h(this,"_scene");h(this,"_controller");h(this,"_pointer");h(this,"_pointerPrimaryDown");h(this,"_pointerMiddleDown");h(this,"_pointerSecondaryDown");h(this,"_lastPointerDown");h(this,"_lastPointerUp");h(this,"_raycaster");h(this,"_intersects");h(this,"_hovered");h(this,"_dragging");h(this,"_dragStart");h(this,"_dragCurrent");h(this,"_dragEnd");h(this,"_dragDelta");h(this,"_draggable");h(this,"_dragRaycastOnObjects");this.name="BaseTool",this._canvas=e.domElement,this._scene=n,this._controller=e,this._pointer=new t.Vector2,this._pointerPrimaryDown=!1,this._pointerMiddleDown=!1,this._pointerSecondaryDown=!1,this._lastPointerDown=new t.Vector2,this._lastPointerUp=new t.Vector2,this._raycaster=new t.Raycaster,this._raycaster.layers.mask=$.PRODUCT_LAYER_MASK|$.UI_LAYER_MASK,this._intersects=[],this._hovered=null,this._dragging=!1,this._dragStart=new t.Vector3,this._dragCurrent=new t.Vector3,this._dragEnd=new t.Vector3,this._dragDelta=new t.Vector3,this._draggable=null,this._dragRaycastOnObjects=null}get _pointerAnyDown(){return this._pointerPrimaryDown||this._pointerMiddleDown||this._pointerSecondaryDown}activate(){}deactivate(){}onPointerDown(n){var e;switch(n.button){case 0:{this._pointerPrimaryDown=!0;break}case 1:{this._pointerMiddleDown=!0;break}case 2:{this._pointerSecondaryDown=!0;break}default:console.warn("DIVEBaseTool.onPointerDown: Unknown button: "+n.button)}this._lastPointerDown.copy(this._pointer),this._draggable=j.findInterface((e=this._intersects[0])==null?void 0:e.object,"isDraggable")||null}onDragStart(n){this._draggable&&(this._dragRaycastOnObjects!==null&&(this._intersects=this._raycaster.intersectObjects(this._dragRaycastOnObjects,!0)),this._intersects.length!==0&&(this._dragStart.copy(this._intersects[0].point.clone()),this._dragCurrent.copy(this._intersects[0].point.clone()),this._dragEnd.copy(this._dragStart.clone()),this._dragDelta.set(0,0,0),this._draggable&&this._draggable.onDragStart&&(this._draggable.onDragStart({dragStart:this._dragStart,dragCurrent:this._dragCurrent,dragEnd:this._dragEnd,dragDelta:this._dragDelta}),this._dragging=!0,this._controller.enabled=!1)))}onPointerMove(n){var o;this._pointer.x=n.offsetX/this._canvas.clientWidth*2-1,this._pointer.y=-(n.offsetY/this._canvas.clientHeight)*2+1,this._raycaster.setFromCamera(this._pointer,this._controller.object),this._intersects=this.raycast(this._scene.children);const e=j.findInterface((o=this._intersects[0])==null?void 0:o.object,"isHoverable");if(this._intersects[0]&&e){if(!this._hovered){e.onPointerEnter&&e.onPointerEnter(this._intersects[0]),this._hovered=e;return}if(this._hovered.uuid!==e.uuid){this._hovered.onPointerLeave&&this._hovered.onPointerLeave(),e.onPointerEnter&&e.onPointerEnter(this._intersects[0]),this._hovered=e;return}e.onPointerOver&&e.onPointerOver(this._intersects[0]),this._hovered=e}else this._hovered&&this._hovered.onPointerLeave&&this._hovered.onPointerLeave(),this._hovered=null;this._pointerAnyDown&&(this._dragging||this.onDragStart(n),this.onDrag(n))}onDrag(n){this._dragRaycastOnObjects!==null&&(this._intersects=this._raycaster.intersectObjects(this._dragRaycastOnObjects,!0));const e=this._intersects[0];e&&(this._dragCurrent.copy(e.point.clone()),this._dragEnd.copy(e.point.clone()),this._dragDelta.subVectors(this._dragCurrent.clone(),this._dragStart.clone()),this._draggable&&this._draggable.onDrag&&this._draggable.onDrag({dragStart:this._dragStart,dragCurrent:this._dragCurrent,dragEnd:this._dragEnd,dragDelta:this._dragDelta}))}onPointerUp(n){switch(this.pointerWasDragged()||this._dragging?this._draggable&&this.onDragEnd(n):this.onClick(n),n.button){case 0:this._pointerPrimaryDown=!1;break;case 1:this._pointerMiddleDown=!1;break;case 2:this._pointerSecondaryDown=!1;break}this._lastPointerUp.copy(this._pointer)}onClick(n){}onDragEnd(n){const e=this._intersects[0];e&&(this._dragEnd.copy(e.point.clone()),this._dragCurrent.copy(e.point.clone()),this._dragDelta.subVectors(this._dragCurrent.clone(),this._dragStart.clone())),this._draggable&&this._draggable.onDragEnd&&this._draggable.onDragEnd({dragStart:this._dragStart,dragCurrent:this._dragCurrent,dragEnd:this._dragEnd,dragDelta:this._dragDelta}),this._draggable=null,this._dragging=!1,this._dragStart.set(0,0,0),this._dragCurrent.set(0,0,0),this._dragEnd.set(0,0,0),this._dragDelta.set(0,0,0),this._controller.enabled=!0}onWheel(n){}raycast(n){return n!==void 0?this._raycaster.intersectObjects(n,!0).filter(e=>e.object.visible):this._raycaster.intersectObjects(this._scene.children,!0).filter(e=>e.object.visible)}pointerWasDragged(){return this._lastPointerDown.distanceTo(this._pointer)>this.POINTER_DRAG_THRESHOLD}}const It=r=>r.isTransformTool!==void 0;class lt extends at{constructor(e,o){super(e,o);h(this,"isTransformTool",!0);h(this,"_scaleLinked");h(this,"_gizmo");this.name="DIVETransformTool",this._scaleLinked=!1,this._gizmo=this.initGizmo(),this._scene.add(this._gizmo)}activate(){}setGizmoMode(e){this._gizmo.mode=e}setGizmoVisible(e){const o=this._scene.children.includes(this._gizmo);e&&!o?(this._scene.add(this._gizmo),"isTransformControls"in this._gizmo&&this._gizmo.getRaycaster().layers.enableAll()):!e&&o&&(this._scene.remove(this._gizmo),"isTransformControls"in this._gizmo&&this._gizmo.getRaycaster().layers.disableAll())}setGizmoScaleLinked(e){this._scaleLinked=e}initGizmo(){const e=new bt(this._controller.object,this._controller.domElement);return e.mode="translate",e.traverse(o=>{if(!("isMesh"in o))return;const s=o.material;o.name==="X"&&s.color.set(Q.AxesColorRed),o.name==="Y"&&s.color.set(Q.AxesColorGreen),o.name==="Z"&&s.color.set(Q.AxesColorBlue),o.name==="XY"&&s.color.set(Q.AxesColorBlue),o.name==="YZ"&&s.color.set(Q.AxesColorRed),o.name==="XZ"&&s.color.set(Q.AxesColorGreen)}),e.addEventListener("mouseDown",()=>{this._controller.enabled=!1,j.implementsInterface(e.object,"isMovable")&&e.object.onMoveStart&&e.object.onMoveStart()}),e.addEventListener("objectChange",()=>{if(j.implementsInterface(e.object,"isMovable")&&e.object.onMove&&(e.object.onMove(),this._scaleLinked)){const o=e.object.scale,s=(o.x+o.y+o.z)/3;e.object.scale.set(s,s,s)}}),e.addEventListener("mouseUp",()=>{this._controller.enabled=!0,j.implementsInterface(e.object,"isMovable")&&e.object.onMoveEnd&&e.object.onMoveEnd()}),e}}const Tt=r=>r.isSelectTool!==void 0;class At extends lt{constructor(e,o){super(e,o);h(this,"isSelectTool",!0);this.name="SelectTool"}activate(){}select(e){this.attachGizmo(e),e.onSelect&&e.onSelect()}deselect(e){this.detachGizmo(),e.onDeselect&&e.onDeselect()}attachGizmo(e){if("isMovable"in e){const o=e;this._gizmo.attach(o),this.setGizmoVisible(o.visible)}}detachGizmo(){this._gizmo.detach()}onClick(e){super.onClick(e);const o=this._raycaster.intersectObjects(this._scene.root.children,!0).filter(a=>a.object.visible)[0],s=j.findInterface(o==null?void 0:o.object,"isSelectable");if(!o||!s){this._gizmo.object&&this.deselect(this._gizmo.object);return}if(this._gizmo.object){if(this._gizmo.object.uuid===s.uuid)return;this.deselect(this._gizmo.object)}this.select(s)}}exports.DIVEBaseTool=at;exports.DIVESelectTool=At;exports.DIVETransformTool=lt;exports.isSelectTool=Tt;exports.isTransformTool=It;
@@ -1 +0,0 @@
1
- "use strict";exports.COORDINATE_LAYER_MASK=2;exports.DEFAULT_LAYER_MASK=1;exports.HELPER_LAYER_MASK=8;exports.PRODUCT_LAYER_MASK=16;exports.UI_LAYER_MASK=4;
@@ -1,8 +0,0 @@
1
- const A = 1, s = 2, _ = 4, E = 8, R = 16;
2
- export {
3
- s as C,
4
- A as D,
5
- E as H,
6
- R as P,
7
- _ as U
8
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="@shopware-ag/dive",i="2.0.1",s="Shopware Spatial Framework",t="module",n="build/dive.cjs",r="build/dive.mjs",d="build/dive.d.ts",o={".":{types:"./build/dive.d.ts",import:"./build/dive.mjs",require:"./build/dive.cjs"},"./animation":{types:"./build/plugins/animation/index.d.ts",import:"./build/plugins/animation/index.mjs",require:"./build/plugins/animation/index.cjs"},"./ar":{types:"./build/plugins/ar/index.d.ts",import:"./build/plugins/ar/index.mjs",require:"./build/plugins/ar/index.cjs"},"./assetcache":{types:"./build/plugins/assetcache/index.d.ts",import:"./build/plugins/assetcache/index.mjs",require:"./build/plugins/assetcache/index.cjs"},"./assetconverter":{types:"./build/plugins/assetconverter/index.d.ts",import:"./build/plugins/assetconverter/index.mjs",require:"./build/plugins/assetconverter/index.cjs"},"./assetexporter":{types:"./build/plugins/assetexporter/index.d.ts",import:"./build/plugins/assetexporter/index.mjs",require:"./build/plugins/assetexporter/index.cjs"},"./assetloader":{types:"./build/plugins/assetloader/index.d.ts",import:"./build/plugins/assetloader/index.mjs",require:"./build/plugins/assetloader/index.cjs"},"./mediacreator":{types:"./build/plugins/mediacreator/index.d.ts",import:"./build/plugins/mediacreator/index.mjs",require:"./build/plugins/mediacreator/index.cjs"},"./orbitcontroller":{types:"./build/plugins/orbitcontroller/index.d.ts",import:"./build/plugins/orbitcontroller/index.mjs",require:"./build/plugins/orbitcontroller/index.cjs"},"./orientationdisplay":{types:"./build/plugins/orientationdisplay/index.d.ts",import:"./build/plugins/orientationdisplay/index.mjs",require:"./build/plugins/orientationdisplay/index.cjs"},"./state":{types:"./build/plugins/state/index.d.ts",import:"./build/plugins/state/index.mjs",require:"./build/plugins/state/index.cjs"},"./systeminfo":{types:"./build/plugins/systeminfo/index.d.ts",import:"./build/plugins/systeminfo/index.mjs",require:"./build/plugins/systeminfo/index.cjs"},"./toolbox":{types:"./build/plugins/toolbox/index.d.ts",import:"./build/plugins/toolbox/index.mjs",require:"./build/plugins/toolbox/index.cjs"}},l=["build","LICENSE","package.json"],p=["dive","shopware","sw6","three","three.js","3d","typescript"],u="git@github.com:shopware/dive.git",a="ffrank <f.frank@shopware.com>",c="MIT",b=["> 1%, not dead, not ie 11, not op_mini all"],g={three:"^0.163.0","@tweenjs/tween.js":"^23.1.1","three-spritetext":"^1.8.2",lodash:"^4.17.21"},m={"@eslint/js":"^9.1.1","@testing-library/jest-dom":"^6.6.3","@types/jest":"^29.5.12","@types/lodash":"^4.17.12","@types/node":"^20.12.7","@types/three":"^0.163.0","@vitest/coverage-v8":"3.1.2",acorn:"^8.14.1","acorn-walk":"^8.3.4",eslint:"^9.1.1",glob:"^11.0.1",globals:"^15.0.0",jsdom:"^26.1.0","log-update":"^6.1.0","magic-string":"^0.30.17",prettier:"^3.3.3","prettier-plugin-multiline-arrays":"^3.0.6","rollup-plugin-copy":"^3.5.0","ts-jest":"^29.1.2","ts-morph":"^25.0.1","ts-node":"^10.9.2",tsc:"^2.0.4",tsx:"^4.19.4",typescript:"^5.8.2","typescript-eslint":"^7.7.1",vite:"^6.2.1","vite-plugin-dts":"^4.5.3","vite-plugin-wasm":"^3.4.1","vite-tsconfig-paths":"^5.1.4",vitest:"^3.1.2"},x={build:"vite build",dev:"vite build --watch",lint:"eslint","prettier:check":"prettier --check .","prettier:fix":"prettier --write .",unit:"vitest --run",coverage:"vitest --coverage --run",docs:"yarn docs:actions","docs:actions":"tsx docs/generators/generate-actions-docs.ts",ci:"yarn && yarn lint && yarn prettier:check && yarn coverage && yarn build"},y={name:e,version:i,description:s,type:t,main:n,module:r,types:d,exports:o,files:l,keywords:p,repository:u,author:a,license:c,browserslist:b,dependencies:g,devDependencies:m,scripts:x};exports.author=a;exports.browserslist=b;exports.default=y;exports.dependencies=g;exports.description=s;exports.devDependencies=m;exports.exports=o;exports.files=l;exports.keywords=p;exports.license=c;exports.main=n;exports.module=r;exports.name=e;exports.repository=u;exports.scripts=x;exports.type=t;exports.types=d;exports.version=i;
@@ -1,39 +0,0 @@
1
- const e = "@shopware-ag/dive", i = "2.0.1", s = "Shopware Spatial Framework", t = "module", n = "build/dive.cjs", r = "build/dive.mjs", d = "build/dive.d.ts", o = { ".": { types: "./build/dive.d.ts", import: "./build/dive.mjs", require: "./build/dive.cjs" }, "./animation": { types: "./build/plugins/animation/index.d.ts", import: "./build/plugins/animation/index.mjs", require: "./build/plugins/animation/index.cjs" }, "./ar": { types: "./build/plugins/ar/index.d.ts", import: "./build/plugins/ar/index.mjs", require: "./build/plugins/ar/index.cjs" }, "./assetcache": { types: "./build/plugins/assetcache/index.d.ts", import: "./build/plugins/assetcache/index.mjs", require: "./build/plugins/assetcache/index.cjs" }, "./assetconverter": { types: "./build/plugins/assetconverter/index.d.ts", import: "./build/plugins/assetconverter/index.mjs", require: "./build/plugins/assetconverter/index.cjs" }, "./assetexporter": { types: "./build/plugins/assetexporter/index.d.ts", import: "./build/plugins/assetexporter/index.mjs", require: "./build/plugins/assetexporter/index.cjs" }, "./assetloader": { types: "./build/plugins/assetloader/index.d.ts", import: "./build/plugins/assetloader/index.mjs", require: "./build/plugins/assetloader/index.cjs" }, "./mediacreator": { types: "./build/plugins/mediacreator/index.d.ts", import: "./build/plugins/mediacreator/index.mjs", require: "./build/plugins/mediacreator/index.cjs" }, "./orbitcontroller": { types: "./build/plugins/orbitcontroller/index.d.ts", import: "./build/plugins/orbitcontroller/index.mjs", require: "./build/plugins/orbitcontroller/index.cjs" }, "./orientationdisplay": { types: "./build/plugins/orientationdisplay/index.d.ts", import: "./build/plugins/orientationdisplay/index.mjs", require: "./build/plugins/orientationdisplay/index.cjs" }, "./state": { types: "./build/plugins/state/index.d.ts", import: "./build/plugins/state/index.mjs", require: "./build/plugins/state/index.cjs" }, "./systeminfo": { types: "./build/plugins/systeminfo/index.d.ts", import: "./build/plugins/systeminfo/index.mjs", require: "./build/plugins/systeminfo/index.cjs" }, "./toolbox": { types: "./build/plugins/toolbox/index.d.ts", import: "./build/plugins/toolbox/index.mjs", require: "./build/plugins/toolbox/index.cjs" } }, l = ["build", "LICENSE", "package.json"], p = ["dive", "shopware", "sw6", "three", "three.js", "3d", "typescript"], u = "git@github.com:shopware/dive.git", a = "ffrank <f.frank@shopware.com>", c = "MIT", b = ["> 1%, not dead, not ie 11, not op_mini all"], g = { three: "^0.163.0", "@tweenjs/tween.js": "^23.1.1", "three-spritetext": "^1.8.2", lodash: "^4.17.21" }, m = { "@eslint/js": "^9.1.1", "@testing-library/jest-dom": "^6.6.3", "@types/jest": "^29.5.12", "@types/lodash": "^4.17.12", "@types/node": "^20.12.7", "@types/three": "^0.163.0", "@vitest/coverage-v8": "3.1.2", acorn: "^8.14.1", "acorn-walk": "^8.3.4", eslint: "^9.1.1", glob: "^11.0.1", globals: "^15.0.0", jsdom: "^26.1.0", "log-update": "^6.1.0", "magic-string": "^0.30.17", prettier: "^3.3.3", "prettier-plugin-multiline-arrays": "^3.0.6", "rollup-plugin-copy": "^3.5.0", "ts-jest": "^29.1.2", "ts-morph": "^25.0.1", "ts-node": "^10.9.2", tsc: "^2.0.4", tsx: "^4.19.4", typescript: "^5.8.2", "typescript-eslint": "^7.7.1", vite: "^6.2.1", "vite-plugin-dts": "^4.5.3", "vite-plugin-wasm": "^3.4.1", "vite-tsconfig-paths": "^5.1.4", vitest: "^3.1.2" }, x = { build: "vite build", dev: "vite build --watch", lint: "eslint", "prettier:check": "prettier --check .", "prettier:fix": "prettier --write .", unit: "vitest --run", coverage: "vitest --coverage --run", docs: "yarn docs:actions", "docs:actions": "tsx docs/generators/generate-actions-docs.ts", ci: "yarn && yarn lint && yarn prettier:check && yarn coverage && yarn build" }, y = {
2
- name: e,
3
- version: i,
4
- description: s,
5
- type: t,
6
- main: n,
7
- module: r,
8
- types: d,
9
- exports: o,
10
- files: l,
11
- keywords: p,
12
- repository: u,
13
- author: a,
14
- license: c,
15
- browserslist: b,
16
- dependencies: g,
17
- devDependencies: m,
18
- scripts: x
19
- };
20
- export {
21
- a as author,
22
- b as browserslist,
23
- y as default,
24
- g as dependencies,
25
- s as description,
26
- m as devDependencies,
27
- o as exports,
28
- l as files,
29
- p as keywords,
30
- c as license,
31
- n as main,
32
- r as module,
33
- e as name,
34
- u as repository,
35
- x as scripts,
36
- t as type,
37
- d as types,
38
- i as version
39
- };
@@ -1,58 +0,0 @@
1
- import { OrbitControllerSettings } from '../plugins/orbitcontroller/index.ts';
2
- import { DIVEEngine, EngineSettings } from '../engine/Engine.ts';
3
- declare global {
4
- interface Window {
5
- DIVE: {
6
- /**
7
- * All instances of DIVE
8
- */
9
- instances: DIVE[];
10
- /**
11
- * Get the first instance of DIVE
12
- */
13
- get instance(): DIVE | undefined;
14
- };
15
- }
16
- }
17
- export type DIVESettings = EngineSettings & {
18
- /** Settings for modules */
19
- useLocalDRACOLoader?: boolean;
20
- } & Partial<OrbitControllerSettings>;
21
- export declare const DIVEDefaultSettings: DIVESettings;
22
- /**
23
- * #### DIVE
24
- * is the main class of the DIVE framework.
25
- *
26
- * An instance of this class delivers a complete 3D environment with a perspective camera, orbit controls, a toolbox, and a communication system.
27
- * ```ts
28
- * import { DIVE } from "@shopware-ag/dive";
29
- *
30
- * const myWrapper = document.getElementById('myWrapper');
31
- *
32
- * const dive = new DIVE();
33
- *
34
- * myWrapper.appendChild(dive.Canvas);
35
- *
36
- * dive.Communication.subscribe('GET_ALL_SCENE_DATA', () => {
37
- * // do something
38
- * }));
39
- *
40
- * dive.Communication.performAction('GET_ALL_SCENE_DATA', {});
41
- * ```
42
- * @module
43
- */
44
- export declare class DIVE {
45
- static QuickView(uri: string, settings?: Partial<DIVESettings & {
46
- lightIntensity?: number;
47
- }>): Promise<DIVE>;
48
- private _instanceId;
49
- private _settings;
50
- get engine(): DIVEEngine;
51
- private _engine;
52
- private orbitController;
53
- private orientationDisplay;
54
- get canvas(): HTMLCanvasElement;
55
- setCanvas(canvas: HTMLCanvasElement): void;
56
- constructor(settings?: Partial<DIVESettings>);
57
- dispose(): Promise<void>;
58
- }
@@ -1 +0,0 @@
1
- export * from './Dive.ts';
@@ -1,28 +0,0 @@
1
- import { DIVEScene } from './scene/Scene.ts';
2
- import { DIVEPerspectiveCamera, DIVEPerspectiveCameraSettings } from './camera/PerspectiveCamera.ts';
3
- import { DIVERenderPipeline, DIVERenderPipelineSettings } from './renderer/Renderer.ts';
4
- import { DIVEClock } from './clock/Clock.ts';
5
- export type EngineSettings = {
6
- /** Whether the engine should start automatically after initialization */
7
- autoStart: boolean;
8
- /** Whether to display coordinate axes in the scene */
9
- displayAxes: boolean;
10
- } & Partial<DIVEPerspectiveCameraSettings> & Partial<DIVERenderPipelineSettings>;
11
- export declare const EngineDefaultSettings: EngineSettings;
12
- export declare class DIVEEngine {
13
- private _renderer;
14
- private _scene;
15
- private _camera;
16
- private _resizeManager;
17
- private _clock;
18
- private _settings;
19
- constructor(settings?: Partial<EngineSettings>);
20
- get scene(): DIVEScene;
21
- get camera(): DIVEPerspectiveCamera;
22
- get renderer(): DIVERenderPipeline;
23
- setCanvas(canvas: HTMLCanvasElement): void;
24
- get clock(): DIVEClock;
25
- start(): void;
26
- stop(): void;
27
- dispose(): void;
28
- }
@@ -1,19 +0,0 @@
1
- import { Scene, Box3, ColorRepresentation } from 'three';
2
- import { DIVERoot } from '../../components/root/Root.ts';
3
- import { DIVEGrid } from '../../components/grid/Grid.ts';
4
- /**
5
- * A basic scene class.
6
- *
7
- * Comes with a root object that contains all the scene objects.
8
- *
9
- * @module
10
- */
11
- export declare class DIVEScene extends Scene {
12
- get root(): DIVERoot;
13
- get grid(): DIVEGrid;
14
- private _root;
15
- private _grid;
16
- constructor();
17
- setBackground(color: ColorRepresentation): void;
18
- computeSceneBB(): Box3;
19
- }
@@ -1,2 +0,0 @@
1
- export * from './src/index.ts';
2
- export * as TWEEN from '@tweenjs/tween.js';
@@ -1,4 +0,0 @@
1
- export * from './src/ARSystem.ts';
2
- export * from './src/arquicklook/ARQuickLook.ts';
3
- export * from './src/sceneviewer/SceneViewer.ts';
4
- export * from './src/error/ar-errors.ts';
@@ -1 +0,0 @@
1
- export * from './src/index.ts';
@@ -1 +0,0 @@
1
- export * from './src/AssetConverter.ts';
@@ -1 +0,0 @@
1
- export * from './src/AssetExporter.ts';
@@ -1,3 +0,0 @@
1
- export * from './src/loader/AssetLoader.ts';
2
- export * from './src/draco/DracoLoader.ts';
3
- export * from './src/draco/worker/DracoWorker.js';
@@ -1,2 +0,0 @@
1
- export { MediaCreator } from './src/MediaCreator.ts';
2
- export * from './types/index.ts';
@@ -1 +0,0 @@
1
- export * from './src/OrbitController.ts';
@@ -1,45 +0,0 @@
1
- import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js';
2
- import { Vector3Like } from 'three/src/math/Vector3.js';
3
- import { Object3D } from 'three/src/core/Object3D.js';
4
- import { DIVEPerspectiveCamera, DIVETicker } from '../../../index.ts';
5
- import { BoundingBox } from 'src/components/boundingbox/BoundingBox.ts';
6
- export type OrbitControllerSettings = {
7
- /** Whether to enable damping for smooth camera movement */
8
- enableDamping: boolean;
9
- /** Damping factor for camera movement */
10
- dampingFactor: number;
11
- };
12
- export declare const OrbitControllerDefaultSettings: Required<OrbitControllerSettings>;
13
- /**
14
- * Orbit Controls. Basic functionality to orbit around a given target point in the scene.
15
- *
16
- * @module
17
- */
18
- export declare class OrbitController extends OrbitControls implements DIVETicker {
19
- domElement: HTMLCanvasElement;
20
- static readonly DEFAULT_ZOOM_FACTOR = 1;
21
- uuid: string;
22
- object: DIVEPerspectiveCamera;
23
- constructor(camera: DIVEPerspectiveCamera, domElement: HTMLCanvasElement, settings?: Partial<OrbitControllerSettings>);
24
- tick(): void;
25
- /**
26
- * Computes the camera position and target to perfectly fit a bounding sphere into the camera's frustum.
27
- * This robust approach ensures the entire object is always visible, regardless of rotation or aspect ratio.
28
- *
29
- * @param bb - The bounding box to encompass
30
- * @param padding - Optional padding factor to add space around the object depending on the object's bounding sphere diameter (default: 0.0 = no padding)
31
- * @returns Object containing the calculated camera position and target
32
- */
33
- computeEncompassingView(bb: BoundingBox, padding?: number): {
34
- position: Vector3Like;
35
- target: Vector3Like;
36
- };
37
- /**
38
- * Focus the camera on a specific object by computing its bounding box
39
- * @param object - The object to focus on
40
- * @param padding - Optional padding factor to add space around the object depending on the object's bounding sphere diameter (default: 0.0 = no padding)
41
- */
42
- focusOnObject(object: Object3D, padding?: number): void;
43
- zoomIn(by?: number): void;
44
- zoomOut(by?: number): void;
45
- }
@@ -1,2 +0,0 @@
1
- export * from './src/OrientationDisplay.ts';
2
- export * from './src/axes/Axes.ts';
@@ -1,4 +0,0 @@
1
- export * from './src/State.ts';
2
- export * from './src/actions/index.ts';
3
- export * from './src/ActionRegistry.ts';
4
- export * from './types/index.ts';
@@ -1,2 +0,0 @@
1
- export { SystemInfo, EBrowser } from './src/SystemInfo.ts';
2
- export { ESystem, EWebXRUnsupportedReason } from './types/index.ts';
@@ -1,5 +0,0 @@
1
- export * from './src/Toolbox.ts';
2
- export * from './src/BaseTool.ts';
3
- export * from './src/select/SelectTool.ts';
4
- export * from './src/transform/TransformTool.ts';
5
- export * from './types/index.ts';
File without changes
File without changes
File without changes
File without changes
File without changes