@shopware-ag/dive 1.19.1-beta.9 → 2.0.1-beta.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 (218) hide show
  1. package/build/chunks/FileTypes-BjZ0rrIV.cjs +1 -0
  2. package/build/chunks/FileTypes-qgYnI0Jg.mjs +30 -0
  3. package/build/chunks/ModuleRegistry-NyNtjHb2.cjs +1 -0
  4. package/build/chunks/ModuleRegistry-RSub8W0G.mjs +13 -0
  5. package/build/chunks/PerspectiveCamera-BByyG5R4.cjs +1 -0
  6. package/build/chunks/PerspectiveCamera-sm4_81KJ.mjs +34 -0
  7. package/build/chunks/SelectTool-BRKko7uz.cjs +1 -0
  8. package/build/chunks/SelectTool-mTRiZYaC.mjs +712 -0
  9. package/build/chunks/{SystemInfo-DYq9x4Ch.mjs → SystemInfo-DPAQG-S5.mjs} +37 -40
  10. package/build/chunks/SystemInfo-oX-NNneO.cjs +1 -0
  11. package/build/chunks/VisibilityLayerMask-BI7jPKdx.cjs +1 -0
  12. package/build/chunks/VisibilityLayerMask-CXgt1fJc.mjs +8 -0
  13. package/build/chunks/findInterface-BEdL2iUQ.cjs +1 -0
  14. package/build/chunks/findInterface-OrXgmwxj.mjs +18 -0
  15. package/build/chunks/index-C_uFFwT2.mjs +5 -0
  16. package/build/chunks/index-DAwIH9xh.cjs +1 -0
  17. package/build/chunks/package-BFpY3sIj.cjs +1 -0
  18. package/build/chunks/package-BvoZkrge.mjs +39 -0
  19. package/build/chunks/{fflate.module-Chbb_O8w.cjs → parse-error-2f5qpXP5.cjs} +2 -3
  20. package/build/chunks/{fflate.module-BQhIETD7.mjs → parse-error-DRBVHL9E.mjs} +16 -17
  21. package/build/dive.cjs +30 -0
  22. package/build/dive.mjs +1757 -0
  23. package/build/src/components/gizmo/Gizmo.d.ts +4 -4
  24. package/build/src/components/gizmo/handles/AxisHandle.d.ts +4 -4
  25. package/build/src/components/gizmo/handles/RadialHandle.d.ts +4 -4
  26. package/build/src/components/gizmo/handles/ScaleHandle.d.ts +4 -4
  27. package/build/src/components/gizmo/plane/GizmoPlane.d.ts +1 -1
  28. package/build/src/components/gizmo/rotate/RotateGizmo.d.ts +4 -4
  29. package/build/src/components/gizmo/scale/ScaleGizmo.d.ts +5 -5
  30. package/build/src/components/gizmo/translate/TranslateGizmo.d.ts +4 -4
  31. package/build/src/components/light/PointLight.d.ts +3 -3
  32. package/build/src/components/model/Model.d.ts +2 -2
  33. package/build/src/components/node/Node.d.ts +4 -4
  34. package/build/src/components/primitive/Primitive.d.ts +1 -1
  35. package/build/src/components/root/Root.d.ts +2 -1
  36. package/build/src/core/Dive.d.ts +23 -11
  37. package/build/src/engine/Engine.d.ts +6 -6
  38. package/build/src/engine/clock/Clock.d.ts +4 -0
  39. package/build/src/engine/renderer/Renderer.d.ts +12 -8
  40. package/build/src/engine/resize/ResizeManager.d.ts +4 -2
  41. package/build/src/engine/scene/Scene.d.ts +4 -4
  42. package/build/src/engine/scene/xrroot/XRRoot.d.ts +5 -5
  43. package/build/src/engine/scene/xrroot/xrlightroot/XRLightRoot.d.ts +3 -3
  44. package/build/src/helpers/findSceneRecursive/findSceneRecursive.d.ts +1 -1
  45. package/build/src/helpers/isFileTypeSupported/isFileTypeSupported.d.ts +1 -1
  46. package/build/src/index.d.ts +6 -9
  47. package/build/src/interfaces/Draggable.d.ts +1 -1
  48. package/build/src/modules/ModuleRegistry.d.ts +19 -0
  49. package/build/src/modules/animation/AnimationSystem.cjs +1 -0
  50. package/build/src/modules/animation/AnimationSystem.d.ts +28 -4
  51. package/build/src/modules/animation/AnimationSystem.mjs +95 -0
  52. package/build/src/modules/animation/animator/Animator.d.ts +26 -0
  53. package/build/src/modules/animation/types/AnimatorParameters.d.ts +7 -0
  54. package/build/src/modules/ar/ARSystem.cjs +1 -2
  55. package/build/src/modules/ar/ARSystem.mjs +5 -5
  56. package/build/src/modules/ar/arquicklook/ARQuickLook.d.ts +1 -1
  57. package/build/src/modules/ar/sceneviewer/SceneViewer.d.ts +1 -1
  58. package/build/src/modules/ar/webxr/WebXR.d.ts +3 -3
  59. package/build/src/modules/ar/webxr/controller/WebXRController.d.ts +3 -3
  60. package/build/src/modules/ar/webxr/origin/WebXROrigin.d.ts +2 -2
  61. package/build/src/modules/ar/webxr/raycaster/WebXRRaycaster.d.ts +4 -4
  62. package/build/src/modules/ar/webxr/raycaster/ar/WebXRRaycasterAR.d.ts +3 -3
  63. package/build/src/modules/ar/webxr/raycaster/three/WebXRRaycasterTHREE.d.ts +4 -4
  64. package/build/src/modules/ar/webxr/touchscreencontrols/WebXRTouchscreenControls.d.ts +1 -1
  65. package/build/src/modules/asset/converter/AssetConverter.cjs +0 -1
  66. package/build/src/modules/asset/converter/AssetConverter.d.ts +3 -3
  67. package/build/src/modules/asset/converter/AssetConverter.mjs +0 -1
  68. package/build/src/modules/asset/exporter/AssetExporter.cjs +1 -2
  69. package/build/src/modules/asset/exporter/AssetExporter.d.ts +3 -3
  70. package/build/src/modules/asset/exporter/AssetExporter.mjs +1 -2
  71. package/build/src/modules/asset/loader/AssetLoader.cjs +2 -2
  72. package/build/src/modules/asset/loader/AssetLoader.mjs +1917 -5
  73. package/build/src/modules/axiscamera/AxisCamera.d.ts +8 -9
  74. package/build/src/modules/controller/orbit/OrbitController.d.ts +13 -24
  75. package/build/src/modules/mediacreator/MediaCreator.cjs +1 -2
  76. package/build/src/modules/mediacreator/MediaCreator.d.ts +4 -4
  77. package/build/src/modules/mediacreator/MediaCreator.mjs +28 -3
  78. package/build/src/modules/state/ActionRegistry.d.ts +26 -0
  79. package/build/src/modules/state/State.cjs +27 -0
  80. package/build/src/modules/state/State.d.ts +58 -0
  81. package/build/src/modules/state/State.mjs +4271 -0
  82. package/build/src/modules/state/actions/action.d.ts +36 -0
  83. package/build/src/modules/state/actions/ar/index.d.ts +1 -0
  84. package/build/src/modules/state/actions/ar/launchar.d.ts +15 -0
  85. package/build/src/modules/state/actions/camera/computeencompassingview.d.ts +12 -0
  86. package/build/src/modules/state/actions/camera/getcameratransform.d.ts +12 -0
  87. package/build/src/modules/state/actions/camera/index.d.ts +6 -0
  88. package/build/src/modules/state/actions/camera/lockcamera.d.ts +8 -0
  89. package/build/src/modules/state/actions/camera/movecamera.d.ts +29 -0
  90. package/build/src/modules/state/actions/camera/setcameralayer.d.ts +12 -0
  91. package/build/src/modules/state/actions/camera/setcameratransform.d.ts +15 -0
  92. package/build/src/modules/state/actions/camera/zoomcamera.d.ts +14 -0
  93. package/build/src/modules/state/actions/index.d.ts +7 -0
  94. package/build/src/modules/state/actions/media/generatemedia.d.ts +25 -0
  95. package/build/src/modules/state/actions/media/index.d.ts +1 -0
  96. package/build/src/modules/state/actions/object/addobject.d.ts +8 -0
  97. package/build/src/modules/state/actions/object/deleteobject.d.ts +12 -0
  98. package/build/src/modules/state/actions/object/deselectobject.d.ts +12 -0
  99. package/build/src/modules/state/actions/object/dropit.d.ts +12 -0
  100. package/build/src/modules/state/actions/object/getallobjects.d.ts +8 -0
  101. package/build/src/modules/state/actions/object/getobjects.d.ts +12 -0
  102. package/build/src/modules/state/actions/object/index.d.ts +11 -0
  103. package/build/src/modules/state/actions/object/modelloaded.d.ts +12 -0
  104. package/build/src/modules/state/actions/object/placeonfloor.d.ts +12 -0
  105. package/build/src/modules/state/actions/object/selectobject.d.ts +12 -0
  106. package/build/src/modules/state/actions/object/setparent.d.ts +22 -0
  107. package/build/src/modules/state/actions/object/updateobject.d.ts +12 -0
  108. package/build/src/modules/state/actions/renderer/index.d.ts +1 -0
  109. package/build/src/modules/state/actions/renderer/startrender.d.ts +8 -0
  110. package/build/src/modules/state/actions/scene/exportscene.d.ts +13 -0
  111. package/build/src/modules/state/actions/scene/getallscenedata.d.ts +9 -0
  112. package/build/src/modules/state/actions/scene/index.d.ts +4 -0
  113. package/build/src/modules/state/actions/scene/setbackground.d.ts +12 -0
  114. package/build/src/modules/state/actions/scene/updatescene.d.ts +20 -0
  115. package/build/src/modules/state/actions/toolbox/index.d.ts +4 -0
  116. package/build/src/modules/state/actions/toolbox/setgizmomode.d.ts +12 -0
  117. package/build/src/modules/state/actions/toolbox/setgizmoscalelinked.d.ts +8 -0
  118. package/build/src/modules/state/actions/toolbox/setgizmovisible.d.ts +8 -0
  119. package/build/src/modules/state/actions/toolbox/usetool.d.ts +13 -0
  120. package/build/src/modules/state/types/ActionTypes.d.ts +18 -0
  121. package/build/src/modules/{com → state}/types/COMBaseEntity.d.ts +1 -1
  122. package/build/src/modules/state/types/COMEntity.d.ts +6 -0
  123. package/build/src/modules/{com → state}/types/COMGeometry.d.ts +1 -1
  124. package/build/src/modules/{com → state}/types/COMGroup.d.ts +3 -1
  125. package/build/src/modules/{com → state}/types/COMLight.d.ts +3 -1
  126. package/build/src/modules/{com → state}/types/COMModel.d.ts +4 -2
  127. package/build/src/modules/state/types/COMPov.d.ts +9 -0
  128. package/build/src/modules/state/types/COMPrimitive.d.ts +13 -0
  129. package/build/src/modules/state/types/index.d.ts +11 -0
  130. package/build/src/modules/systeminfo/SystemInfo.cjs +1 -2
  131. package/build/src/modules/systeminfo/SystemInfo.d.ts +1 -1
  132. package/build/src/modules/systeminfo/SystemInfo.mjs +3 -3
  133. package/build/src/modules/toolbox/BaseTool.d.ts +6 -6
  134. package/build/src/modules/toolbox/Toolbox.cjs +1 -0
  135. package/build/src/modules/toolbox/Toolbox.d.ts +12 -8
  136. package/build/src/modules/toolbox/Toolbox.mjs +99 -0
  137. package/build/src/modules/toolbox/select/SelectTool.d.ts +6 -6
  138. package/build/src/modules/toolbox/transform/TransformTool.d.ts +6 -6
  139. package/build/src/types/SceneData.d.ts +1 -1
  140. package/build/src/types/SceneObjects.d.ts +6 -6
  141. package/build/src/types/SceneType.d.ts +1 -1
  142. package/build/src/types/UUID.d.ts +1 -0
  143. package/build/src/types/file/index.d.ts +1 -1
  144. package/build/src/types/index.d.ts +6 -6
  145. package/package.json +33 -23
  146. package/build/chunks/AssetLoader-BYhwzCxs.cjs +0 -3
  147. package/build/chunks/AssetLoader-BYhwzCxs.cjs.map +0 -1
  148. package/build/chunks/AssetLoader-Bmcx40wo.mjs +0 -1948
  149. package/build/chunks/AssetLoader-Bmcx40wo.mjs.map +0 -1
  150. package/build/chunks/MediaCreator-CAXBbn15.mjs +0 -59
  151. package/build/chunks/MediaCreator-CAXBbn15.mjs.map +0 -1
  152. package/build/chunks/MediaCreator-DDXQIlRv.cjs +0 -2
  153. package/build/chunks/MediaCreator-DDXQIlRv.cjs.map +0 -1
  154. package/build/chunks/SystemInfo--669uW1p.cjs +0 -2
  155. package/build/chunks/SystemInfo--669uW1p.cjs.map +0 -1
  156. package/build/chunks/SystemInfo-DYq9x4Ch.mjs.map +0 -1
  157. package/build/chunks/fflate.module-BQhIETD7.mjs.map +0 -1
  158. package/build/chunks/fflate.module-Chbb_O8w.cjs.map +0 -1
  159. package/build/index.cjs +0 -57
  160. package/build/index.cjs.map +0 -1
  161. package/build/index.mjs +0 -6793
  162. package/build/index.mjs.map +0 -1
  163. package/build/src/engine/index.d.ts +0 -1
  164. package/build/src/engine/pipeline/RenderPipeline.d.ts +0 -26
  165. package/build/src/error/index.d.ts +0 -4
  166. package/build/src/modules/_system/ModuleImporter.d.ts +0 -43
  167. package/build/src/modules/ar/ARSystem.cjs.map +0 -1
  168. package/build/src/modules/ar/ARSystem.mjs.map +0 -1
  169. package/build/src/modules/asset/converter/AssetConverter.cjs.map +0 -1
  170. package/build/src/modules/asset/converter/AssetConverter.mjs.map +0 -1
  171. package/build/src/modules/asset/exporter/AssetExporter.cjs.map +0 -1
  172. package/build/src/modules/asset/exporter/AssetExporter.mjs.map +0 -1
  173. package/build/src/modules/asset/loader/AssetLoader.cjs.map +0 -1
  174. package/build/src/modules/asset/loader/AssetLoader.mjs.map +0 -1
  175. package/build/src/modules/com/Communication.d.ts +0 -72
  176. package/build/src/modules/com/actions/camera/computeencompassingview.d.ts +0 -9
  177. package/build/src/modules/com/actions/camera/getcameratransform.d.ts +0 -9
  178. package/build/src/modules/com/actions/camera/movecamera.d.ts +0 -15
  179. package/build/src/modules/com/actions/camera/resetcamera.d.ts +0 -7
  180. package/build/src/modules/com/actions/camera/setcameralayer.d.ts +0 -7
  181. package/build/src/modules/com/actions/camera/setcameratransform.d.ts +0 -9
  182. package/build/src/modules/com/actions/camera/zoomcamera.d.ts +0 -8
  183. package/build/src/modules/com/actions/index.d.ts +0 -60
  184. package/build/src/modules/com/actions/media/generatemedia.d.ts +0 -14
  185. package/build/src/modules/com/actions/object/addobject.d.ts +0 -6
  186. package/build/src/modules/com/actions/object/deleteobject.d.ts +0 -8
  187. package/build/src/modules/com/actions/object/deselectobject.d.ts +0 -8
  188. package/build/src/modules/com/actions/object/getallobjects.d.ts +0 -6
  189. package/build/src/modules/com/actions/object/getobjects.d.ts +0 -8
  190. package/build/src/modules/com/actions/object/model/dropit.d.ts +0 -7
  191. package/build/src/modules/com/actions/object/model/modelloaded.d.ts +0 -7
  192. package/build/src/modules/com/actions/object/model/placeonfloor.d.ts +0 -7
  193. package/build/src/modules/com/actions/object/selectobject.d.ts +0 -8
  194. package/build/src/modules/com/actions/object/setparent.d.ts +0 -13
  195. package/build/src/modules/com/actions/object/updateobject.d.ts +0 -8
  196. package/build/src/modules/com/actions/renderer/startrender.d.ts +0 -5
  197. package/build/src/modules/com/actions/scene/exportscene.d.ts +0 -8
  198. package/build/src/modules/com/actions/scene/getallscenedata.d.ts +0 -6
  199. package/build/src/modules/com/actions/scene/launchar.d.ts +0 -9
  200. package/build/src/modules/com/actions/scene/setbackground.d.ts +0 -7
  201. package/build/src/modules/com/actions/scene/updatescene.d.ts +0 -11
  202. package/build/src/modules/com/actions/toolbox/select/setgizmomode.d.ts +0 -7
  203. package/build/src/modules/com/actions/toolbox/transform/setgizmoscalelinked.d.ts +0 -5
  204. package/build/src/modules/com/actions/toolbox/transform/setgizmovisible.d.ts +0 -5
  205. package/build/src/modules/com/actions/toolbox/usetool.d.ts +0 -8
  206. package/build/src/modules/com/types/COMEntity.d.ts +0 -6
  207. package/build/src/modules/com/types/COMPov.d.ts +0 -7
  208. package/build/src/modules/com/types/COMPrimitive.d.ts +0 -11
  209. package/build/src/modules/com/types/index.d.ts +0 -11
  210. package/build/src/modules/index.d.ts +0 -2
  211. package/build/src/modules/mediacreator/MediaCreator.cjs.map +0 -1
  212. package/build/src/modules/mediacreator/MediaCreator.mjs.map +0 -1
  213. package/build/src/modules/systeminfo/SystemInfo.cjs.map +0 -1
  214. package/build/src/modules/systeminfo/SystemInfo.mjs.map +0 -1
  215. /package/build/{index.d.ts → dive.d.ts} +0 -0
  216. /package/build/src/modules/{com → state}/types/COMEntityType.d.ts +0 -0
  217. /package/build/src/modules/{com → state}/types/COMGeometryType.d.ts +0 -0
  218. /package/build/src/modules/{com → state}/types/COMMaterial.d.ts +0 -0
