@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,2 +1 @@
1
- "use strict";var a=Object.defineProperty;var d=(r,e,s)=>e in r?a(r,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):r[e]=s;var o=(r,e,s)=>d(r,typeof e!="symbol"?e+"":e,s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../../chunks/index-MNP0K5dt.cjs");class n{static getSystem(){if(typeof window>"u"||!window.navigator)return t.ESystem.UNKNOWN;const e=window.navigator.userAgent.toLowerCase();return e.includes("iphone")||e.includes("ipad")?t.ESystem.IOS:e.includes("android")?t.ESystem.ANDROID:e.includes("windows")?t.ESystem.WINDOWS:e.includes("macintosh")?t.ESystem.MACOS:e.includes("linux")?t.ESystem.LINUX:t.ESystem.UNKNOWN}static async getSupportsWebXR(){if(this._supportsWebXR!==!1)return this._supportsWebXR;if(!window.isSecureContext)return this._supportsWebXR=!1,this._webXRUnsupportedReason=t.EWebXRUnsupportedReason.NO_HTTPS,this._supportsWebXR;if(!navigator.xr)return this._supportsWebXR=!1,this._webXRUnsupportedReason=t.EWebXRUnsupportedReason.NO_WEBXR_API,this._supportsWebXR;try{const e=await navigator.xr.isSessionSupported("immersive-ar");this._supportsWebXR=e,this._supportsWebXR||(this._webXRUnsupportedReason=t.EWebXRUnsupportedReason.IMMERSIVE_AR_NOT_SUPPORTED_BY_DEVICE)}catch{this._supportsWebXR=!1,this._webXRUnsupportedReason=t.EWebXRUnsupportedReason.AR_PERMISSION_DENIED}return this._supportsWebXR}static getWebXRUnsupportedReason(){return this._supportsWebXR?(console.log("WebXR is supported."),null):this._webXRUnsupportedReason}static getSupportsARQuickLook(){if(document.createElement("a").relList.supports("ar"))return!0;const s=window.navigator.userAgent,i=window.navigator.platform,u=window.navigator.vendor,p="ARQuickLook is not supported";throw new t.ARCompatibilityError(p,s,i,u)}static getSupportsSceneViewer(){if(typeof window>"u"||!window.navigator)return!1;const e=window.navigator.userAgent.toLowerCase();if(!e.includes("android")||!e.includes("chrome"))return!1;const s=e.match(/chrome\/(\d+)/);return!(!s||parseInt(s[1])<89)}static get isMobile(){return this.getSystem()===t.ESystem.ANDROID||this.getSystem()===t.ESystem.IOS}static get isDesktop(){return!this.isMobile}static getSupportsAR(){return this.getSupportsARQuickLook()||this.getSupportsSceneViewer()}}o(n,"_supportsWebXR",!1),o(n,"_webXRUnsupportedReason",null);exports.SystemInfo=n;
2
- //# sourceMappingURL=SystemInfo.cjs.map
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../../../chunks/index-DAwIH9xh.cjs");const e=require("../../../chunks/SystemInfo-oX-NNneO.cjs");exports.SystemInfo=e.SystemInfo;
@@ -1,4 +1,4 @@
1
- import { ESystem, EWebXRUnsupportedReason } from '../../types/info';
1
+ import { ESystem, EWebXRUnsupportedReason } from '../../types/info/index.ts';
2
2
  declare global {
3
3
  interface ModuleClasses {
4
4
  SystemInfo: typeof SystemInfo;
@@ -10,20 +10,17 @@ declare global {
10
10
  * Provides information about the system's capabilities and performance:
11
11
  *
12
12
  * ```ts
13
- * import { ModuleRegistry } from '@shopware-ag/dive/modules';
14
- *
15
- * const SystemInfo = await ModuleRegistry.get('SystemInfo');
16
- * const systemInfo = new SystemInfo();
13
+ * import { SystemInfo } from '@shopware-ag/dive/modules/SystemInfo';
17
14
  *
18
15
  * // Get system information
19
- * const system = systemInfo.getSystem(); // Returns ESystem enum (IOS, ANDROID, etc.)
16
+ * const system = SystemInfo.getSystem(); // Returns ESystem enum (IOS, ANDROID, etc.)
20
17
  *
21
18
  * // Check AR capabilities
22
- * const supportsAR = systemInfo.getSupportsAR();
19
+ * const supportsAR = SystemInfo.getSupportsAR();
23
20
  *
24
21
  * // Check device type
25
- * const isMobile = systemInfo.isMobile;
26
- * const isDesktop = systemInfo.isDesktop;
22
+ * const isMobile = SystemInfo.isMobile;
23
+ * const isDesktop = SystemInfo.isDesktop;
27
24
  * ```
28
25
  *
29
26
  * Features:
@@ -1,115 +1,5 @@
1
- var c = Object.defineProperty;
2
- var d = (r, t, e) => t in r ? c(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
3
- var i = (r, t, e) => d(r, typeof t != "symbol" ? t + "" : t, e);
4
- import { E as s, a as o, A as R } from "../../../chunks/index-C7Wx_9uY.mjs";
5
- class n {
6
- /**
7
- * Gets the current system (iOS, Android, Windows, etc.)
8
- * @returns DIVESystem The current system
9
- */
10
- static getSystem() {
11
- if (typeof window > "u" || !window.navigator)
12
- return s.UNKNOWN;
13
- const t = window.navigator.userAgent.toLowerCase();
14
- return t.includes("iphone") || t.includes("ipad") ? s.IOS : t.includes("android") ? s.ANDROID : t.includes("windows") ? s.WINDOWS : t.includes("macintosh") ? s.MACOS : t.includes("linux") ? s.LINUX : s.UNKNOWN;
15
- }
16
- /**
17
- * @returns A promise that resolves to a boolean indicating whether the user's device supports WebXR.
18
- */
19
- static async getSupportsWebXR() {
20
- if (this._supportsWebXR !== !1)
21
- return this._supportsWebXR;
22
- if (!window.isSecureContext)
23
- return this._supportsWebXR = !1, this._webXRUnsupportedReason = o.NO_HTTPS, this._supportsWebXR;
24
- if (!navigator.xr)
25
- return this._supportsWebXR = !1, this._webXRUnsupportedReason = o.NO_WEBXR_API, this._supportsWebXR;
26
- try {
27
- const t = await navigator.xr.isSessionSupported("immersive-ar");
28
- this._supportsWebXR = t, this._supportsWebXR || (this._webXRUnsupportedReason = o.IMMERSIVE_AR_NOT_SUPPORTED_BY_DEVICE);
29
- } catch {
30
- this._supportsWebXR = !1, this._webXRUnsupportedReason = o.AR_PERMISSION_DENIED;
31
- }
32
- return this._supportsWebXR;
33
- }
34
- /**
35
- * @returns The reason why WebXR is not supported on the user's device. Returns null if WebXR is supported.
36
- */
37
- static getWebXRUnsupportedReason() {
38
- return this._supportsWebXR ? (console.log("WebXR is supported."), null) : this._webXRUnsupportedReason;
39
- }
40
- /**
41
- * Checks if ARQuickLook is supported on the current device
42
- * This checks for:
43
- * 1. AR support via relList
44
- *
45
- * Requirements:
46
- * - iOS 13.0 or later
47
- * - Safari browser (ARQuickLook is only supported in Safari)
48
- * - Device with AR capabilities (iPhone/iPad with LiDAR scanner or ARKit support)
49
- *
50
- * Note: ARQuickLook is only available in Safari on iOS. Other browsers
51
- * (Chrome, Firefox, etc.) do not support ARQuickLook, even on iOS.
52
- *
53
- * @returns boolean indicating if ARQuickLook is supported
54
- * @throws ARCompatibilityError if ARQuickLook is not supported, with detailed browser information
55
- */
56
- static getSupportsARQuickLook() {
57
- if (document.createElement("a").relList.supports("ar"))
58
- return !0;
59
- const e = window.navigator.userAgent, u = window.navigator.platform, a = window.navigator.vendor, p = "ARQuickLook is not supported";
60
- throw new R(
61
- p,
62
- e,
63
- u,
64
- a
65
- );
66
- }
67
- /**
68
- * Checks if SceneViewer is supported on the current device
69
- * This checks for:
70
- * 1. Android device
71
- * 2. Chrome browser (version 89 or later)
72
- *
73
- * Requirements:
74
- * - Android 7.0 (API level 24) or later
75
- * - Chrome for Android 89 or later
76
- *
77
- * Note: According to Google's documentation, if these requirements are met,
78
- * SceneViewer will be available. If ARCore is not installed, SceneViewer will
79
- * fall back to showing the model in 3D.
80
- *
81
- * @returns boolean indicating if SceneViewer is supported
82
- */
83
- static getSupportsSceneViewer() {
84
- if (typeof window > "u" || !window.navigator)
85
- return !1;
86
- const t = window.navigator.userAgent.toLowerCase();
87
- if (!t.includes("android") || !t.includes("chrome"))
88
- return !1;
89
- const e = t.match(/chrome\/(\d+)/);
90
- return !(!e || parseInt(e[1]) < 89);
91
- }
92
- /**
93
- * @returns A boolean indicating whether the user's device is a mobile device.
94
- */
95
- static get isMobile() {
96
- return this.getSystem() === s.ANDROID || this.getSystem() === s.IOS;
97
- }
98
- /**
99
- * @returns A boolean indicating whether the user's device is a desktop device.
100
- */
101
- static get isDesktop() {
102
- return !this.isMobile;
103
- }
104
- /**
105
- * @returns A promise that resolves to a boolean indicating whether the user's device is capable of AR.
106
- */
107
- static getSupportsAR() {
108
- return this.getSupportsARQuickLook() || this.getSupportsSceneViewer();
109
- }
110
- }
111
- i(n, "_supportsWebXR", !1), i(n, "_webXRUnsupportedReason", null);
1
+ import "../../../chunks/index-C_uFFwT2.mjs";
2
+ import { S as t } from "../../../chunks/SystemInfo-DPAQG-S5.mjs";
112
3
  export {
113
- n as SystemInfo
4
+ t as SystemInfo
114
5
  };
115
- //# sourceMappingURL=SystemInfo.mjs.map
@@ -1,8 +1,8 @@
1
1
  import { Intersection, Object3D, Raycaster, Vector2, Vector3 } from 'three';
2
- import { DIVEScene } from '../engine/scene/Scene';
3
- import { default as DIVEOrbitControls } from '../controls/OrbitControls';
4
- import { DIVEDraggable } from '../interface/Draggable';
5
- import { DIVEHoverable } from '../interface/Hoverable';
2
+ import { DIVEScene } from '../../engine/scene/Scene.ts';
3
+ import { OrbitController } from '../controller/orbit/OrbitController.ts';
4
+ import { DIVEDraggable } from '../../interfaces/Draggable.ts';
5
+ import { DIVEHoverable } from '../../interfaces/Hoverable.ts';
6
6
  export type DraggableEvent = {
7
7
  dragStart: Vector3;
8
8
  dragCurrent: Vector3;
@@ -14,7 +14,7 @@ export declare abstract class DIVEBaseTool {
14
14
  name: string;
15
15
  protected _canvas: HTMLElement;
16
16
  protected _scene: DIVEScene;
17
- protected _controller: DIVEOrbitControls;
17
+ protected _controller: OrbitController;
18
18
  protected _pointer: Vector2;
19
19
  protected get _pointerAnyDown(): boolean;
20
20
  protected _pointerPrimaryDown: boolean;
@@ -32,7 +32,7 @@ export declare abstract class DIVEBaseTool {
32
32
  protected _dragDelta: Vector3;
33
33
  protected _draggable: DIVEDraggable | null;
34
34
  protected _dragRaycastOnObjects: Object3D[] | null;
35
- protected constructor(scene: DIVEScene, controller: DIVEOrbitControls);
35
+ protected constructor(scene: DIVEScene, controller: OrbitController);
36
36
  Activate(): void;
37
37
  Deactivate(): void;
38
38
  onPointerDown(e: PointerEvent): void;
@@ -0,0 +1 @@
1
+ "use strict";var l=Object.defineProperty;var s=(t,e,o)=>e in t?l(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o;var i=(t,e,o)=>s(t,typeof e!="symbol"?e+"":e,o);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../../chunks/SelectTool-BRKko7uz.cjs");class n{constructor(e,o){i(this,"_scene");i(this,"_controller");i(this,"_activeTool");i(this,"_selectTool");this._scene=e,this._controller=o,this._selectTool=null,this._activeTool=null}get selectTool(){return this._selectTool||(this._selectTool=new r.DIVESelectTool(this._scene,this._controller)),this._selectTool}Dispose(){this.removeEventListeners()}GetActiveTool(){return this._activeTool}UseTool(e){var o;switch((o=this._activeTool)==null||o.Deactivate(),e){case"select":{this.addEventListeners(),this.selectTool.Activate(),this._activeTool=this.selectTool;break}case"none":{this.removeEventListeners(),this._activeTool=null;break}default:console.warn(`DIVEToolBox.UseTool: Unknown tool: ${e}`)}}SetGizmoMode(e){this.selectTool.SetGizmoMode(e)}SetGizmoVisibility(e){this.selectTool.SetGizmoVisibility(e)}SetGizmoScaleLinked(e){this.selectTool.SetGizmoScaleLinked(e)}onPointerMove(e){var o;(o=this._activeTool)==null||o.onPointerMove(e)}onPointerDown(e){var o;(o=this._activeTool)==null||o.onPointerDown(e)}onPointerUp(e){var o;(o=this._activeTool)==null||o.onPointerUp(e)}onWheel(e){var o;(o=this._activeTool)==null||o.onWheel(e)}addEventListeners(){this._controller.domElement.addEventListener("pointermove",e=>this.onPointerMove(e)),this._controller.domElement.addEventListener("pointerdown",e=>this.onPointerDown(e)),this._controller.domElement.addEventListener("pointerup",e=>this.onPointerUp(e)),this._controller.domElement.addEventListener("wheel",e=>this.onWheel(e))}removeEventListeners(){this._controller.domElement.removeEventListener("pointermove",e=>this.onPointerMove(e)),this._controller.domElement.removeEventListener("pointerdown",e=>this.onPointerDown(e)),this._controller.domElement.removeEventListener("pointerup",e=>this.onPointerUp(e)),this._controller.domElement.removeEventListener("wheel",e=>this.onWheel(e))}}i(n,"DefaultTool","select");exports.Toolbox=n;
@@ -1,21 +1,25 @@
1
- import { default as DIVEOrbitControls } from '../controls/OrbitControls.ts';
2
- import { DIVEScene } from '../engine/scene/Scene.ts';
1
+ import { DIVEScene } from '../../engine/scene/Scene.ts';
3
2
  import { DIVEBaseTool } from './BaseTool.ts';
4
3
  import { DIVESelectTool } from './select/SelectTool.ts';
4
+ import { OrbitController } from '../controller/orbit/OrbitController.ts';
5
5
  export type ToolType = 'select' | 'none';
6
+ declare global {
7
+ interface ModuleClasses {
8
+ Toolbox: typeof Toolbox;
9
+ }
10
+ }
6
11
  /**
12
+ * @module Toolbox
7
13
  * A Toolbox to activate and deactivate tools to use with the pointer.
8
- *
9
- * @module
10
14
  */
11
- export default class DIVEToolbox {
15
+ export declare class Toolbox {
12
16
  static readonly DefaultTool = "select";
13
17
  private _scene;
14
18
  private _controller;
15
19
  private _activeTool;
16
20
  private _selectTool;
17
21
  get selectTool(): DIVESelectTool;
18
- constructor(scene: DIVEScene, controller: DIVEOrbitControls);
22
+ constructor(scene: DIVEScene, controller: OrbitController);
19
23
  Dispose(): void;
20
24
  GetActiveTool(): DIVEBaseTool | null;
21
25
  UseTool(tool: ToolType): void;
@@ -0,0 +1,99 @@
1
+ var n = Object.defineProperty;
2
+ var l = (t, e, o) => e in t ? n(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o;
3
+ var i = (t, e, o) => l(t, typeof e != "symbol" ? e + "" : e, o);
4
+ import { D as s } from "../../../chunks/SelectTool-mTRiZYaC.mjs";
5
+ class r {
6
+ constructor(e, o) {
7
+ i(this, "_scene");
8
+ i(this, "_controller");
9
+ i(this, "_activeTool");
10
+ i(this, "_selectTool");
11
+ this._scene = e, this._controller = o, this._selectTool = null, this._activeTool = null;
12
+ }
13
+ get selectTool() {
14
+ return this._selectTool || (this._selectTool = new s(
15
+ this._scene,
16
+ this._controller
17
+ )), this._selectTool;
18
+ }
19
+ Dispose() {
20
+ this.removeEventListeners();
21
+ }
22
+ GetActiveTool() {
23
+ return this._activeTool;
24
+ }
25
+ UseTool(e) {
26
+ var o;
27
+ switch ((o = this._activeTool) == null || o.Deactivate(), e) {
28
+ case "select": {
29
+ this.addEventListeners(), this.selectTool.Activate(), this._activeTool = this.selectTool;
30
+ break;
31
+ }
32
+ case "none": {
33
+ this.removeEventListeners(), this._activeTool = null;
34
+ break;
35
+ }
36
+ default:
37
+ console.warn(`DIVEToolBox.UseTool: Unknown tool: ${e}`);
38
+ }
39
+ }
40
+ SetGizmoMode(e) {
41
+ this.selectTool.SetGizmoMode(e);
42
+ }
43
+ SetGizmoVisibility(e) {
44
+ this.selectTool.SetGizmoVisibility(e);
45
+ }
46
+ SetGizmoScaleLinked(e) {
47
+ this.selectTool.SetGizmoScaleLinked(e);
48
+ }
49
+ onPointerMove(e) {
50
+ var o;
51
+ (o = this._activeTool) == null || o.onPointerMove(e);
52
+ }
53
+ onPointerDown(e) {
54
+ var o;
55
+ (o = this._activeTool) == null || o.onPointerDown(e);
56
+ }
57
+ onPointerUp(e) {
58
+ var o;
59
+ (o = this._activeTool) == null || o.onPointerUp(e);
60
+ }
61
+ onWheel(e) {
62
+ var o;
63
+ (o = this._activeTool) == null || o.onWheel(e);
64
+ }
65
+ addEventListeners() {
66
+ this._controller.domElement.addEventListener(
67
+ "pointermove",
68
+ (e) => this.onPointerMove(e)
69
+ ), this._controller.domElement.addEventListener(
70
+ "pointerdown",
71
+ (e) => this.onPointerDown(e)
72
+ ), this._controller.domElement.addEventListener(
73
+ "pointerup",
74
+ (e) => this.onPointerUp(e)
75
+ ), this._controller.domElement.addEventListener(
76
+ "wheel",
77
+ (e) => this.onWheel(e)
78
+ );
79
+ }
80
+ removeEventListeners() {
81
+ this._controller.domElement.removeEventListener(
82
+ "pointermove",
83
+ (e) => this.onPointerMove(e)
84
+ ), this._controller.domElement.removeEventListener(
85
+ "pointerdown",
86
+ (e) => this.onPointerDown(e)
87
+ ), this._controller.domElement.removeEventListener(
88
+ "pointerup",
89
+ (e) => this.onPointerUp(e)
90
+ ), this._controller.domElement.removeEventListener(
91
+ "wheel",
92
+ (e) => this.onWheel(e)
93
+ );
94
+ }
95
+ }
96
+ i(r, "DefaultTool", "select");
97
+ export {
98
+ r as Toolbox
99
+ };
@@ -1,7 +1,7 @@
1
- import { DIVEScene } from '../../engine/scene/Scene.ts';
2
- import { default as DIVETransformTool } from '../transform/TransformTool.ts';
3
- import { default as DIVEOrbitControls } from '../../controls/OrbitControls.ts';
4
- import { DIVESelectable } from '../../interface/Selectable.ts';
1
+ import { DIVEScene } from '../../../engine/scene/Scene.ts';
2
+ import { DIVETransformTool } from '../transform/TransformTool.ts';
3
+ import { OrbitController } from '../../controller/orbit/OrbitController.ts';
4
+ import { DIVESelectable } from '../../../interfaces/Selectable.ts';
5
5
  import { DIVEBaseTool } from '../BaseTool.ts';
6
6
  export declare const isSelectTool: (tool: DIVEBaseTool) => tool is DIVESelectTool;
7
7
  export interface DIVEObjectEventMap {
@@ -16,7 +16,7 @@ export interface DIVEObjectEventMap {
16
16
  */
17
17
  export declare class DIVESelectTool extends DIVETransformTool {
18
18
  readonly isSelectTool: boolean;
19
- constructor(scene: DIVEScene, controller: DIVEOrbitControls);
19
+ constructor(scene: DIVEScene, controller: OrbitController);
20
20
  Activate(): void;
21
21
  Select(selectable: DIVESelectable): void;
22
22
  Deselect(selectable: DIVESelectable): void;
@@ -1,8 +1,8 @@
1
+ import { TransformControls } from 'three/examples/jsm/controls/TransformControls.js';
1
2
  import { DIVEBaseTool } from '../BaseTool.ts';
2
- import { DIVEScene } from '../../engine/scene/Scene.ts';
3
- import { default as DIVEOrbitControls } from '../../controls/OrbitControls.ts';
4
- import { TransformControls } from 'three/examples/jsm/controls/TransformControls';
5
- import { DIVEGizmo } from '../../gizmo/Gizmo.ts';
3
+ import { DIVEScene } from '../../../engine/scene/Scene.ts';
4
+ import { OrbitController } from '../../controller/orbit/OrbitController.ts';
5
+ import { DIVEGizmo } from '../../../components/gizmo/Gizmo.ts';
6
6
  export declare const isTransformTool: (tool: DIVEBaseTool) => tool is DIVETransformTool;
7
7
  export interface DIVEObjectEventMap {
8
8
  select: object;
@@ -14,11 +14,11 @@ export interface DIVEObjectEventMap {
14
14
  *
15
15
  * @module
16
16
  */
17
- export default class DIVETransformTool extends DIVEBaseTool {
17
+ export declare class DIVETransformTool extends DIVEBaseTool {
18
18
  readonly isTransformTool: boolean;
19
19
  private _scaleLinked;
20
20
  protected _gizmo: TransformControls | DIVEGizmo;
21
- constructor(scene: DIVEScene, controller: DIVEOrbitControls);
21
+ constructor(scene: DIVEScene, controller: OrbitController);
22
22
  Activate(): void;
23
23
  SetGizmoMode(mode: 'translate' | 'rotate' | 'scale'): void;
24
24
  SetGizmoVisibility(active: boolean): void;
@@ -1,5 +1,5 @@
1
1
  import { Vector3Like } from 'three';
2
- import { COMGroup, COMLight, COMModel, COMPov, COMPrimitive } from '../dive';
2
+ import { COMGroup, COMLight, COMModel, COMPov, COMPrimitive } from '../modules/state/types/index.ts';
3
3
  export type DIVESceneData = {
4
4
  name: string;
5
5
  mediaItem: null;
@@ -1,7 +1,7 @@
1
- import { DIVEGroup } from '../group/Group';
2
- import { default as DIVEAmbientLight } from '../light/AmbientLight';
3
- import { default as DIVEPointLight } from '../light/PointLight';
4
- import { default as DIVESceneLight } from '../light/SceneLight';
5
- import { DIVEModel } from '../model/Model';
6
- import { DIVEPrimitive } from '../primitive/Primitive';
1
+ import { DIVEGroup } from '../components/group/Group.ts';
2
+ import { DIVEAmbientLight } from '../components/light/AmbientLight.ts';
3
+ import { DIVEPointLight } from '../components/light/PointLight.ts';
4
+ import { DIVESceneLight } from '../components/light/SceneLight.ts';
5
+ import { DIVEModel } from '../components/model/Model.ts';
6
+ import { DIVEPrimitive } from '../components/primitive/Primitive.ts';
7
7
  export type DIVESceneObject = DIVEModel | DIVEGroup | DIVEPrimitive | DIVEAmbientLight | DIVEPointLight | DIVESceneLight;
@@ -1,4 +1,4 @@
1
- import { GLTF } from 'three/examples/jsm/loaders/GLTFLoader';
1
+ import { GLTF } from 'three/examples/jsm/loaders/GLTFLoader.ts';
2
2
  export type DIVESceneFileType = {
3
3
  glb: GLTF;
4
4
  };
@@ -0,0 +1 @@
1
+ export type UUID = string;
@@ -1 +1 @@
1
- export * from './FileTypes';
1
+ export * from './FileTypes.ts';
@@ -1,6 +1,6 @@
1
- export * from './SceneData';
2
- export * from './SceneObjects';
3
- export * from './SceneType';
4
- export * from './file';
5
- export * from '../error';
6
- export * from './info';
1
+ export * from './SceneData.ts';
2
+ export * from './SceneObjects.ts';
3
+ export * from './SceneType.ts';
4
+ export * from './UUID.ts';
5
+ export * from './file/index.ts';
6
+ export * from './info/index.ts';
package/package.json CHANGED
@@ -1,21 +1,61 @@
1
1
  {
2
2
  "name": "@shopware-ag/dive",
3
- "version": "1.19.1-beta.8",
3
+ "version": "2.0.1-beta.0",
4
4
  "description": "Shopware Spatial Framework",
5
5
  "type": "module",
6
- "main": "build/index.cjs",
7
- "module": "build/index.mjs",
8
- "types": "build/index.d.ts",
6
+ "main": "build/dive.cjs",
7
+ "module": "build/dive.mjs",
8
+ "types": "build/dive.d.ts",
9
9
  "exports": {
10
10
  ".": {
11
- "types": "./build/index.d.ts",
12
- "import": "./build/index.mjs",
13
- "require": "./build/index.cjs"
11
+ "types": "./build/dive.d.ts",
12
+ "import": "./build/dive.mjs",
13
+ "require": "./build/dive.cjs"
14
14
  },
15
- "./modules": {
16
- "types": "./build/src/modules/index.d.ts",
17
- "import": "./build/src/modules/index.mjs",
18
- "require": "./build/src/modules/index.cjs"
15
+ "./modules/AnimationSystem": {
16
+ "types": "./build/src/modules/animation/AnimationSystem.d.ts",
17
+ "import": "./build/src/modules/animation/AnimationSystem.mjs",
18
+ "require": "./build/src/modules/animation/AnimationSystem.cjs"
19
+ },
20
+ "./modules/ARSystem": {
21
+ "types": "./build/src/modules/ar/ARSystem.d.ts",
22
+ "import": "./build/src/modules/ar/ARSystem.mjs",
23
+ "require": "./build/src/modules/ar/ARSystem.cjs"
24
+ },
25
+ "./modules/AssetConverter": {
26
+ "types": "./build/src/modules/asset/converter/AssetConverter.d.ts",
27
+ "import": "./build/src/modules/asset/converter/AssetConverter.mjs",
28
+ "require": "./build/src/modules/asset/converter/AssetConverter.cjs"
29
+ },
30
+ "./modules/AssetExporter": {
31
+ "types": "./build/src/modules/asset/exporter/AssetExporter.d.ts",
32
+ "import": "./build/src/modules/asset/exporter/AssetExporter.mjs",
33
+ "require": "./build/src/modules/asset/exporter/AssetExporter.cjs"
34
+ },
35
+ "./modules/AssetLoader": {
36
+ "types": "./build/src/modules/asset/loader/AssetLoader.d.ts",
37
+ "import": "./build/src/modules/asset/loader/AssetLoader.mjs",
38
+ "require": "./build/src/modules/asset/loader/AssetLoader.cjs"
39
+ },
40
+ "./modules/MediaCreator": {
41
+ "types": "./build/src/modules/mediacreator/MediaCreator.d.ts",
42
+ "import": "./build/src/modules/mediacreator/MediaCreator.mjs",
43
+ "require": "./build/src/modules/mediacreator/MediaCreator.cjs"
44
+ },
45
+ "./modules/State": {
46
+ "types": "./build/src/modules/state/State.d.ts",
47
+ "import": "./build/src/modules/state/State.mjs",
48
+ "require": "./build/src/modules/state/State.cjs"
49
+ },
50
+ "./modules/SystemInfo": {
51
+ "types": "./build/src/modules/systeminfo/SystemInfo.d.ts",
52
+ "import": "./build/src/modules/systeminfo/SystemInfo.mjs",
53
+ "require": "./build/src/modules/systeminfo/SystemInfo.cjs"
54
+ },
55
+ "./modules/Toolbox": {
56
+ "types": "./build/src/modules/toolbox/Toolbox.d.ts",
57
+ "import": "./build/src/modules/toolbox/Toolbox.mjs",
58
+ "require": "./build/src/modules/toolbox/Toolbox.cjs"
19
59
  }
20
60
  },
21
61
  "files": [
@@ -46,43 +86,44 @@
46
86
  },
47
87
  "devDependencies": {
48
88
  "@eslint/js": "^9.1.1",
89
+ "@testing-library/jest-dom": "^6.6.3",
49
90
  "@types/jest": "^29.5.12",
50
91
  "@types/lodash": "^4.17.12",
51
92
  "@types/node": "^20.12.7",
52
93
  "@types/three": "^0.163.0",
94
+ "@vitest/coverage-v8": "3.1.2",
95
+ "acorn": "^8.14.1",
96
+ "acorn-walk": "^8.3.4",
53
97
  "eslint": "^9.1.1",
54
98
  "glob": "^11.0.1",
55
99
  "globals": "^15.0.0",
56
- "jest": "^29.7.0",
57
- "jest-environment-jsdom": "^29.7.0",
58
- "jest-junit": "^16.0.0",
59
- "jsdom": "^24.0.0",
100
+ "jsdom": "^26.1.0",
101
+ "magic-string": "^0.30.17",
60
102
  "prettier": "^3.3.3",
61
103
  "prettier-plugin-multiline-arrays": "^3.0.6",
62
104
  "ts-jest": "^29.1.2",
105
+ "ts-morph": "^25.0.1",
63
106
  "ts-node": "^10.9.2",
64
107
  "tsc": "^2.0.4",
108
+ "tsx": "^4.19.4",
65
109
  "typescript": "^5.8.2",
66
110
  "typescript-eslint": "^7.7.1",
67
111
  "vite": "^6.2.1",
68
- "vite-plugin-dts": "^4.5.3"
112
+ "vite-plugin-dts": "^4.5.3",
113
+ "vitest": "^3.1.2"
69
114
  },
70
115
  "scripts": {
116
+ "validate-build-paths": "NODE_OPTIONS='--loader ts-node/esm' ts-node ci/build/validate-build-paths.ts",
71
117
  "build": "vite build",
72
- "postbuild": "NODE_OPTIONS='--loader ts-node/esm' ts-node ci/build/validate-build-paths.ts",
73
118
  "dev": "vite build --watch",
74
119
  "lint": "eslint",
75
- "lint:actions": "bash ci/lint/lint-actions.sh",
76
- "lint:actions:transpile": "yarn tsc --resolveJsonModule --esModuleInterop ci/lint/lint-actions.ts && mv ci/lint/lint-actions.js ci/lint/lint-actions.cjs",
77
- "lint:actions:check": "yarn node ci/lint/lint-actions.cjs",
78
- "lint:actions:cleanup": "node -e \"require('fs').unlinkSync('ci/lint/lint-actions.cjs')\"",
79
120
  "prettier:check": "prettier --check .",
80
121
  "prettier:fix": "prettier --write .",
81
- "unit": "jest",
82
- "coverage": "jest --coverage",
122
+ "unit": "vitest --run",
123
+ "coverage": "vitest --coverage --run",
83
124
  "docs": "yarn docs:actions && yarn docs:modules",
84
- "docs:actions": "NODE_OPTIONS='--loader ts-node/esm' ts-node docs/generators/generate-actions-docs.ts",
85
- "docs:modules": "NODE_OPTIONS='--loader ts-node/esm' ts-node docs/generators/generate-modules-docs.ts",
86
- "ci": "yarn lint && yarn lint:actions && yarn prettier:check && yarn docs && yarn coverage && yarn build"
125
+ "docs:actions": "tsx docs/generators/generate-actions-docs.ts",
126
+ "docs:modules": "tsx docs/generators/generate-modules-docs.ts",
127
+ "ci": "yarn lint && yarn prettier:check && yarn docs && yarn coverage && yarn build"
87
128
  }
88
129
  }
@@ -1,38 +0,0 @@
1
- var L = Object.defineProperty;
2
- var R = (E, s, a) => s in E ? L(E, s, { enumerable: !0, configurable: !0, writable: !0, value: a }) : E[s] = a;
3
- var A = (E, s, a) => R(E, typeof s != "symbol" ? s + "" : s, a);
4
- import { PerspectiveCamera as n } from "three";
5
- const S = 1, K = 2, c = 4, I = 8, r = 16, e = {
6
- fov: 70,
7
- near: 0.1,
8
- far: 1e3
9
- }, t = class t extends n {
10
- constructor(a = e) {
11
- super(
12
- a.fov || e.fov,
13
- 1,
14
- a.near || e.near,
15
- a.far || e.far
16
- );
17
- A(this, "onSetCameraLayer", () => {
18
- });
19
- this.layers.mask = t.EDITOR_VIEW_LAYER_MASK;
20
- }
21
- OnResize(a, o) {
22
- this.aspect = a / o, this.updateProjectionMatrix();
23
- }
24
- SetCameraLayer(a) {
25
- this.layers.mask = a === "LIVE" ? t.LIVE_VIEW_LAYER_MASK : t.EDITOR_VIEW_LAYER_MASK, this.onSetCameraLayer(this.layers.mask);
26
- }
27
- };
28
- A(t, "EDITOR_VIEW_LAYER_MASK", S | c | I | r), A(t, "LIVE_VIEW_LAYER_MASK", r);
29
- let _ = t;
30
- export {
31
- K as C,
32
- e as D,
33
- I as H,
34
- r as P,
35
- c as U,
36
- _ as a
37
- };
38
- //# sourceMappingURL=PerspectiveCamera-ACx6umAu.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PerspectiveCamera-ACx6umAu.mjs","sources":["../../src/constant/VisibilityLayerMask.ts","../../src/engine/camera/PerspectiveCamera.ts"],"sourcesContent":["export const DEFAULT_LAYER_MASK = 0b00000001; // 1\nexport const COORDINATE_LAYER_MASK = 0b00000010; // 2\nexport const UI_LAYER_MASK = 0b00000100; // 4\nexport const HELPER_LAYER_MASK = 0b00001000; // 8\nexport const PRODUCT_LAYER_MASK = 0b00010000; // 16\n","import { PerspectiveCamera } from 'three';\nimport {\n DEFAULT_LAYER_MASK,\n HELPER_LAYER_MASK,\n PRODUCT_LAYER_MASK,\n UI_LAYER_MASK,\n} from '../../constant/VisibilityLayerMask';\n\nexport type DIVEPerspectiveCameraSettings = {\n fov: number;\n near: number;\n far: number;\n};\n\nexport const DIVEPerspectiveCameraDefaultSettings: DIVEPerspectiveCameraSettings =\n {\n fov: 70,\n near: 0.1,\n far: 1000,\n };\n\n/**\n * A Perspective camera. Can change the layer mask to show different objects.\n *\n * @module\n */\n\nexport class DIVEPerspectiveCamera extends PerspectiveCamera {\n public static readonly EDITOR_VIEW_LAYER_MASK =\n DEFAULT_LAYER_MASK |\n UI_LAYER_MASK |\n HELPER_LAYER_MASK |\n PRODUCT_LAYER_MASK;\n public static readonly LIVE_VIEW_LAYER_MASK = PRODUCT_LAYER_MASK;\n\n public onSetCameraLayer: (mask: number) => void = () => {};\n\n constructor(\n settings: Partial<DIVEPerspectiveCameraSettings> = DIVEPerspectiveCameraDefaultSettings,\n ) {\n super(\n settings.fov || DIVEPerspectiveCameraDefaultSettings.fov,\n 1,\n settings.near || DIVEPerspectiveCameraDefaultSettings.near,\n settings.far || DIVEPerspectiveCameraDefaultSettings.far,\n );\n\n this.layers.mask = DIVEPerspectiveCamera.EDITOR_VIEW_LAYER_MASK;\n }\n\n public OnResize(width: number, height: number): void {\n this.aspect = width / height;\n this.updateProjectionMatrix();\n }\n\n public SetCameraLayer(layer: 'LIVE' | 'EDITOR'): void {\n this.layers.mask =\n layer === 'LIVE'\n ? DIVEPerspectiveCamera.LIVE_VIEW_LAYER_MASK\n : DIVEPerspectiveCamera.EDITOR_VIEW_LAYER_MASK;\n this.onSetCameraLayer(this.layers.mask);\n }\n}\n"],"names":["DEFAULT_LAYER_MASK","COORDINATE_LAYER_MASK","UI_LAYER_MASK","HELPER_LAYER_MASK","PRODUCT_LAYER_MASK","DIVEPerspectiveCameraDefaultSettings","_DIVEPerspectiveCamera","PerspectiveCamera","settings","__publicField","width","height","layer","DIVEPerspectiveCamera"],"mappings":";;;;AAAO,MAAMA,IAAqB,GACrBC,IAAwB,GACxBC,IAAgB,GAChBC,IAAoB,GACpBC,IAAqB,ICUrBC,IACT;AAAA,EACI,KAAK;AAAA,EACL,MAAM;AAAA,EACN,KAAK;AACT,GAQSC,IAAN,MAAMA,UAA8BC,EAAkB;AAAA,EAUzD,YACIC,IAAmDH,GACrD;AACE;AAAA,MACIG,EAAS,OAAOH,EAAqC;AAAA,MACrD;AAAA,MACAG,EAAS,QAAQH,EAAqC;AAAA,MACtDG,EAAS,OAAOH,EAAqC;AAAA,IACzD;AAVG,IAAAI,EAAA,0BAA2C,MAAM;AAAA,IAAC;AAYhD,SAAA,OAAO,OAAOH,EAAsB;AAAA,EAAA;AAAA,EAGtC,SAASI,GAAeC,GAAsB;AACjD,SAAK,SAASD,IAAQC,GACtB,KAAK,uBAAuB;AAAA,EAAA;AAAA,EAGzB,eAAeC,GAAgC;AAClD,SAAK,OAAO,OACRA,MAAU,SACJN,EAAsB,uBACtBA,EAAsB,wBAC3B,KAAA,iBAAiB,KAAK,OAAO,IAAI;AAAA,EAAA;AAE9C;AAlCIG,EADSH,GACc,0BACnBN,IACAE,IACAC,IACAC,IACJK,EANSH,GAMc,wBAAuBF;AAN3C,IAAMS,IAANP;"}
@@ -1,2 +0,0 @@
1
- "use strict";var c=Object.defineProperty;var n=(a,t,e)=>t in a?c(a,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[t]=e;var s=(a,t,e)=>n(a,typeof t!="symbol"?t+"":t,e);const o=require("three"),I=1,M=2,R=4,L=8,_=16,A={fov:70,near:.1,far:1e3},E=class E extends o.PerspectiveCamera{constructor(e=A){super(e.fov||A.fov,1,e.near||A.near,e.far||A.far);s(this,"onSetCameraLayer",()=>{});this.layers.mask=E.EDITOR_VIEW_LAYER_MASK}OnResize(e,S){this.aspect=e/S,this.updateProjectionMatrix()}SetCameraLayer(e){this.layers.mask=e==="LIVE"?E.LIVE_VIEW_LAYER_MASK:E.EDITOR_VIEW_LAYER_MASK,this.onSetCameraLayer(this.layers.mask)}};s(E,"EDITOR_VIEW_LAYER_MASK",I|R|L|_),s(E,"LIVE_VIEW_LAYER_MASK",_);let r=E;exports.COORDINATE_LAYER_MASK=M;exports.DIVEPerspectiveCamera=r;exports.DIVEPerspectiveCameraDefaultSettings=A;exports.HELPER_LAYER_MASK=L;exports.PRODUCT_LAYER_MASK=_;exports.UI_LAYER_MASK=R;
2
- //# sourceMappingURL=PerspectiveCamera-BXPNOM71.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PerspectiveCamera-BXPNOM71.cjs","sources":["../../src/constant/VisibilityLayerMask.ts","../../src/engine/camera/PerspectiveCamera.ts"],"sourcesContent":["export const DEFAULT_LAYER_MASK = 0b00000001; // 1\nexport const COORDINATE_LAYER_MASK = 0b00000010; // 2\nexport const UI_LAYER_MASK = 0b00000100; // 4\nexport const HELPER_LAYER_MASK = 0b00001000; // 8\nexport const PRODUCT_LAYER_MASK = 0b00010000; // 16\n","import { PerspectiveCamera } from 'three';\nimport {\n DEFAULT_LAYER_MASK,\n HELPER_LAYER_MASK,\n PRODUCT_LAYER_MASK,\n UI_LAYER_MASK,\n} from '../../constant/VisibilityLayerMask';\n\nexport type DIVEPerspectiveCameraSettings = {\n fov: number;\n near: number;\n far: number;\n};\n\nexport const DIVEPerspectiveCameraDefaultSettings: DIVEPerspectiveCameraSettings =\n {\n fov: 70,\n near: 0.1,\n far: 1000,\n };\n\n/**\n * A Perspective camera. Can change the layer mask to show different objects.\n *\n * @module\n */\n\nexport class DIVEPerspectiveCamera extends PerspectiveCamera {\n public static readonly EDITOR_VIEW_LAYER_MASK =\n DEFAULT_LAYER_MASK |\n UI_LAYER_MASK |\n HELPER_LAYER_MASK |\n PRODUCT_LAYER_MASK;\n public static readonly LIVE_VIEW_LAYER_MASK = PRODUCT_LAYER_MASK;\n\n public onSetCameraLayer: (mask: number) => void = () => {};\n\n constructor(\n settings: Partial<DIVEPerspectiveCameraSettings> = DIVEPerspectiveCameraDefaultSettings,\n ) {\n super(\n settings.fov || DIVEPerspectiveCameraDefaultSettings.fov,\n 1,\n settings.near || DIVEPerspectiveCameraDefaultSettings.near,\n settings.far || DIVEPerspectiveCameraDefaultSettings.far,\n );\n\n this.layers.mask = DIVEPerspectiveCamera.EDITOR_VIEW_LAYER_MASK;\n }\n\n public OnResize(width: number, height: number): void {\n this.aspect = width / height;\n this.updateProjectionMatrix();\n }\n\n public SetCameraLayer(layer: 'LIVE' | 'EDITOR'): void {\n this.layers.mask =\n layer === 'LIVE'\n ? DIVEPerspectiveCamera.LIVE_VIEW_LAYER_MASK\n : DIVEPerspectiveCamera.EDITOR_VIEW_LAYER_MASK;\n this.onSetCameraLayer(this.layers.mask);\n }\n}\n"],"names":["DEFAULT_LAYER_MASK","COORDINATE_LAYER_MASK","UI_LAYER_MASK","HELPER_LAYER_MASK","PRODUCT_LAYER_MASK","DIVEPerspectiveCameraDefaultSettings","_DIVEPerspectiveCamera","PerspectiveCamera","settings","__publicField","width","height","layer","DIVEPerspectiveCamera"],"mappings":"0MAAaA,EAAqB,EACrBC,EAAwB,EACxBC,EAAgB,EAChBC,EAAoB,EACpBC,EAAqB,GCUrBC,EACT,CACI,IAAK,GACL,KAAM,GACN,IAAK,GACT,EAQSC,EAAN,MAAMA,UAA8BC,EAAAA,iBAAkB,CAUzD,YACIC,EAAmDH,EACrD,CACE,MACIG,EAAS,KAAOH,EAAqC,IACrD,EACAG,EAAS,MAAQH,EAAqC,KACtDG,EAAS,KAAOH,EAAqC,GACzD,EAVGI,EAAA,wBAA2C,IAAM,CAAC,GAYhD,KAAA,OAAO,KAAOH,EAAsB,sBAAA,CAGtC,SAASI,EAAeC,EAAsB,CACjD,KAAK,OAASD,EAAQC,EACtB,KAAK,uBAAuB,CAAA,CAGzB,eAAeC,EAAgC,CAClD,KAAK,OAAO,KACRA,IAAU,OACJN,EAAsB,qBACtBA,EAAsB,uBAC3B,KAAA,iBAAiB,KAAK,OAAO,IAAI,CAAA,CAE9C,EAlCIG,EADSH,EACc,yBACnBN,EACAE,EACAC,EACAC,GACJK,EANSH,EAMc,uBAAuBF,GAN3C,IAAMS,EAANP"}