@shopware-ag/dive 1.19.1-beta.8 → 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 (272) 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-DPAQG-S5.mjs +139 -0
  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/parse-error-2f5qpXP5.cjs +6 -0
  20. package/build/chunks/parse-error-DRBVHL9E.mjs +614 -0
  21. package/build/dive.cjs +30 -0
  22. package/build/dive.d.ts +2 -0
  23. package/build/dive.mjs +1757 -0
  24. package/build/src/{primitive → components}/floor/Floor.d.ts +1 -1
  25. package/build/src/{gizmo → components/gizmo}/Gizmo.d.ts +4 -4
  26. package/build/src/{gizmo → components/gizmo}/handles/AxisHandle.d.ts +4 -4
  27. package/build/src/{gizmo → components/gizmo}/handles/RadialHandle.d.ts +4 -4
  28. package/build/src/{gizmo → components/gizmo}/handles/ScaleHandle.d.ts +4 -4
  29. package/build/src/{gizmo → components/gizmo}/plane/GizmoPlane.d.ts +1 -1
  30. package/build/src/{gizmo → components/gizmo}/rotate/RotateGizmo.d.ts +4 -4
  31. package/build/src/{gizmo → components/gizmo}/scale/ScaleGizmo.d.ts +5 -5
  32. package/build/src/{gizmo → components/gizmo}/translate/TranslateGizmo.d.ts +4 -4
  33. package/build/src/{group → components/group}/Group.d.ts +8 -3
  34. package/build/src/components/index.d.ts +9 -0
  35. package/build/src/{light → components/light}/AmbientLight.d.ts +1 -1
  36. package/build/src/{light → components/light}/PointLight.d.ts +4 -4
  37. package/build/src/{light → components/light}/SceneLight.d.ts +1 -1
  38. package/build/src/components/light/index.d.ts +3 -0
  39. package/build/src/{model → components/model}/Model.d.ts +2 -2
  40. package/build/src/{node → components/node}/Node.d.ts +4 -4
  41. package/build/src/{primitive → components/primitive}/Primitive.d.ts +2 -2
  42. package/build/src/{engine/scene → components}/root/Root.d.ts +6 -2
  43. package/build/src/constants/index.d.ts +3 -0
  44. package/build/src/core/Dive.d.ts +57 -0
  45. package/build/src/core/index.d.ts +1 -0
  46. package/build/src/engine/Engine.d.ts +19 -19
  47. package/build/src/engine/camera/PerspectiveCamera.d.ts +6 -3
  48. package/build/src/engine/clock/Clock.d.ts +19 -0
  49. package/build/src/engine/renderer/Renderer.d.ts +29 -57
  50. package/build/src/engine/resize/ResizeManager.d.ts +11 -0
  51. package/build/src/engine/scene/Scene.d.ts +6 -15
  52. package/build/src/engine/scene/xrroot/XRRoot.d.ts +5 -5
  53. package/build/src/engine/scene/xrroot/xrlightroot/XRLightRoot.d.ts +3 -3
  54. package/build/src/{helper → helpers}/findSceneRecursive/findSceneRecursive.d.ts +1 -1
  55. package/build/src/helpers/index.d.ts +8 -0
  56. package/build/src/{helper → helpers}/isFileTypeSupported/isFileTypeSupported.d.ts +1 -1
  57. package/build/src/index.d.ts +8 -2
  58. package/build/src/{interface → interfaces}/Draggable.d.ts +1 -1
  59. package/build/src/interfaces/index.d.ts +6 -0
  60. package/build/src/modules/ModuleRegistry.d.ts +19 -0
  61. package/build/src/modules/animation/AnimationSystem.cjs +1 -0
  62. package/build/src/modules/animation/AnimationSystem.d.ts +36 -0
  63. package/build/src/modules/animation/AnimationSystem.mjs +95 -0
  64. package/build/src/modules/animation/animator/Animator.d.ts +26 -0
  65. package/build/src/modules/animation/types/AnimatorParameters.d.ts +7 -0
  66. package/build/src/modules/ar/ARSystem.cjs +1 -2
  67. package/build/src/modules/ar/ARSystem.d.ts +1 -2
  68. package/build/src/modules/ar/ARSystem.mjs +2 -3
  69. package/build/src/modules/ar/arquicklook/ARQuickLook.d.ts +1 -1
  70. package/build/src/modules/ar/sceneviewer/SceneViewer.d.ts +1 -1
  71. package/build/src/modules/ar/webxr/WebXR.d.ts +3 -4
  72. package/build/src/modules/ar/webxr/controller/WebXRController.d.ts +3 -3
  73. package/build/src/modules/ar/webxr/origin/WebXROrigin.d.ts +2 -2
  74. package/build/src/modules/ar/webxr/raycaster/WebXRRaycaster.d.ts +4 -4
  75. package/build/src/modules/ar/webxr/raycaster/ar/WebXRRaycasterAR.d.ts +3 -3
  76. package/build/src/modules/ar/webxr/raycaster/three/WebXRRaycasterTHREE.d.ts +4 -4
  77. package/build/src/modules/ar/webxr/touchscreencontrols/WebXRTouchscreenControls.d.ts +1 -1
  78. package/build/src/modules/asset/converter/AssetConverter.cjs +0 -1
  79. package/build/src/modules/asset/converter/AssetConverter.d.ts +4 -5
  80. package/build/src/modules/asset/converter/AssetConverter.mjs +0 -1
  81. package/build/src/modules/asset/exporter/AssetExporter.cjs +24 -25
  82. package/build/src/modules/asset/exporter/AssetExporter.d.ts +15 -3
  83. package/build/src/modules/asset/exporter/AssetExporter.mjs +3 -5
  84. package/build/src/modules/asset/loader/AssetLoader.cjs +2 -3
  85. package/build/src/modules/asset/loader/AssetLoader.d.ts +1 -3
  86. package/build/src/modules/asset/loader/AssetLoader.mjs +96 -101
  87. package/build/src/modules/axiscamera/AxisCamera.d.ts +21 -0
  88. package/build/src/modules/controller/orbit/OrbitController.d.ts +30 -0
  89. package/build/src/modules/mediacreator/MediaCreator.cjs +1 -2
  90. package/build/src/modules/mediacreator/MediaCreator.d.ts +5 -6
  91. package/build/src/modules/mediacreator/MediaCreator.mjs +13 -11
  92. package/build/src/modules/state/ActionRegistry.d.ts +26 -0
  93. package/build/src/modules/state/State.cjs +27 -0
  94. package/build/src/modules/state/State.d.ts +58 -0
  95. package/build/src/modules/state/State.mjs +4271 -0
  96. package/build/src/modules/state/actions/action.d.ts +36 -0
  97. package/build/src/modules/state/actions/ar/index.d.ts +1 -0
  98. package/build/src/modules/state/actions/ar/launchar.d.ts +15 -0
  99. package/build/src/modules/state/actions/camera/computeencompassingview.d.ts +12 -0
  100. package/build/src/modules/state/actions/camera/getcameratransform.d.ts +12 -0
  101. package/build/src/modules/state/actions/camera/index.d.ts +6 -0
  102. package/build/src/modules/state/actions/camera/lockcamera.d.ts +8 -0
  103. package/build/src/modules/state/actions/camera/movecamera.d.ts +29 -0
  104. package/build/src/modules/state/actions/camera/setcameralayer.d.ts +12 -0
  105. package/build/src/modules/state/actions/camera/setcameratransform.d.ts +15 -0
  106. package/build/src/modules/state/actions/camera/zoomcamera.d.ts +14 -0
  107. package/build/src/modules/state/actions/index.d.ts +7 -0
  108. package/build/src/modules/state/actions/media/generatemedia.d.ts +25 -0
  109. package/build/src/modules/state/actions/media/index.d.ts +1 -0
  110. package/build/src/modules/state/actions/object/addobject.d.ts +8 -0
  111. package/build/src/modules/state/actions/object/deleteobject.d.ts +12 -0
  112. package/build/src/modules/state/actions/object/deselectobject.d.ts +12 -0
  113. package/build/src/modules/state/actions/object/dropit.d.ts +12 -0
  114. package/build/src/modules/state/actions/object/getallobjects.d.ts +8 -0
  115. package/build/src/modules/state/actions/object/getobjects.d.ts +12 -0
  116. package/build/src/modules/state/actions/object/index.d.ts +11 -0
  117. package/build/src/modules/state/actions/object/modelloaded.d.ts +12 -0
  118. package/build/src/modules/state/actions/object/placeonfloor.d.ts +12 -0
  119. package/build/src/modules/state/actions/object/selectobject.d.ts +12 -0
  120. package/build/src/modules/state/actions/object/setparent.d.ts +22 -0
  121. package/build/src/modules/state/actions/object/updateobject.d.ts +12 -0
  122. package/build/src/modules/state/actions/renderer/index.d.ts +1 -0
  123. package/build/src/modules/state/actions/renderer/startrender.d.ts +8 -0
  124. package/build/src/modules/state/actions/scene/exportscene.d.ts +13 -0
  125. package/build/src/modules/state/actions/scene/getallscenedata.d.ts +9 -0
  126. package/build/src/modules/state/actions/scene/index.d.ts +4 -0
  127. package/build/src/modules/state/actions/scene/setbackground.d.ts +12 -0
  128. package/build/src/modules/state/actions/scene/updatescene.d.ts +20 -0
  129. package/build/src/modules/state/actions/toolbox/index.d.ts +4 -0
  130. package/build/src/modules/state/actions/toolbox/setgizmomode.d.ts +12 -0
  131. package/build/src/modules/state/actions/toolbox/setgizmoscalelinked.d.ts +8 -0
  132. package/build/src/modules/state/actions/toolbox/setgizmovisible.d.ts +8 -0
  133. package/build/src/modules/state/actions/toolbox/usetool.d.ts +13 -0
  134. package/build/src/modules/state/types/ActionTypes.d.ts +18 -0
  135. package/build/src/{com → modules/state}/types/COMBaseEntity.d.ts +1 -1
  136. package/build/src/modules/state/types/COMEntity.d.ts +6 -0
  137. package/build/src/{com → modules/state}/types/COMGeometry.d.ts +1 -1
  138. package/build/src/{com → modules/state}/types/COMGroup.d.ts +3 -1
  139. package/build/src/{com → modules/state}/types/COMLight.d.ts +3 -1
  140. package/build/src/{com → modules/state}/types/COMModel.d.ts +4 -2
  141. package/build/src/modules/state/types/COMPov.d.ts +9 -0
  142. package/build/src/modules/state/types/COMPrimitive.d.ts +13 -0
  143. package/build/src/modules/state/types/index.d.ts +11 -0
  144. package/build/src/modules/systeminfo/SystemInfo.cjs +1 -2
  145. package/build/src/modules/systeminfo/SystemInfo.d.ts +6 -9
  146. package/build/src/modules/systeminfo/SystemInfo.mjs +3 -113
  147. package/build/src/{toolbox → modules/toolbox}/BaseTool.d.ts +6 -6
  148. package/build/src/modules/toolbox/Toolbox.cjs +1 -0
  149. package/build/src/{toolbox → modules/toolbox}/Toolbox.d.ts +10 -6
  150. package/build/src/modules/toolbox/Toolbox.mjs +99 -0
  151. package/build/src/{toolbox → modules/toolbox}/select/SelectTool.d.ts +5 -5
  152. package/build/src/{toolbox → modules/toolbox}/transform/TransformTool.d.ts +6 -6
  153. package/build/src/types/SceneData.d.ts +1 -1
  154. package/build/src/types/SceneObjects.d.ts +6 -6
  155. package/build/src/types/SceneType.d.ts +1 -1
  156. package/build/src/types/UUID.d.ts +1 -0
  157. package/build/src/types/file/index.d.ts +1 -1
  158. package/build/src/types/index.d.ts +6 -6
  159. package/package.json +67 -26
  160. package/build/chunks/PerspectiveCamera-ACx6umAu.mjs +0 -38
  161. package/build/chunks/PerspectiveCamera-ACx6umAu.mjs.map +0 -1
  162. package/build/chunks/PerspectiveCamera-BXPNOM71.cjs +0 -2
  163. package/build/chunks/PerspectiveCamera-BXPNOM71.cjs.map +0 -1
  164. package/build/chunks/fflate.module-DHdJvhNh.cjs +0 -7
  165. package/build/chunks/fflate.module-DHdJvhNh.cjs.map +0 -1
  166. package/build/chunks/fflate.module-DkZg07PZ.mjs +0 -603
  167. package/build/chunks/fflate.module-DkZg07PZ.mjs.map +0 -1
  168. package/build/chunks/file-type-error-D6aWGgyc.mjs +0 -15
  169. package/build/chunks/file-type-error-D6aWGgyc.mjs.map +0 -1
  170. package/build/chunks/file-type-error-DtvBgs64.cjs +0 -2
  171. package/build/chunks/file-type-error-DtvBgs64.cjs.map +0 -1
  172. package/build/chunks/index-C7Wx_9uY.mjs +0 -34
  173. package/build/chunks/index-C7Wx_9uY.mjs.map +0 -1
  174. package/build/chunks/index-MNP0K5dt.cjs +0 -2
  175. package/build/chunks/index-MNP0K5dt.cjs.map +0 -1
  176. package/build/chunks/network-error-C2ZDC8qS.cjs +0 -2
  177. package/build/chunks/network-error-C2ZDC8qS.cjs.map +0 -1
  178. package/build/chunks/network-error-DgecatEk.mjs +0 -27
  179. package/build/chunks/network-error-DgecatEk.mjs.map +0 -1
  180. package/build/index.cjs +0 -57
  181. package/build/index.cjs.map +0 -1
  182. package/build/index.d.ts +0 -6
  183. package/build/index.mjs +0 -6809
  184. package/build/index.mjs.map +0 -1
  185. package/build/src/animation/AnimationSystem.d.ts +0 -16
  186. package/build/src/axiscamera/AxisCamera.d.ts +0 -18
  187. package/build/src/com/Communication.d.ts +0 -74
  188. package/build/src/com/actions/camera/computeencompassingview.d.ts +0 -9
  189. package/build/src/com/actions/camera/getcameratransform.d.ts +0 -9
  190. package/build/src/com/actions/camera/movecamera.d.ts +0 -15
  191. package/build/src/com/actions/camera/resetcamera.d.ts +0 -7
  192. package/build/src/com/actions/camera/setcameralayer.d.ts +0 -7
  193. package/build/src/com/actions/camera/setcameratransform.d.ts +0 -9
  194. package/build/src/com/actions/camera/zoomcamera.d.ts +0 -8
  195. package/build/src/com/actions/index.d.ts +0 -60
  196. package/build/src/com/actions/media/generatemedia.d.ts +0 -14
  197. package/build/src/com/actions/object/addobject.d.ts +0 -6
  198. package/build/src/com/actions/object/deleteobject.d.ts +0 -8
  199. package/build/src/com/actions/object/deselectobject.d.ts +0 -8
  200. package/build/src/com/actions/object/getallobjects.d.ts +0 -6
  201. package/build/src/com/actions/object/getobjects.d.ts +0 -8
  202. package/build/src/com/actions/object/model/dropit.d.ts +0 -7
  203. package/build/src/com/actions/object/model/modelloaded.d.ts +0 -7
  204. package/build/src/com/actions/object/model/placeonfloor.d.ts +0 -7
  205. package/build/src/com/actions/object/selectobject.d.ts +0 -8
  206. package/build/src/com/actions/object/setparent.d.ts +0 -13
  207. package/build/src/com/actions/object/updateobject.d.ts +0 -8
  208. package/build/src/com/actions/renderer/startrender.d.ts +0 -5
  209. package/build/src/com/actions/scene/exportscene.d.ts +0 -8
  210. package/build/src/com/actions/scene/getallscenedata.d.ts +0 -6
  211. package/build/src/com/actions/scene/launchar.d.ts +0 -9
  212. package/build/src/com/actions/scene/setbackground.d.ts +0 -7
  213. package/build/src/com/actions/scene/updatescene.d.ts +0 -11
  214. package/build/src/com/actions/toolbox/select/setgizmomode.d.ts +0 -7
  215. package/build/src/com/actions/toolbox/transform/setgizmoscalelinked.d.ts +0 -5
  216. package/build/src/com/actions/toolbox/transform/setgizmovisible.d.ts +0 -5
  217. package/build/src/com/actions/toolbox/usetool.d.ts +0 -8
  218. package/build/src/com/types/COMEntity.d.ts +0 -6
  219. package/build/src/com/types/COMPov.d.ts +0 -7
  220. package/build/src/com/types/COMPrimitive.d.ts +0 -11
  221. package/build/src/com/types/index.d.ts +0 -11
  222. package/build/src/controls/OrbitControls.d.ts +0 -38
  223. package/build/src/dive.d.ts +0 -49
  224. package/build/src/error/index.d.ts +0 -4
  225. package/build/src/helper/index.d.ts +0 -7
  226. package/build/src/modules/_system/ModuleImporter.d.ts +0 -21
  227. package/build/src/modules/_system/ModuleRegistry.d.ts +0 -72
  228. package/build/src/modules/ar/ARSystem.cjs.map +0 -1
  229. package/build/src/modules/ar/ARSystem.mjs.map +0 -1
  230. package/build/src/modules/asset/converter/AssetConverter.cjs.map +0 -1
  231. package/build/src/modules/asset/converter/AssetConverter.mjs.map +0 -1
  232. package/build/src/modules/asset/exporter/AssetExporter.cjs.map +0 -1
  233. package/build/src/modules/asset/exporter/AssetExporter.mjs.map +0 -1
  234. package/build/src/modules/asset/loader/AssetLoader.cjs.map +0 -1
  235. package/build/src/modules/asset/loader/AssetLoader.mjs.map +0 -1
  236. package/build/src/modules/index.cjs +0 -2
  237. package/build/src/modules/index.cjs.map +0 -1
  238. package/build/src/modules/index.d.ts +0 -10
  239. package/build/src/modules/index.mjs +0 -109
  240. package/build/src/modules/index.mjs.map +0 -1
  241. package/build/src/modules/mediacreator/MediaCreator.cjs.map +0 -1
  242. package/build/src/modules/mediacreator/MediaCreator.mjs.map +0 -1
  243. package/build/src/modules/systeminfo/SystemInfo.cjs.map +0 -1
  244. package/build/src/modules/systeminfo/SystemInfo.mjs.map +0 -1
  245. /package/build/src/{grid → components/grid}/Grid.d.ts +0 -0
  246. /package/build/src/{constant → constants}/AxisHelperColors.d.ts +0 -0
  247. /package/build/src/{constant → constants}/GridColors.d.ts +0 -0
  248. /package/build/src/{constant → constants}/VisibilityLayerMask.d.ts +0 -0
  249. /package/build/src/{helper → helpers}/applyMixins/applyMixins.d.ts +0 -0
  250. /package/build/src/{helper → helpers}/findInterface/findInterface.d.ts +0 -0
  251. /package/build/src/{helper → helpers}/getFileTypeFromUri/getFileTypeFromUri.d.ts +0 -0
  252. /package/build/src/{helper → helpers}/getObjectDelta/getObjectDelta.d.ts +0 -0
  253. /package/build/src/{helper/isInterface → helpers/implementsInterface}/implementsInterface.d.ts +0 -0
  254. /package/build/src/{math → helpers/math}/ceil/ceilExp.d.ts +0 -0
  255. /package/build/src/{math → helpers/math}/degToRad/degToRad.d.ts +0 -0
  256. /package/build/src/{math → helpers/math}/floor/floorExp.d.ts +0 -0
  257. /package/build/src/{math → helpers/math}/helper/shift.d.ts +0 -0
  258. /package/build/src/{math → helpers/math}/index.d.ts +0 -0
  259. /package/build/src/{math → helpers/math}/radToDeg/radToDeg.d.ts +0 -0
  260. /package/build/src/{math → helpers/math}/round/roundExp.d.ts +0 -0
  261. /package/build/src/{math → helpers/math}/signedAngleTo/signedAngleTo.d.ts +0 -0
  262. /package/build/src/{math → helpers/math}/toFixed/toFixedExp.d.ts +0 -0
  263. /package/build/src/{math → helpers/math}/truncate/truncateExp.d.ts +0 -0
  264. /package/build/src/{interface → interfaces}/Hoverable.d.ts +0 -0
  265. /package/build/src/{interface → interfaces}/Movable.d.ts +0 -0
  266. /package/build/src/{interface → interfaces}/Rotatable.d.ts +0 -0
  267. /package/build/src/{interface → interfaces}/Scalable.d.ts +0 -0
  268. /package/build/src/{interface → interfaces}/Selectable.d.ts +0 -0
  269. /package/build/src/{events → modules/events}/EventExecutor.d.ts +0 -0
  270. /package/build/src/{com → modules/state}/types/COMEntityType.d.ts +0 -0
  271. /package/build/src/{com → modules/state}/types/COMGeometryType.d.ts +0 -0
  272. /package/build/src/{com → modules/state}/types/COMMaterial.d.ts +0 -0