@@ -1,7 +1,7 @@
1
1
  import { Euler, Object3D, Vector3 } from 'three';
2
- import { DIVEOrbitController } from '../../modules/controller/orbit/OrbitController';
3
- import { DIVEGizmoPlane as DIVEGizmoPlane } from './plane/GizmoPlane';
4
- import { DIVESelectable } from '../../interfaces/Selectable';
2
+ import { OrbitController } from '../../modules/controller/orbit/OrbitController.ts';
3
+ import { DIVEGizmoPlane as DIVEGizmoPlane } from './plane/GizmoPlane.ts';
4
+ import { DIVESelectable } from '../../interfaces/Selectable.ts';
5
5
  export type DIVEGizmoMode = 'translate' | 'rotate' | 'scale';
6
6
  export type DIVEGizmoAxis = 'x' | 'y' | 'z';
7
7
  export declare class DIVEGizmo extends Object3D {
@@ -18,7 +18,7 @@ export declare class DIVEGizmo extends Object3D {
18
18
  get gizmoPlane(): DIVEGizmoPlane;
19
19
  private _object;
20
20
  get object(): (Object3D & DIVESelectable) | null;
21
- constructor(controller: DIVEOrbitController);
21
+ constructor(controller: OrbitController);
22
22
  attach(object: Object3D & DIVESelectable): this;
23
23
  detach(): this;
24
24
  onHover(mode: DIVEGizmoMode, axis: DIVEGizmoAxis, value: boolean): void;
@@ -1,8 +1,8 @@
1
1
  import { ColorRepresentation, Object3D, Vector3 } from 'three';
2
- import { DIVEHoverable } from '../../../interfaces/Hoverable';
3
- import { DIVETranslateGizmo } from '../translate/TranslateGizmo';
4
- import { DIVEDraggable } from '../../../interfaces/Draggable';
5
- import { DraggableEvent } from '../../../modules/toolbox/BaseTool';
2
+ import { DIVEHoverable } from '../../../interfaces/Hoverable.ts';
3
+ import { DIVETranslateGizmo } from '../translate/TranslateGizmo.ts';
4
+ import { DIVEDraggable } from '../../../interfaces/Draggable.ts';
5
+ import { DraggableEvent } from '../../../modules/toolbox/BaseTool.ts';
6
6
  export declare class DIVEAxisHandle extends Object3D implements DIVEHoverable, DIVEDraggable {
7
7
  readonly isHoverable: true;
8
8
  readonly isDraggable: true;
@@ -1,8 +1,8 @@
1
1
  import { ColorRepresentation, Object3D, Vector3 } from 'three';
2
- import { DIVEHoverable } from '../../../interfaces/Hoverable';
3
- import { DraggableEvent } from '../../../modules/toolbox/BaseTool';
4
- import { DIVERotateGizmo } from '../rotate/RotateGizmo';
5
- import { DIVEDraggable } from '../../../interfaces/Draggable';
2
+ import { DIVEHoverable } from '../../../interfaces/Hoverable.ts';
3
+ import { DraggableEvent } from '../../../modules/toolbox/BaseTool.ts';
4
+ import { DIVERotateGizmo } from '../rotate/RotateGizmo.ts';
5
+ import { DIVEDraggable } from '../../../interfaces/Draggable.ts';
6
6
  export declare class DIVERadialHandle extends Object3D implements DIVEHoverable, DIVEDraggable {
7
7
  readonly isHoverable: true;
8
8
  readonly isDraggable: true;
@@ -1,8 +1,8 @@
1
1
  import { ColorRepresentation, Object3D, Vector3 } from 'three';
2
- import { DIVEHoverable } from '../../../interfaces/Hoverable';
3
- import { DIVEScaleGizmo } from '../scale/ScaleGizmo';
4
- import { DIVEDraggable } from '../../../interfaces/Draggable';
5
- import { DraggableEvent } from '../../../modules/toolbox/BaseTool';
2
+ import { DIVEHoverable } from '../../../interfaces/Hoverable.ts';
3
+ import { DIVEScaleGizmo } from '../scale/ScaleGizmo.ts';
4
+ import { DIVEDraggable } from '../../../interfaces/Draggable.ts';
5
+ import { DraggableEvent } from '../../../modules/toolbox/BaseTool.ts';
6
6
  export declare class DIVEScaleHandle extends Object3D implements DIVEHoverable, DIVEDraggable {
7
7
  readonly isHoverable: true;
8
8
  readonly isDraggable: true;
@@ -1,5 +1,5 @@
1
1
  import { Mesh, Object3D } from 'three';
2
- import { DIVEGizmoAxis, DIVEGizmoMode } from '../Gizmo';
2
+ import { DIVEGizmoAxis, DIVEGizmoMode } from '../Gizmo.ts';
3
3
  export declare class DIVEGizmoPlane extends Object3D {
4
4
  private _meshX;
5
5
  get XPlane(): Mesh;
@@ -1,13 +1,13 @@
1
1
  import { Object3D } from 'three';
2
- import { DIVEOrbitController } from '../../../modules/controller/orbit/OrbitController';
3
- import { DIVERadialHandle } from '../handles/RadialHandle';
4
- import { DraggableEvent } from '../../../modules/toolbox/BaseTool';
2
+ import { OrbitController } from '../../../modules/controller/orbit/OrbitController.ts';
3
+ import { DIVERadialHandle } from '../handles/RadialHandle.ts';
4
+ import { DraggableEvent } from '../../../modules/toolbox/BaseTool.ts';
5
5
  export declare class DIVERotateGizmo extends Object3D {
6
6
  children: DIVERadialHandle[];
7
7
  private _controller;
8
8
  set debug(value: boolean);
9
9
  private _startRot;
10
- constructor(controller: DIVEOrbitController);
10
+ constructor(controller: OrbitController);
11
11
  reset(): void;
12
12
  private handleHighlight;
13
13
  onHandleHover(handle: DIVERadialHandle, value: boolean): void;
@@ -1,15 +1,15 @@
1
1
  import { Object3D, Vector3 } from 'three';
2
- import { DIVEHoverable } from '../../../interfaces/Hoverable';
3
- import { DIVEOrbitController } from '../../../modules/controller/orbit/OrbitController';
4
- import { DIVEScaleHandle } from '../handles/ScaleHandle';
5
- import { DraggableEvent } from '../../../modules/toolbox/BaseTool';
2
+ import { DIVEHoverable } from '../../../interfaces/Hoverable.ts';
3
+ import { OrbitController } from '../../../modules/controller/orbit/OrbitController.ts';
4
+ import { DIVEScaleHandle } from '../handles/ScaleHandle.ts';
5
+ import { DraggableEvent } from '../../../modules/toolbox/BaseTool.ts';
6
6
  export declare class DIVEScaleGizmo extends Object3D implements DIVEHoverable {
7
7
  readonly isHoverable: true;
8
8
  children: DIVEScaleHandle[];
9
9
  private _controller;
10
10
  set debug(value: boolean);
11
11
  private _startScale;
12
- constructor(controller: DIVEOrbitController);
12
+ constructor(controller: OrbitController);
13
13
  reset(): void;
14
14
  update(scale: Vector3): void;
15
15
  private handleHighlight;
@@ -1,13 +1,13 @@
1
1
  import { Object3D } from 'three';
2
- import { DIVEOrbitController } from '../../../modules/controller/orbit/OrbitController';
3
- import { DIVEAxisHandle } from '../handles/AxisHandle';
4
- import { DraggableEvent } from '../../../modules/toolbox/BaseTool';
2
+ import { OrbitController } from '../../../modules/controller/orbit/OrbitController.ts';
3
+ import { DIVEAxisHandle } from '../handles/AxisHandle.ts';
4
+ import { DraggableEvent } from '../../../modules/toolbox/BaseTool.ts';
5
5
  export declare class DIVETranslateGizmo extends Object3D {
6
6
  private _controller;
7
7
  set debug(value: boolean);
8
8
  children: DIVEAxisHandle[];
9
9
  private _startPos;
10
- constructor(controller: DIVEOrbitController);
10
+ constructor(controller: OrbitController);
11
11
  reset(): void;
12
12
  private handleHighlight;
13
13
  onHandleHover(handle: DIVEAxisHandle, value: boolean): void;
@@ -1,7 +1,7 @@
1
1
  import { Color, Object3D } from 'three';
2
- import { DIVEMovable } from '../../interfaces/Movable';
3
- import { DIVESelectable } from '../../interfaces/Selectable';
4
- import { TransformControls } from 'three/examples/jsm/controls/TransformControls';
2
+ import { DIVEMovable } from '../../interfaces/Movable.ts';
3
+ import { DIVESelectable } from '../../interfaces/Selectable.ts';
4
+ import { TransformControls } from 'three/examples/jsm/controls/TransformControls.ts';
5
5
  /**
6
6
  * A basic point light.
7
7
  *
@@ -1,6 +1,6 @@
1
1
  import { Object3D } from 'three';
2
- import { COMMaterial } from '../../modules/com/types/index.ts';
3
- import { DIVENode } from '../node/Node';
2
+ import { COMMaterial } from '../../modules/state/types/index.ts';
3
+ import { DIVENode } from '../node/Node.ts';
4
4
  /**
5
5
  * A basic model class.
6
6
  *
@@ -1,8 +1,8 @@
1
1
  import { Box3, Object3D, Vector3, Vector3Like } from 'three';
2
- import { DIVEMovable } from '../../interfaces/Movable';
3
- import { DIVESelectable } from '../../interfaces/Selectable';
4
- import { TransformControls } from 'three/examples/jsm/controls/TransformControls';
5
- declare const DIVENode_base: new () => Object3D<import('three').Object3DEventMap> & DIVEMovable & DIVESelectable;
2
+ import { DIVEMovable } from '../../interfaces/Movable.ts';
3
+ import { DIVESelectable } from '../../interfaces/Selectable.ts';
4
+ import { TransformControls } from 'three/examples/jsm/controls/TransformControls.ts';
5
+ declare const DIVENode_base: new () => Object3D<import('three').Object3DEventMap> & DIVESelectable & DIVEMovable;
6
6
  export declare class DIVENode extends DIVENode_base {
7
7
  readonly isDIVENode: true;
8
8
  gizmo: TransformControls | null;
@@ -1,5 +1,5 @@
1
1
  import { DIVENode } from '../node/Node.ts';
2
- import { COMGeometry, COMMaterial } from '../../modules/com/types/index.ts';
2
+ import { COMGeometry, COMMaterial } from '../../modules/state/types/index.ts';
3
3
  /**
4
4
  * A basic model class.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  import { Box3, Object3D } from 'three';
2
- import { COMEntity } from '../../modules/com/types/index.ts';
2
+ import { COMEntity } from '../../modules/state/types/index.ts';
3
3
  import { DIVESceneObject } from '../../types/index.ts';
4
4
  import { DIVEFloor } from '../floor/Floor.ts';
5
5
  /**
@@ -12,6 +12,7 @@ export declare class DIVERoot extends Object3D {
12
12
  get floor(): DIVEFloor;
13
13
  private _floor;
14
14
  private _assetLoader;
15
+ private _getAssetLoader;
15
16
  constructor();
16
17
  ComputeSceneBB(): Box3;
17
18
  GetSceneObject<T extends DIVESceneObject>(object: Partial<COMEntity> & {
@@ -1,9 +1,22 @@
1
- import { DIVEOrbitControllerSettings } from '../modules/controller/orbit/OrbitController.ts';
2
- import { DIVECommunication } from '../modules/com/Communication.ts';
1
+ import { OrbitControllerSettings } from '../modules/controller/orbit/OrbitController.ts';
3
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
+ }
4
17
  export type DIVESettings = EngineSettings & {
5
18
  /** Settings for the orbit controls */
6
- orbitController: Partial<DIVEOrbitControllerSettings>;
19
+ orbitController: Partial<OrbitControllerSettings>;
7
20
  };
8
21
  export declare const DIVEDefaultSettings: Required<DIVESettings>;
9
22
  /**
@@ -24,22 +37,21 @@ export declare const DIVEDefaultSettings: Required<DIVESettings>;
24
37
  * // do something
25
38
  * }));
26
39
  *
27
- * dive.Communication.PerformAction('GET_ALL_SCENE_DATA', {});
40
+ * dive.Communication.performAction('GET_ALL_SCENE_DATA', {});
28
41
  * ```
29
42
  * @module
30
43
  */
31
44
  export declare class DIVE {
32
- static QuickView(uri: string, settings?: Partial<DIVESettings>): Promise<DIVE>;
45
+ static QuickView(uri: string, settings?: Partial<DIVESettings & {
46
+ lightIntensity?: number;
47
+ }>): Promise<DIVE>;
33
48
  private _settings;
34
49
  get engine(): DIVEEngine;
35
50
  private _engine;
36
- private orbitControls;
37
- private toolbox;
38
- private _communication;
39
- private animationSystem;
51
+ private orbitController;
40
52
  private axisCamera;
41
- get communication(): DIVECommunication;
42
53
  get canvas(): HTMLCanvasElement;
54
+ setCanvas(canvas: HTMLCanvasElement): void;
43
55
  constructor(settings?: Partial<DIVESettings>);
44
- Dispose(): void;
56
+ Dispose(): Promise<void>;
45
57
  }
@@ -1,7 +1,7 @@
1
1
  import { DIVEScene } from './scene/Scene.ts';
2
2
  import { DIVEPerspectiveCamera, DIVEPerspectiveCameraSettings } from './camera/PerspectiveCamera.ts';
3
- import { DIVERenderer } from './renderer/Renderer.ts';
4
- import { DIVERenderPipeline, DIVERenderPipelineSettings } from './pipeline/RenderPipeline.ts';
3
+ import { DIVERenderPipeline, DIVERenderPipelineSettings } from './renderer/Renderer.ts';
4
+ import { DIVEClock } from './clock/Clock.ts';
5
5
  export type EngineSettings = {
6
6
  /** Whether the engine should start automatically after initialization */
7
7
  autoStart: boolean;
@@ -10,22 +10,22 @@ export type EngineSettings = {
10
10
  /** Settings for the perspective camera */
11
11
  perspectiveCamera: Partial<DIVEPerspectiveCameraSettings>;
12
12
  /** Settings for the render pipeline */
13
- renderPipeline: Partial<DIVERenderPipelineSettings>;
13
+ renderer: Partial<DIVERenderPipelineSettings>;
14
14
  };
15
15
  export declare const EngineDefaultSettings: Required<EngineSettings>;
16
16
  export declare class DIVEEngine {
17
17
  private _renderer;
18
18
  private _scene;
19
19
  private _camera;
20
- private _pipeline;
21
20
  private _resizeManager;
22
21
  private _clock;
23
22
  private _settings;
24
23
  constructor(settings?: Partial<EngineSettings>);
25
24
  get scene(): DIVEScene;
26
25
  get camera(): DIVEPerspectiveCamera;
27
- get renderer(): DIVERenderer;
28
- get pipeline(): DIVERenderPipeline;
26
+ get renderer(): DIVERenderPipeline;
27
+ setCanvas(canvas: HTMLCanvasElement): void;
28
+ get clock(): DIVEClock;
29
29
  start(): void;
30
30
  stop(): void;
31
31
  dispose(): void;
@@ -1,13 +1,17 @@
1
+ import { DIVERenderPipeline } from '../renderer/Renderer.ts';
1
2
  export interface DIVETicker {
3
+ uuid: string;
2
4
  tick(deltaTime: number): void;
3
5
  dispose?(): void;
4
6
  }
5
7
  export declare class DIVEClock {
8
+ private _renderer;
6
9
  private _lastTime;
7
10
  private _isRunning;
8
11
  private _tickers;
9
12
  start(): void;
10
13
  stop(): void;
14
+ setRenderer(renderer: DIVERenderPipeline): void;
11
15
  addTicker(ticker: DIVETicker): void;
12
16
  removeTicker(ticker: DIVETicker): void;
13
17
  dispose(): void;
@@ -1,6 +1,9 @@
1
- import { Camera, WebGLRenderer } from 'three';
1
+ import { WebGLRenderer } from 'three';
2
2
  import { DIVEScene } from '../scene/Scene.ts';
3
- export type DIVERendererSettings = {
3
+ import { DIVEPerspectiveCamera } from '../camera/PerspectiveCamera.ts';
4
+ export type DIVERenderPipelineSettings = {
5
+ /** The canvas to render to */
6
+ canvas: HTMLCanvasElement | undefined;
4
7
  /** Whether to enable antialiasing */
5
8
  antialias: boolean;
6
9
  /** Whether to enable alpha channel */
@@ -16,7 +19,7 @@ export type DIVERendererSettings = {
16
19
  /** Whether to use logarithmic depth buffer */
17
20
  logarithmicDepthBuffer: boolean;
18
21
  };
19
- export declare const DIVERendererDefaultSettings: Required<DIVERendererSettings>;
22
+ export declare const DIVERenderPipelineDefaultSettings: Required<DIVERenderPipelineSettings>;
20
23
  /**
21
24
  * A changed version of the WebGLRenderer.
22
25
  *
@@ -24,14 +27,15 @@ export declare const DIVERendererDefaultSettings: Required<DIVERendererSettings>
24
27
  *
25
28
  * @module
26
29
  */
27
- export declare class DIVERenderer {
30
+ export declare class DIVERenderPipeline {
31
+ private _scene;
32
+ private _camera;
28
33
  private _webglrenderer;
29
34
  private _settings;
30
- constructor(settings?: Partial<DIVERendererSettings>);
35
+ constructor(_scene: DIVEScene, _camera: DIVEPerspectiveCamera, settings?: Partial<DIVERenderPipelineSettings>);
31
36
  get webglrenderer(): WebGLRenderer;
32
- get domElement(): HTMLCanvasElement;
33
- set domElement(element: HTMLCanvasElement);
34
- render(scene: DIVEScene, camera: Camera): void;
37
+ setCanvas(canvas: HTMLCanvasElement): void;
38
+ render(): void;
35
39
  onResize(width: number, height: number): void;
36
40
  dispose(): void;
37
41
  }
@@ -1,9 +1,11 @@
1
1
  import { DIVEPerspectiveCamera } from '../camera/PerspectiveCamera.ts';
2
- import { DIVERenderer } from '../renderer/Renderer.ts';
2
+ import { DIVERenderPipeline } from '../renderer/Renderer.ts';
3
3
  export declare class DIVEResizeManager {
4
4
  private _resizeObserver;
5
5
  private _width;
6
6
  private _height;
7
- constructor(renderer: DIVERenderer, camera: DIVEPerspectiveCamera);
7
+ constructor(renderer: DIVERenderPipeline, camera: DIVEPerspectiveCamera);
8
+ setCanvas(canvas: HTMLCanvasElement): void;
8
9
  dispose(): void;
10
+ private _observeCanvas;
9
11
  }
@@ -1,8 +1,8 @@
1
1
  import { Scene, Box3, ColorRepresentation } from 'three';
2
- import { COMModel, COMEntity } from '../../modules/com/types/index.ts';
3
- import { DIVERoot } from '../../components/root/Root';
4
- import { DIVEGrid } from '../../components/grid/Grid';
5
- import { DIVESceneObject } from '../../types';
2
+ import { COMModel, COMEntity } from '../../modules/state/types/index.ts';
3
+ import { DIVERoot } from '../../components/root/Root.ts';
4
+ import { DIVEGrid } from '../../components/grid/Grid.ts';
5
+ import { DIVESceneObject } from '../../types/index.ts';
6
6
  /**
7
7
  * A basic scene class.
8
8
  *
@@ -1,8 +1,8 @@
1
1
  import { Object3D } from 'three';
2
- import { DIVERoot } from '../../../components/root/Root';
3
- import { DIVERenderer } from '../../renderer/Renderer';
4
- import { DIVEXRLightRoot } from './xrlightroot/XRLightRoot';
5
- import { DIVEScene } from '../Scene';
2
+ import { DIVERoot } from '../../../components/root/Root.ts';
3
+ import { DIVERenderPipeline } from '../../renderer/Renderer.ts';
4
+ import { DIVEXRLightRoot } from './xrlightroot/XRLightRoot.ts';
5
+ import { DIVEScene } from '../Scene.ts';
6
6
  export declare class DIVEXRRoot extends Object3D {
7
7
  private _xrLightRoot;
8
8
  private _xrModelRoot;
@@ -12,6 +12,6 @@ export declare class DIVEXRRoot extends Object3D {
12
12
  get XRHandNode(): Object3D;
13
13
  private _xrShadowPlane;
14
14
  constructor(scene: DIVEScene);
15
- InitLightEstimation(renderer: DIVERenderer): void;
15
+ InitLightEstimation(renderer: DIVERenderPipeline): void;
16
16
  DisposeLightEstimation(): void;
17
17
  }
@@ -1,12 +1,12 @@
1
- import { DIVERenderer } from '../../../renderer/Renderer';
1
+ import { DIVERenderPipeline } from '../../../renderer/Renderer.ts';
2
2
  import { Object3D } from 'three';
3
- import { DIVEScene } from '../../Scene';
3
+ import { DIVEScene } from '../../Scene.ts';
4
4
  export declare class DIVEXRLightRoot extends Object3D {
5
5
  private _scene;
6
6
  private _xrLight;
7
7
  private _lightRoot;
8
8
  constructor(scene: DIVEScene);
9
- InitLightEstimation(renderer: DIVERenderer): void;
9
+ InitLightEstimation(renderer: DIVERenderPipeline): void;
10
10
  DisposeLightEstimation(): void;
11
11
  private onEstimationStart;
12
12
  private onEstimationEnd;
@@ -1,5 +1,5 @@
1
1
  import { Object3D } from 'three';
2
- import { DIVEScene } from '../../engine/scene/Scene';
2
+ import { DIVEScene } from '../../engine/scene/Scene.ts';
3
3
  /**
4
4
  * Find the scene object of an object.
5
5
  *
@@ -1,4 +1,4 @@
1
- import { FileType } from '../../types/file/FileTypes';
1
+ import { FileType } from '../../types/file/index.ts';
2
2
  /**
3
3
  * Checks if a file extension is supported
4
4
  * @param extension The file extension to check
@@ -1,11 +1,8 @@
1
- export * from './core/Dive.ts';
1
+ export * from './core/index.ts';
2
2
  export * from './helpers/index.ts';
3
- export * from './error/index.ts';
3
+ export type { ARCompatibilityError } from './error/ar-compatibility/ar-compatibility-error.ts';
4
+ export type { FileTypeError } from './error/file-type/file-type-error.ts';
5
+ export type { NetworkError } from './error/network/network-error.ts';
6
+ export type { ParseError } from './error/parse/parse-error.ts';
4
7
  export * from './types/index.ts';
5
- export * from './modules/com/types/index.ts';
6
- export { ARSystem } from './modules/ar/ARSystem';
7
- export { AssetConverter } from './modules/asset/converter/AssetConverter';
8
- export { AssetExporter } from './modules/asset/exporter/AssetExporter';
9
- export { AssetLoader } from './modules/asset/loader/AssetLoader';
10
- export { MediaCreator } from './modules/mediacreator/MediaCreator';
11
- export { SystemInfo } from './modules/systeminfo/SystemInfo';
8
+ export * from './modules/ModuleRegistry.ts';
@@ -1,4 +1,4 @@
1
- import { DraggableEvent } from '../modules/toolbox/BaseTool';
1
+ import { DraggableEvent } from '../modules/toolbox/BaseTool.ts';
2
2
  export interface DIVEDraggable {
3
3
  isDraggable: true;
4
4
  onDragStart?: (e: DraggableEvent) => void;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Central export point for the module system.
3
+ * This is the only place where ModuleRegistry should be imported from.
4
+ */
5
+ declare const ModuleRegistry: {
6
+ readonly AnimationSystem: () => Promise<typeof import('./animation/AnimationSystem.ts').AnimationSystem>;
7
+ readonly ARSystem: () => Promise<typeof import('./ar/ARSystem.ts').ARSystem>;
8
+ readonly AssetConverter: () => Promise<typeof import('./asset/converter/AssetConverter.ts').AssetConverter>;
9
+ readonly AssetExporter: () => Promise<typeof import('./asset/exporter/AssetExporter.ts').AssetExporter>;
10
+ readonly AssetLoader: () => Promise<typeof import('./asset/loader/AssetLoader.ts').AssetLoader>;
11
+ readonly MediaCreator: () => Promise<typeof import('./mediacreator/MediaCreator.ts').MediaCreator>;
12
+ readonly State: () => Promise<typeof import('./state/State.ts').State>;
13
+ readonly Toolbox: () => Promise<typeof import('./toolbox/Toolbox.ts').Toolbox>;
14
+ };
15
+ type ModuleRegistry = typeof ModuleRegistry;
16
+ type ModuleName = keyof ModuleRegistry;
17
+ type ModuleType<T extends keyof ModuleRegistry> = ReturnType<ModuleRegistry[T]> extends Promise<infer U> ? U : never;
18
+ export declare const getModule: <T extends ModuleName>(moduleName: T) => Promise<ModuleType<T>>;
19
+ export {};
@@ -0,0 +1 @@
1
+ "use strict";var h=Object.defineProperty;var u=(n,e,t)=>e in n?h(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var i=(n,e,t)=>u(n,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("@tweenjs/tween.js"),r=require("three");class d extends r.EventDispatcher{constructor(t,p,a,s){super();i(this,"_uuid",r.MathUtils.generateUUID());i(this,"_playing",!1);i(this,"_stopped",!1);i(this,"_completed",!1);this.object=t,this.to=p,this.duration=a,this.options=s}get uuid(){return this._uuid}get playing(){return this._playing}get stopped(){return this._stopped}get completed(){return this._completed}dispose(){this._playing=!1,this._stopped=!1,this._completed=!1}play(){return this._playing=!0,this._stopped=!1,this.dispatchEvent({type:"play",target:this}),console.log("play",this),this}stop(){return this._playing=!1,this._stopped=!0,this.dispatchEvent({type:"stop",target:this}),this}}class _{constructor(){i(this,"uuid",r.MathUtils.generateUUID());i(this,"_callbackMap",new Map);i(this,"_tweens",new Map)}createAnimator(e,t,p,a){var o,c;const s=new d(e,t,p,a);return this._callbackMap.set(s.uuid,{onUpdate:((o=s.options)==null?void 0:o.onUpdate)??(()=>{}),onComplete:((c=s.options)==null?void 0:c.onComplete)??(()=>{})}),this._setupTween(s),s}unregister(e){if(!this._callbackMap.has(e)){console.warn(`Animator with uuid ${e} not registered`);return}this._callbackMap.delete(e),this._tweens.delete(e)}Dispose(){this._callbackMap.clear(),this._tweens.clear()}tick(){l.update()}Animate(e){return new l.Tween(e)}_setupTween(e){var p;const t=new l.Tween(e.object).to(e.to,e.duration).easing(((p=e.options)==null?void 0:p.easing)??l.Easing.Quadratic.Out).onUpdate((a,s)=>{var o;(o=this._callbackMap.get(e.uuid))==null||o.onUpdate(a,s)}).onComplete(a=>{var s;(s=this._callbackMap.get(e.uuid))==null||s.onComplete(a)});e.addEventListener("play",()=>{t.start()}),e.addEventListener("stop",()=>{t.stop()}),this._tweens.set(e.uuid,t)}}exports.AnimationSystem=_;
@@ -1,12 +1,36 @@
1
1
  import { Tween } from '@tweenjs/tween.js';
2
+ import { Animator } from './animator/Animator.ts';
3
+ import { UUID } from '../../types/index.ts';
4
+ import { DIVETicker } from '../../engine/clock/Clock.ts';
5
+ import { TAnimatorParameters } from './types/AnimatorParameters.ts';
6
+ export type * from './animator/Animator.ts';
7
+ declare global {
8
+ interface ModuleClasses {
9
+ AnimationSystem: typeof AnimationSystem;
10
+ }
11
+ }
2
12
  /**
13
+ * @module AnimationSystem
14
+ *
3
15
  * Updates all animations.
4
16
  * DIVE uses Tween.js to handle animations.
5
- *
6
- * @module
7
17
  */
8
- export declare class DIVEAnimationSystem {
18
+ export declare class AnimationSystem implements DIVETicker {
19
+ uuid: string;
20
+ private _callbackMap;
21
+ private _tweens;
22
+ /**
23
+ * Creates a new animator and registers it.
24
+ * @param object - The object to animate.
25
+ * @param to - The target object.
26
+ * @param duration - The duration of the animation.
27
+ * @param options - The options for the animation.
28
+ * @returns The animator.
29
+ */
30
+ createAnimator<T extends object>(object: T, to: T, duration: number, options?: TAnimatorParameters<T>): Animator<T>;
31
+ unregister(uuid: UUID): void;
9
32
  Dispose(): void;
10
- Update(): void;
33
+ tick(): void;
11
34
  Animate<T extends object>(object: T): Tween<T>;
35
+ private _setupTween;
12
36
  }
@@ -0,0 +1,95 @@
1
+ var c = Object.defineProperty;
2
+ var d = (p, t, e) => t in p ? c(p, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : p[t] = e;
3
+ var i = (p, t, e) => d(p, typeof t != "symbol" ? t + "" : t, e);
4
+ import { update as u, Tween as r, Easing as _ } from "@tweenjs/tween.js";
5
+ import { EventDispatcher as g, MathUtils as h } from "three";
6
+ class w extends g {
7
+ constructor(e, n, a, s) {
8
+ super();
9
+ i(this, "_uuid", h.generateUUID());
10
+ i(this, "_playing", !1);
11
+ i(this, "_stopped", !1);
12
+ i(this, "_completed", !1);
13
+ this.object = e, this.to = n, this.duration = a, this.options = s;
14
+ }
15
+ get uuid() {
16
+ return this._uuid;
17
+ }
18
+ get playing() {
19
+ return this._playing;
20
+ }
21
+ get stopped() {
22
+ return this._stopped;
23
+ }
24
+ get completed() {
25
+ return this._completed;
26
+ }
27
+ dispose() {
28
+ this._playing = !1, this._stopped = !1, this._completed = !1;
29
+ }
30
+ play() {
31
+ return this._playing = !0, this._stopped = !1, this.dispatchEvent({ type: "play", target: this }), console.log("play", this), this;
32
+ }
33
+ stop() {
34
+ return this._playing = !1, this._stopped = !0, this.dispatchEvent({ type: "stop", target: this }), this;
35
+ }
36
+ }
37
+ class M {
38
+ constructor() {
39
+ i(this, "uuid", h.generateUUID());
40
+ i(this, "_callbackMap", /* @__PURE__ */ new Map());
41
+ i(this, "_tweens", /* @__PURE__ */ new Map());
42
+ }
43
+ /**
44
+ * Creates a new animator and registers it.
45
+ * @param object - The object to animate.
46
+ * @param to - The target object.
47
+ * @param duration - The duration of the animation.
48
+ * @param options - The options for the animation.
49
+ * @returns The animator.
50
+ */
51
+ createAnimator(t, e, n, a) {
52
+ var o, l;
53
+ const s = new w(t, e, n, a);
54
+ return this._callbackMap.set(s.uuid, {
55
+ onUpdate: ((o = s.options) == null ? void 0 : o.onUpdate) ?? (() => {
56
+ }),
57
+ onComplete: ((l = s.options) == null ? void 0 : l.onComplete) ?? (() => {
58
+ })
59
+ }), this._setupTween(s), s;
60
+ }
61
+ unregister(t) {
62
+ if (!this._callbackMap.has(t)) {
63
+ console.warn(`Animator with uuid ${t} not registered`);
64
+ return;
65
+ }
66
+ this._callbackMap.delete(t), this._tweens.delete(t);
67
+ }
68
+ Dispose() {
69
+ this._callbackMap.clear(), this._tweens.clear();
70
+ }
71
+ tick() {
72
+ u();
73
+ }
74
+ Animate(t) {
75
+ return new r(t);
76
+ }
77
+ _setupTween(t) {
78
+ var n;
79
+ const e = new r(t.object).to(t.to, t.duration).easing(((n = t.options) == null ? void 0 : n.easing) ?? _.Quadratic.Out).onUpdate((a, s) => {
80
+ var o;
81
+ (o = this._callbackMap.get(t.uuid)) == null || o.onUpdate(a, s);
82
+ }).onComplete((a) => {
83
+ var s;
84
+ (s = this._callbackMap.get(t.uuid)) == null || s.onComplete(a);
85
+ });
86
+ t.addEventListener("play", () => {
87
+ e.start();
88
+ }), t.addEventListener("stop", () => {
89
+ e.stop();
90
+ }), this._tweens.set(t.uuid, e);
91
+ }
92
+ }
93
+ export {
94
+ M as AnimationSystem
95
+ };