@@ -1,16 +0,0 @@
1
- import { Tween } from '@tweenjs/tween.js';
2
- import { DIVERenderer } from '../engine/renderer/Renderer';
3
- /**
4
- * Updates all animations.
5
- * DIVE uses Tween.js to handle animations.
6
- *
7
- * @module
8
- */
9
- export declare class DIVEAnimationSystem {
10
- private _renderer;
11
- private _rendererCallbackId;
12
- constructor(renderer: DIVERenderer);
13
- Dispose(): void;
14
- Update(): void;
15
- Animate<T extends object>(object: T): Tween<T>;
16
- }
@@ -1,18 +0,0 @@
1
- import { Matrix4, OrthographicCamera } from 'three';
2
- import { DIVERenderer } from '../engine/renderer/Renderer.ts';
3
- import { DIVEScene } from '../engine/scene/Scene.ts';
4
- import { default as DIVEOrbitControls } from '../controls/OrbitControls.ts';
5
- /**
6
- * Shows the scene axes in the bottom left corner of the screen.
7
- *
8
- * @module
9
- */
10
- export default class DIVEAxisCamera extends OrthographicCamera {
11
- private axesHelper;
12
- private _renderer;
13
- private _scene;
14
- private _renderCallbackId;
15
- constructor(renderer: DIVERenderer, scene: DIVEScene, controls: DIVEOrbitControls);
16
- Dispose(): void;
17
- SetFromCameraMatrix(matrix: Matrix4): void;
18
- }
@@ -1,74 +0,0 @@
1
- import { Actions } from './actions/index.ts';
2
- import { DIVEScene } from '../engine/scene/Scene';
3
- import { default as DIVEToolbox } from '../toolbox/Toolbox';
4
- import { default as DIVEOrbitControls } from '../controls/OrbitControls';
5
- import { DIVERenderer } from '../engine/renderer/Renderer';
6
- type EventListener<Action extends keyof Actions> = (payload: Actions[Action]['PAYLOAD']) => void;
7
- type Unsubscribe = () => boolean;
8
- /**
9
- * Main class for communicating with DIVE.
10
- *
11
- * You can subscribe to actions and perform them from outside and inside DIVE.
12
- *
13
- * ```ts
14
- * import { DIVE } from "@shopware-ag/dive";
15
- *
16
- * const dive = new DIVE();
17
- *
18
- * dive.Communication.Subscribe('GET_ALL_SCENE_DATA', () => {
19
- * // do something
20
- * });
21
- *
22
- * dive.Communication.PerformAction('GET_ALL_SCENE_DATA', {});
23
- * ```
24
- *
25
- * @module
26
- */
27
- export declare class DIVECommunication {
28
- private static __instances;
29
- static get(id: string): DIVECommunication | undefined;
30
- private _id;
31
- get id(): string;
32
- private renderer;
33
- private scene;
34
- private controller;
35
- private toolbox;
36
- private _mediaCreator;
37
- private _arSystem;
38
- private _assetExporter;
39
- private registered;
40
- private listeners;
41
- constructor(renderer: DIVERenderer, scene: DIVEScene, controls: DIVEOrbitControls, toolbox: DIVEToolbox);
42
- DestroyInstance(): boolean;
43
- PerformAction<Action extends keyof Actions>(action: Action, payload?: Actions[Action]['PAYLOAD']): Actions[Action]['RETURN'];
44
- Subscribe<Action extends keyof Actions>(type: Action, listener: EventListener<Action>): Unsubscribe;
45
- private dispatch;
46
- private getAllSceneData;
47
- private getAllObjects;
48
- private getObjects;
49
- private addObject;
50
- private updateObject;
51
- private deleteObject;
52
- private selectObject;
53
- private deselectObject;
54
- private setBackground;
55
- private dropIt;
56
- private placeOnFloor;
57
- private setCameraTransform;
58
- private getCameraTransform;
59
- private moveCamera;
60
- private setCameraLayer;
61
- private resetCamera;
62
- private computeEncompassingView;
63
- private zoomCamera;
64
- private setGizmoMode;
65
- private setGizmoVisibility;
66
- private setGizmoScaleLinked;
67
- private useTool;
68
- private modelLoaded;
69
- private updateScene;
70
- private generateMedia;
71
- private setParent;
72
- private exportScene;
73
- }
74
- export type { Actions } from './actions/index.ts';
@@ -1,9 +0,0 @@
1
- import { Vector3Like } from 'three';
2
- export default interface COMPUTE_ENCOMPASSING_VIEW {
3
- DESCRIPTION: 'Calculates the camera position and target to view the whole scene. (experimental)';
4
- PAYLOAD: object;
5
- RETURN: {
6
- position: Vector3Like;
7
- target: Vector3Like;
8
- };
9
- }
@@ -1,9 +0,0 @@
1
- import { Vector3Like } from 'three';
2
- export default interface GET_CAMERA_TRANSFORM {
3
- DESCRIPTION: 'Returns the current camera position and target.';
4
- PAYLOAD: object;
5
- RETURN: {
6
- position: Vector3Like;
7
- target: Vector3Like;
8
- };
9
- }
@@ -1,15 +0,0 @@
1
- import { Vector3Like } from 'three';
2
- export default interface MOVE_CAMERA {
3
- DESCRIPTION: 'Moves the camera to a new position and target.';
4
- PAYLOAD: {
5
- position: Vector3Like;
6
- target: Vector3Like;
7
- locked: boolean;
8
- duration: number;
9
- } | {
10
- id: string;
11
- locked: boolean;
12
- duration: number;
13
- };
14
- RETURN: boolean;
15
- }
@@ -1,7 +0,0 @@
1
- export default interface RESET_CAMERA {
2
- DESCRIPTION: 'Reset the camera to its initial position and rotation.';
3
- PAYLOAD: {
4
- duration: number;
5
- };
6
- RETURN: boolean;
7
- }
@@ -1,7 +0,0 @@
1
- export default interface SET_CAMERA_LAYER {
2
- DESCRIPTION: 'Sets the camera layer to a certain layer.';
3
- PAYLOAD: {
4
- layer: 'LIVE' | 'EDITOR';
5
- };
6
- RETURN: boolean;
7
- }
@@ -1,9 +0,0 @@
1
- import { Vector3Like } from 'three';
2
- export default interface SET_CAMERA_TRANSFORM {
3
- DESCRIPTION: 'Sets the camera position and target.';
4
- PAYLOAD: {
5
- position: Vector3Like;
6
- target: Vector3Like;
7
- };
8
- RETURN: boolean;
9
- }
@@ -1,8 +0,0 @@
1
- export default interface ZOOM_CAMERA {
2
- DESCRIPTION: 'Zooms the camera in or out by a certain amount.';
3
- PAYLOAD: {
4
- direction: 'IN' | 'OUT';
5
- by: number;
6
- };
7
- RETURN: boolean;
8
- }
@@ -1,60 +0,0 @@
1
- import { default as START_RENDER } from './renderer/startrender.ts';
2
- import { default as SET_BACKGROUND } from './scene/setbackground.ts';
3
- import { default as RESET_CAMERA } from './camera/resetcamera.ts';
4
- import { default as SET_CAMERA_LAYER } from './camera/setcameralayer.ts';
5
- import { default as ZOOM_CAMERA } from './camera/zoomcamera.ts';
6
- import { default as SET_GIZMO_MODE } from './toolbox/select/setgizmomode.ts';
7
- import { default as SET_CAMERA_TRANSFORM } from './camera/setcameratransform.ts';
8
- import { default as MOVE_CAMERA } from './camera/movecamera.ts';
9
- import { default as PLACE_ON_FLOOR } from './object/model/placeonfloor.ts';
10
- import { default as GET_ALL_OBJECTS } from './object/getallobjects.ts';
11
- import { default as GET_OBJECTS } from './object/getobjects.ts';
12
- import { default as ADD_OBJECT } from './object/addobject.ts';
13
- import { default as DELETE_OBJECT } from './object/deleteobject.ts';
14
- import { default as UPDATE_OBJECT } from './object/updateobject.ts';
15
- import { default as MODEL_LOADED } from './object/model/modelloaded.ts';
16
- import { default as UPDATE_SCENE } from './scene/updatescene.ts';
17
- import { default as GENERATE_MEDIA } from './media/generatemedia.ts';
18
- import { default as GET_ALL_SCENE_DATA } from './scene/getallscenedata.ts';
19
- import { default as SELECT_OBJECT } from './object/selectobject.ts';
20
- import { default as DESELECT_OBJECT } from './object/deselectobject.ts';
21
- import { default as GET_CAMERA_TRANSFORM } from './camera/getcameratransform.ts';
22
- import { default as DROP_IT } from './object/model/dropit.ts';
23
- import { default as SET_GIZMO_VISIBILITY } from './toolbox/transform/setgizmovisible.js';
24
- import { default as SET_GIZMO_SCALE_LINKED } from './toolbox/transform/setgizmoscalelinked.ts';
25
- import { default as COMPUTE_ENCOMPASSING_VIEW } from './camera/computeencompassingview.ts';
26
- import { default as USE_TOOL } from './toolbox/usetool.ts';
27
- import { default as SET_PARENT } from './object/setparent.ts';
28
- import { default as EXPORT_SCENE } from './scene/exportscene.ts';
29
- import { default as LAUNCH_AR } from './scene/launchar.ts';
30
- export interface Actions {
31
- START_RENDER: START_RENDER;
32
- GET_ALL_SCENE_DATA: GET_ALL_SCENE_DATA;
33
- GET_ALL_OBJECTS: GET_ALL_OBJECTS;
34
- GET_OBJECTS: GET_OBJECTS;
35
- ADD_OBJECT: ADD_OBJECT;
36
- UPDATE_OBJECT: UPDATE_OBJECT;
37
- DELETE_OBJECT: DELETE_OBJECT;
38
- SELECT_OBJECT: SELECT_OBJECT;
39
- DESELECT_OBJECT: DESELECT_OBJECT;
40
- SET_BACKGROUND: SET_BACKGROUND;
41
- DROP_IT: DROP_IT;
42
- PLACE_ON_FLOOR: PLACE_ON_FLOOR;
43
- SET_CAMERA_TRANSFORM: SET_CAMERA_TRANSFORM;
44
- GET_CAMERA_TRANSFORM: GET_CAMERA_TRANSFORM;
45
- MOVE_CAMERA: MOVE_CAMERA;
46
- RESET_CAMERA: RESET_CAMERA;
47
- COMPUTE_ENCOMPASSING_VIEW: COMPUTE_ENCOMPASSING_VIEW;
48
- SET_CAMERA_LAYER: SET_CAMERA_LAYER;
49
- ZOOM_CAMERA: ZOOM_CAMERA;
50
- SET_GIZMO_MODE: SET_GIZMO_MODE;
51
- SET_GIZMO_VISIBILITY: SET_GIZMO_VISIBILITY;
52
- SET_GIZMO_SCALE_LINKED: SET_GIZMO_SCALE_LINKED;
53
- USE_TOOL: USE_TOOL;
54
- MODEL_LOADED: MODEL_LOADED;
55
- UPDATE_SCENE: UPDATE_SCENE;
56
- GENERATE_MEDIA: GENERATE_MEDIA;
57
- SET_PARENT: SET_PARENT;
58
- EXPORT_SCENE: EXPORT_SCENE;
59
- LAUNCH_AR: LAUNCH_AR;
60
- }
@@ -1,14 +0,0 @@
1
- import { Vector3Like } from 'three';
2
- export default interface GENERATE_MEDIA {
3
- DESCRIPTION: 'Generates a screenshot, stores it in a Blob and returns a Promise of a valid URI.';
4
- PAYLOAD: ({
5
- position: Vector3Like;
6
- target: Vector3Like;
7
- } | {
8
- id: string;
9
- }) & {
10
- width: number;
11
- height: number;
12
- };
13
- RETURN: Promise<string>;
14
- }
@@ -1,6 +0,0 @@
1
- import { COMEntity } from '../../types';
2
- export default interface ADD_OBJECT {
3
- DESCRIPTION: 'Adds an object to the scene.';
4
- PAYLOAD: COMEntity;
5
- RETURN: boolean;
6
- }
@@ -1,8 +0,0 @@
1
- import { COMEntity } from '../../types';
2
- export default interface DELETE_OBJECT {
3
- DESCRIPTION: 'Deletes an object from the scene.';
4
- PAYLOAD: Partial<COMEntity> & {
5
- id: string;
6
- };
7
- RETURN: boolean;
8
- }
@@ -1,8 +0,0 @@
1
- import { COMEntity } from '../../types';
2
- export default interface DESELECT_OBJECT {
3
- DESCRIPTION: 'Deselects an existing object.';
4
- PAYLOAD: Partial<COMEntity> & {
5
- id: string;
6
- };
7
- RETURN: boolean;
8
- }
@@ -1,6 +0,0 @@
1
- import { COMEntity } from '../../types';
2
- export default interface GET_ALL_OBJECTS {
3
- readonly DESCRIPTION: 'Retrieves all objects in the scene.';
4
- PAYLOAD: Map<string, COMEntity>;
5
- RETURN: Map<string, COMEntity>;
6
- }
@@ -1,8 +0,0 @@
1
- import { COMEntity } from '../../types';
2
- export default interface GET_OBJECTS {
3
- DESCRIPTION: 'Returns a list of objects of given IDs.';
4
- PAYLOAD: {
5
- ids: string[];
6
- };
7
- RETURN: COMEntity[];
8
- }
@@ -1,7 +0,0 @@
1
- export default interface DROP_IT {
2
- DESCRIPTION: 'Places an object on top of an underlying object or the floor.';
3
- PAYLOAD: {
4
- id: string;
5
- };
6
- RETURN: boolean;
7
- }
@@ -1,7 +0,0 @@
1
- export default interface MODEL_LOADED {
2
- DESCRIPTION: 'Is triggered when a model is loaded.';
3
- PAYLOAD: {
4
- id: string;
5
- };
6
- RETURN: boolean;
7
- }
@@ -1,7 +0,0 @@
1
- export default interface PLACE_ON_FLOOR {
2
- DESCRIPTION: 'Places an object on the floor.';
3
- PAYLOAD: {
4
- id: string;
5
- };
6
- RETURN: boolean;
7
- }
@@ -1,8 +0,0 @@
1
- import { COMEntity } from '../../types';
2
- export default interface SELECT_OBJECT {
3
- DESCRIPTION: 'Selects an existing object.';
4
- PAYLOAD: Partial<COMEntity> & {
5
- id: string;
6
- };
7
- RETURN: boolean;
8
- }
@@ -1,13 +0,0 @@
1
- import { COMEntity } from '../../types';
2
- export default interface SET_PARENT {
3
- DESCRIPTION: 'Attach an object to another object.';
4
- PAYLOAD: {
5
- object: Partial<COMEntity> & {
6
- id: string;
7
- };
8
- parent: (Partial<COMEntity> & {
9
- id: string;
10
- }) | null;
11
- };
12
- RETURN: boolean;
13
- }
@@ -1,8 +0,0 @@
1
- import { COMEntity } from '../../types';
2
- export default interface UPDATE_OBJECT {
3
- DESCRIPTION: 'Updates an existing object.';
4
- PAYLOAD: Partial<COMEntity> & {
5
- id: string;
6
- };
7
- RETURN: boolean;
8
- }
@@ -1,5 +0,0 @@
1
- export default interface START_RENDER {
2
- DESCRIPTION: 'Starts the render process.';
3
- PAYLOAD: undefined;
4
- RETURN: boolean;
5
- }
@@ -1,8 +0,0 @@
1
- import { DIVESceneFileType } from '../../../types';
2
- export default interface EXPORT_SCENE {
3
- DESCRIPTION: 'Exports the current scene to a blob and returns the URL.';
4
- PAYLOAD: {
5
- type: keyof DIVESceneFileType;
6
- };
7
- RETURN: Promise<ArrayBuffer | null>;
8
- }
@@ -1,6 +0,0 @@
1
- import { DIVESceneData } from '../../../types';
2
- export default interface GET_ALL_SCENE_DATA {
3
- DESCRIPTION: 'Retrieves all current scene data.';
4
- PAYLOAD: object;
5
- RETURN: DIVESceneData;
6
- }
@@ -1,9 +0,0 @@
1
- import { ARSystemOptions } from '../../../modules/ar/ARSystem';
2
- export default interface LAUNCH_AR {
3
- DESCRIPTION: 'Launches AR mode in native capabilities. (iOS: AR Quick Look, Android: Google Scene Viewer)';
4
- PAYLOAD: {
5
- uri: string;
6
- options?: ARSystemOptions;
7
- };
8
- RETURN: Promise<void>;
9
- }
@@ -1,7 +0,0 @@
1
- export default interface SET_BACKGROUND {
2
- DESCRIPTION: 'Set the background color of the scene.';
3
- PAYLOAD: {
4
- color: string | number;
5
- };
6
- RETURN: boolean;
7
- }
@@ -1,11 +0,0 @@
1
- export default interface UPDATE_SCENE {
2
- DESCRIPTION: 'Updates global scene data.';
3
- PAYLOAD: {
4
- name?: string;
5
- backgroundColor?: string | number;
6
- gridEnabled?: boolean;
7
- floorEnabled?: boolean;
8
- floorColor?: string | number;
9
- };
10
- RETURN: boolean;
11
- }
@@ -1,7 +0,0 @@
1
- export default interface SET_GIZMO_MODE {
2
- DESCRIPTION: "Sets the gizmo's mode.";
3
- PAYLOAD: {
4
- mode: 'translate' | 'rotate' | 'scale';
5
- };
6
- RETURN: boolean;
7
- }
@@ -1,5 +0,0 @@
1
- export default interface SET_GIZMO_SCALE_LINKED {
2
- DESCRIPTION: "Sets the gizmo's unified scale mode.";
3
- PAYLOAD: boolean;
4
- RETURN: boolean;
5
- }
@@ -1,5 +0,0 @@
1
- export default interface SET_GIZMO_VISIBILITY {
2
- DESCRIPTION: "Sets the gizmo's visibility.";
3
- PAYLOAD: boolean;
4
- RETURN: boolean;
5
- }
@@ -1,8 +0,0 @@
1
- import { ToolType } from '../../../toolbox/Toolbox';
2
- export default interface USE_TOOL {
3
- DESCRIPTION: 'Activates a specific tool from the toolbox.';
4
- PAYLOAD: {
5
- tool: ToolType;
6
- };
7
- RETURN: boolean;
8
- }
@@ -1,6 +0,0 @@
1
- import { COMPov } from './COMPov';
2
- import { COMLight } from './COMLight';
3
- import { COMModel } from './COMModel';
4
- import { COMPrimitive } from './COMPrimitive';
5
- import { COMGroup } from './COMGroup';
6
- export type COMEntity = COMPov | COMLight | COMModel | COMPrimitive | COMGroup;
@@ -1,7 +0,0 @@
1
- import { Vector3Like } from 'three';
2
- import { COMBaseEntity } from './COMBaseEntity';
3
- export type COMPov = COMBaseEntity & {
4
- position: Vector3Like;
5
- target: Vector3Like;
6
- locked?: boolean;
7
- };
@@ -1,11 +0,0 @@
1
- import { Vector3Like } from 'three';
2
- import { COMBaseEntity } from './COMBaseEntity';
3
- import { COMGeometry } from './COMGeometry';
4
- import { COMMaterial } from './COMMaterial';
5
- export type COMPrimitive = COMBaseEntity & {
6
- position: Vector3Like;
7
- rotation: Vector3Like;
8
- scale: Vector3Like;
9
- geometry: COMGeometry;
10
- material?: Partial<COMMaterial>;
11
- };
@@ -1,11 +0,0 @@
1
- import { COMEntity } from './COMEntity';
2
- import { COMPrimitive } from './COMPrimitive';
3
- import { COMModel } from './COMModel';
4
- import { COMLight } from './COMLight';
5
- import { COMPov } from './COMPov';
6
- import { COMGeometry } from './COMGeometry';
7
- import { COMMaterial } from './COMMaterial';
8
- import { COMGroup } from './COMGroup';
9
- import { COMEntityType } from './COMEntityType';
10
- import { COMGeometryType } from './COMGeometryType';
11
- export type { COMEntity, COMPrimitive, COMModel, COMLight, COMPov, COMGeometry, COMMaterial, COMGroup, COMEntityType, COMGeometryType, };
@@ -1,38 +0,0 @@
1
- import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls';
2
- import { DIVEPerspectiveCamera } from '../engine/camera/PerspectiveCamera.ts';
3
- import { DIVERenderer } from '../engine/renderer/Renderer.ts';
4
- import { Box3, Vector3Like } from 'three';
5
- import { DIVEAnimationSystem } from '../animation/AnimationSystem.ts';
6
- export type DIVEOrbitControlsSettings = {
7
- enableDamping: boolean;
8
- dampingFactor: number;
9
- };
10
- export declare const DIVEOrbitControlsDefaultSettings: DIVEOrbitControlsSettings;
11
- /**
12
- * Orbit Controls. Basic functionality to orbit around a given target point in the scene.
13
- *
14
- * @module
15
- */
16
- export default class DIVEOrbitControls extends OrbitControls {
17
- static readonly DEFAULT_ZOOM_FACTOR = 1;
18
- private _animationSystem;
19
- private last;
20
- private animating;
21
- private locked;
22
- private stopMoveTo;
23
- private stopRevertLast;
24
- object: DIVEPerspectiveCamera;
25
- domElement: HTMLCanvasElement;
26
- private _removePreRenderCallback;
27
- constructor(camera: DIVEPerspectiveCamera, renderer: DIVERenderer, animationSystem: DIVEAnimationSystem, settings?: Partial<DIVEOrbitControlsSettings>);
28
- Dispose(): void;
29
- ComputeEncompassingView(bb: Box3): {
30
- position: Vector3Like;
31
- target: Vector3Like;
32
- };
33
- ZoomIn(by?: number): void;
34
- ZoomOut(by?: number): void;
35
- MoveTo(pos: Vector3Like | undefined, target: Vector3Like | undefined, duration: number, lock: boolean): void;
36
- RevertLast(duration: number): void;
37
- private preRenderCallback;
38
- }
@@ -1,49 +0,0 @@
1
- import { DIVEOrbitControlsSettings } from './controls/OrbitControls.ts';
2
- import { DIVECommunication } from './com/Communication.ts';
3
- import { Engine, EngineSettings } from './engine/Engine.ts';
4
- export type DIVESettings = EngineSettings & {
5
- orbitControls: Partial<DIVEOrbitControlsSettings>;
6
- };
7
- export declare const DIVEDefaultSettings: DIVESettings;
8
- /**
9
- * #### DIVE
10
- * is the main class of the DIVE framework.
11
- *
12
- * An instance of this class delivers a complete 3D environment with a perspective camera, orbit controls, a toolbox, and a communication system.
13
- * ```ts
14
- * import { DIVE } from "@shopware-ag/dive";
15
- *
16
- * const myWrapper = document.getElementById('myWrapper');
17
- *
18
- * const dive = new DIVE();
19
- *
20
- * myWrapper.appendChild(dive.Canvas);
21
- *
22
- * dive.Communication.Subscribe('GET_ALL_SCENE_DATA', () => {
23
- * // do something
24
- * }));
25
- *
26
- * dive.Communication.PerformAction('GET_ALL_SCENE_DATA', {});
27
- * ```
28
- * @module
29
- */
30
- export default class DIVE {
31
- static QuickView(uri: string, settings?: Partial<DIVESettings>): Promise<DIVE>;
32
- private _settings;
33
- get engine(): Engine;
34
- private _engine;
35
- private orbitControls;
36
- private toolbox;
37
- private _communication;
38
- private animationSystem;
39
- private axisCamera;
40
- get communication(): DIVECommunication;
41
- get canvas(): HTMLCanvasElement;
42
- constructor(settings?: Partial<DIVESettings>);
43
- Dispose(): void;
44
- }
45
- export { DIVE, DIVECommunication };
46
- export { DIVEMath } from './math/index.ts';
47
- export * from './com/actions/index.ts';
48
- export * from './com/types';
49
- export * from './types';
@@ -1,4 +0,0 @@
1
- export { ParseError } from './parse/parse-error';
2
- export { FileTypeError } from './file-type/file-type-error';
3
- export { NetworkError } from './network/network-error';
4
- export { ARCompatibilityError } from './ar-compatibility/ar-compatibility-error';
@@ -1,7 +0,0 @@
1
- export * from './getFileTypeFromUri/getFileTypeFromUri';
2
- export * from './isFileTypeSupported/isFileTypeSupported';
3
- export * from './findSceneRecursive/findSceneRecursive';
4
- export * from './getObjectDelta/getObjectDelta';
5
- export * from './isInterface/implementsInterface';
6
- export * from './findInterface/findInterface';
7
- export * from './applyMixins/applyMixins';
@@ -1,21 +0,0 @@
1
- /** @internal */
2
- /**
3
- * @internal
4
- * Handles the dynamic importing and caching of module classes.
5
- * This class is responsible for:
6
- * 1. Resolving the build path for a module
7
- * 2. Dynamically importing the module class
8
- * 3. Caching the imported class to avoid multiple imports
9
- */
10
- export declare class ModuleImporter<T extends new (...args: unknown[]) => unknown> {
11
- private _name;
12
- private _promise;
13
- private _importFn;
14
- constructor(_name: keyof ModuleClasses);
15
- /**
16
- * @internal
17
- * Get the module class, importing it if not already cached.
18
- * @returns A Promise that resolves to the module's class constructor.
19
- */
20
- getClass(): Promise<T>;
21
- }