@shopware-ag/dive 2.0.1-beta.1 → 2.0.1-beta.11

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 (280) hide show
  1. package/build/chunks/AssetCache-CsfCIl9J.mjs +79 -0
  2. package/build/chunks/AssetCache-DGLqbo2B.cjs +1 -0
  3. package/build/chunks/AssetExporter-DsbC2rqv.cjs +164 -0
  4. package/build/{src/modules/asset/exporter/AssetExporter.mjs → chunks/AssetExporter-brT7ogoM.mjs} +22 -21
  5. package/build/chunks/AssetLoader-DvF8gL8a.mjs +2341 -0
  6. package/build/chunks/AssetLoader-H_GSIMop.cjs +4 -0
  7. package/build/chunks/FileTypes-CHutqD19.cjs +30 -0
  8. package/build/chunks/FileTypes-IBuu9ohV.mjs +1057 -0
  9. package/build/chunks/MathUtils-CBW56ZuG.cjs +1 -0
  10. package/build/chunks/MathUtils-CFGjHuVF.mjs +159 -0
  11. package/build/chunks/OrbitController-BQ6SV1O_.mjs +1159 -0
  12. package/build/chunks/OrbitController-CpFQ3A1H.cjs +1 -0
  13. package/build/chunks/{PerspectiveCamera-sm4_81KJ.mjs → PerspectiveCamera-PMJPzAn3.mjs} +2 -2
  14. package/build/chunks/PovSchema-Co9FznEz.cjs +1 -0
  15. package/build/chunks/PovSchema-DWWvr_ED.mjs +10 -0
  16. package/build/chunks/{SelectTool-Bd8cC9nb.mjs → SelectTool-BU0vTDXg.mjs} +44 -39
  17. package/build/chunks/SelectTool-CAqDMcoM.cjs +1 -0
  18. package/build/chunks/draco_decoder-Bh9flJPu.cjs +1 -0
  19. package/build/chunks/draco_decoder-CEzwqP9o.mjs +38 -0
  20. package/build/chunks/draco_decoder-DtHHc5d0.mjs +4 -0
  21. package/build/chunks/draco_decoder-DvYjcLz_.cjs +35 -0
  22. package/build/chunks/draco_wasm_wrapper-FoEVV9af.cjs +118 -0
  23. package/build/chunks/draco_wasm_wrapper-yQy2VLhb.mjs +121 -0
  24. package/build/chunks/fflate.module-DHdJvhNh.cjs +6 -0
  25. package/build/chunks/fflate.module-xyO_T3Zm.mjs +602 -0
  26. package/build/chunks/findInterface-C6mrvf_t.cjs +1 -0
  27. package/build/chunks/findInterface-DbJ5qzbc.mjs +11 -0
  28. package/build/chunks/isFileTypeSupported-BSpswPHU.mjs +12 -0
  29. package/build/chunks/isFileTypeSupported-CrEqYiv9.cjs +1 -0
  30. package/build/chunks/network-error-BONfHWQq.mjs +14 -0
  31. package/build/chunks/network-error-CdDXil5g.cjs +1 -0
  32. package/build/chunks/package-CmvmIjT5.cjs +1 -0
  33. package/build/chunks/package-DSKqbNMb.mjs +39 -0
  34. package/build/chunks/parse-error-DfOPyLWM.mjs +14 -0
  35. package/build/chunks/parse-error-Dy_EE4rL.cjs +1 -0
  36. package/build/dive.cjs +1 -30
  37. package/build/dive.mjs +674 -1535
  38. package/build/plugins/animation/index.cjs +1 -0
  39. package/build/plugins/animation/index.d.ts +2 -0
  40. package/build/plugins/animation/index.mjs +126 -0
  41. package/build/plugins/ar/index.cjs +1 -0
  42. package/build/plugins/ar/index.d.ts +2 -0
  43. package/build/plugins/ar/index.mjs +207 -0
  44. package/build/plugins/assetcache/index.cjs +1 -0
  45. package/build/plugins/assetcache/index.d.ts +2 -0
  46. package/build/plugins/assetcache/index.mjs +5 -0
  47. package/build/plugins/assetconverter/index.d.ts +2 -0
  48. package/build/plugins/assetexporter/index.cjs +1 -0
  49. package/build/plugins/assetexporter/index.d.ts +2 -0
  50. package/build/plugins/assetexporter/index.mjs +4 -0
  51. package/build/plugins/assetloader/index.cjs +1 -0
  52. package/build/plugins/assetloader/index.d.ts +2 -0
  53. package/build/plugins/assetloader/index.mjs +6 -0
  54. package/build/plugins/mediacreator/index.cjs +1 -0
  55. package/build/plugins/mediacreator/index.d.ts +2 -0
  56. package/build/{src/modules/mediacreator/MediaCreator.mjs → plugins/mediacreator/index.mjs} +4 -4
  57. package/build/plugins/orbitcontroller/index.cjs +1 -0
  58. package/build/plugins/orbitcontroller/index.d.ts +2 -0
  59. package/build/plugins/orbitcontroller/index.mjs +5 -0
  60. package/build/plugins/orientationdisplay/index.cjs +1 -0
  61. package/build/plugins/orientationdisplay/index.d.ts +2 -0
  62. package/build/plugins/orientationdisplay/index.mjs +5 -0
  63. package/build/plugins/state/index.cjs +27 -0
  64. package/build/plugins/state/index.d.ts +2 -0
  65. package/build/plugins/state/index.mjs +4266 -0
  66. package/build/plugins/systeminfo/index.cjs +1 -0
  67. package/build/plugins/systeminfo/index.d.ts +2 -0
  68. package/build/{chunks/SystemInfo-DPAQG-S5.mjs → plugins/systeminfo/index.mjs} +48 -51
  69. package/build/plugins/toolbox/index.cjs +1 -0
  70. package/build/plugins/toolbox/index.d.ts +2 -0
  71. package/build/{src/modules/toolbox/Toolbox.mjs → plugins/toolbox/index.mjs} +29 -23
  72. package/build/src/components/boundingbox/BoundingBox.d.ts +136 -0
  73. package/build/src/components/gizmo/Gizmo.d.ts +1 -1
  74. package/build/src/components/gizmo/handles/AxisHandle.d.ts +1 -1
  75. package/build/src/components/gizmo/handles/RadialHandle.d.ts +1 -1
  76. package/build/src/components/gizmo/handles/ScaleHandle.d.ts +1 -1
  77. package/build/src/components/gizmo/rotate/RotateGizmo.d.ts +2 -2
  78. package/build/src/components/gizmo/scale/ScaleGizmo.d.ts +2 -2
  79. package/build/src/components/gizmo/translate/TranslateGizmo.d.ts +2 -2
  80. package/build/src/components/group/Group.d.ts +4 -4
  81. package/build/src/components/model/Model.d.ts +2 -2
  82. package/build/src/components/node/Node.d.ts +7 -7
  83. package/build/src/components/primitive/Primitive.d.ts +3 -3
  84. package/build/src/components/root/Root.d.ts +5 -7
  85. package/build/src/core/Dive.d.ts +5 -4
  86. package/build/src/engine/clock/Clock.d.ts +1 -0
  87. package/build/src/engine/index.d.ts +6 -0
  88. package/build/src/engine/renderer/Renderer.d.ts +47 -7
  89. package/build/src/engine/scene/xrroot/XRRoot.d.ts +2 -2
  90. package/build/src/engine/scene/xrroot/xrlightroot/XRLightRoot.d.ts +2 -2
  91. package/build/src/error/file-content/file-content-error.d.ts +4 -0
  92. package/build/src/error/index.d.ts +4 -0
  93. package/build/src/error/network/network-error.d.ts +1 -1
  94. package/build/src/error/parse/parse-error.d.ts +2 -1
  95. package/build/src/events/dispatcher/EventDispatcher.d.ts +6 -0
  96. package/build/src/events/index.d.ts +1 -0
  97. package/build/src/helpers/deepClone/deepClone.d.ts +34 -0
  98. package/build/src/helpers/index.d.ts +5 -4
  99. package/build/src/index.d.ts +5 -5
  100. package/build/src/interfaces/Draggable.d.ts +1 -1
  101. package/build/src/plugins/animation/index.d.ts +2 -0
  102. package/build/src/{modules/animation → plugins/animation/src}/animator/Animator.d.ts +2 -3
  103. package/build/src/plugins/animation/src/index.d.ts +3 -0
  104. package/build/src/plugins/animation/src/system/AnimationSystem.d.ts +23 -0
  105. package/build/src/plugins/ar/index.d.ts +4 -0
  106. package/build/src/plugins/ar/src/ARSystem.d.ts +24 -0
  107. package/build/src/plugins/ar/src/arquicklook/ARQuickLook.d.ts +15 -0
  108. package/build/src/plugins/ar/src/error/ar-errors.d.ts +24 -0
  109. package/build/src/{modules/ar → plugins/ar/src}/sceneviewer/SceneViewer.d.ts +10 -0
  110. package/build/src/{modules/ar → plugins/ar/src}/webxr/WebXR.d.ts +4 -4
  111. package/build/src/{modules/ar → plugins/ar/src}/webxr/controller/WebXRController.d.ts +5 -5
  112. package/build/src/{modules/ar → plugins/ar/src}/webxr/crosshair/WebXRCrosshair.d.ts +2 -2
  113. package/build/src/{modules/ar → plugins/ar/src}/webxr/origin/WebXROrigin.d.ts +4 -4
  114. package/build/src/{modules/ar → plugins/ar/src}/webxr/overlay/Overlay.d.ts +2 -2
  115. package/build/src/{modules/ar → plugins/ar/src}/webxr/raycaster/WebXRRaycaster.d.ts +8 -8
  116. package/build/src/{modules/ar → plugins/ar/src}/webxr/raycaster/ar/WebXRRaycasterAR.d.ts +4 -4
  117. package/build/src/{modules/ar → plugins/ar/src}/webxr/raycaster/three/WebXRRaycasterTHREE.d.ts +4 -4
  118. package/build/src/{modules/ar → plugins/ar/src}/webxr/touchscreencontrols/WebXRTouchscreenControls.d.ts +3 -3
  119. package/build/src/plugins/assetcache/index.d.ts +1 -0
  120. package/build/src/plugins/assetcache/src/cache/AssetCache.d.ts +12 -0
  121. package/build/src/plugins/assetcache/src/chunk/Chunk.d.ts +16 -0
  122. package/build/src/plugins/assetcache/src/index.d.ts +2 -0
  123. package/build/src/plugins/assetconverter/index.d.ts +1 -0
  124. package/build/src/plugins/assetconverter/src/AssetConverter.d.ts +13 -0
  125. package/build/src/plugins/assetexporter/index.d.ts +1 -0
  126. package/build/src/{modules/asset/exporter → plugins/assetexporter/src}/AssetExporter.d.ts +0 -17
  127. package/build/src/plugins/assetloader/index.d.ts +3 -0
  128. package/build/src/plugins/assetloader/src/draco/DracoLoader.d.ts +10 -0
  129. package/build/src/plugins/assetloader/src/loader/AssetLoader.d.ts +14 -0
  130. package/build/src/plugins/mediacreator/index.d.ts +1 -0
  131. package/build/src/plugins/mediacreator/src/MediaCreator.d.ts +15 -0
  132. package/build/src/plugins/orbitcontroller/index.d.ts +1 -0
  133. package/build/src/plugins/orbitcontroller/src/OrbitController.d.ts +45 -0
  134. package/build/src/plugins/orientationdisplay/index.d.ts +2 -0
  135. package/build/src/plugins/orientationdisplay/src/OrientationDisplay.d.ts +18 -0
  136. package/build/src/plugins/orientationdisplay/src/axes/Axes.d.ts +6 -0
  137. package/build/src/plugins/state/index.d.ts +4 -0
  138. package/build/src/{modules/state → plugins/state/src}/State.d.ts +4 -27
  139. package/build/src/{modules/state → plugins/state/src}/actions/action.d.ts +1 -1
  140. package/build/src/{modules/state → plugins/state/src}/actions/ar/launchar.d.ts +2 -2
  141. package/build/src/{modules/state → plugins/state/src}/actions/camera/computeencompassingview.d.ts +1 -1
  142. package/build/src/{modules/state → plugins/state/src}/actions/camera/getcameratransform.d.ts +1 -1
  143. package/build/src/{modules/state → plugins/state/src}/actions/camera/lockcamera.d.ts +1 -1
  144. package/build/src/{modules/state → plugins/state/src}/actions/camera/movecamera.d.ts +3 -3
  145. package/build/src/{modules/state → plugins/state/src}/actions/camera/setcameralayer.d.ts +1 -1
  146. package/build/src/{modules/state → plugins/state/src}/actions/camera/setcameratransform.d.ts +1 -1
  147. package/build/src/{modules/state → plugins/state/src}/actions/camera/zoomcamera.d.ts +1 -1
  148. package/build/src/{modules/state → plugins/state/src}/actions/media/generatemedia.d.ts +1 -1
  149. package/build/src/plugins/state/src/actions/object/addobject.d.ts +9 -0
  150. package/build/src/plugins/state/src/actions/object/deleteobject.d.ts +13 -0
  151. package/build/src/plugins/state/src/actions/object/deselectobject.d.ts +13 -0
  152. package/build/src/{modules/state → plugins/state/src}/actions/object/dropit.d.ts +3 -3
  153. package/build/src/{modules/state → plugins/state/src}/actions/object/getallobjects.d.ts +3 -2
  154. package/build/src/plugins/state/src/actions/object/getobjects.d.ts +13 -0
  155. package/build/src/{modules/state → plugins/state/src}/actions/object/modelloaded.d.ts +1 -1
  156. package/build/src/{modules/state → plugins/state/src}/actions/object/placeonfloor.d.ts +3 -3
  157. package/build/src/plugins/state/src/actions/object/selectobject.d.ts +13 -0
  158. package/build/src/plugins/state/src/actions/object/setparent.d.ts +23 -0
  159. package/build/src/plugins/state/src/actions/object/updateobject.d.ts +13 -0
  160. package/build/src/{modules/state → plugins/state/src}/actions/renderer/startrender.d.ts +1 -1
  161. package/build/src/{modules/state → plugins/state/src}/actions/scene/exportscene.d.ts +4 -4
  162. package/build/src/plugins/state/src/actions/scene/getallscenedata.d.ts +9 -0
  163. package/build/src/{modules/state → plugins/state/src}/actions/scene/setbackground.d.ts +1 -1
  164. package/build/src/{modules/state → plugins/state/src}/actions/scene/updatescene.d.ts +1 -1
  165. package/build/src/{modules/state → plugins/state/src}/actions/toolbox/setgizmomode.d.ts +1 -1
  166. package/build/src/{modules/state → plugins/state/src}/actions/toolbox/setgizmoscalelinked.d.ts +1 -1
  167. package/build/src/plugins/state/src/actions/toolbox/setgizmovisible.d.ts +8 -0
  168. package/build/src/{modules/state → plugins/state/src}/actions/toolbox/usetool.d.ts +2 -2
  169. package/build/src/plugins/state/types/ActionTypes.d.ts +17 -0
  170. package/build/src/{types/SceneType.d.ts → plugins/state/types/StateExportFileType.d.ts} +1 -1
  171. package/build/src/plugins/state/types/StateSceneData.d.ts +19 -0
  172. package/build/src/plugins/state/types/index.d.ts +1 -0
  173. package/build/src/plugins/systeminfo/index.d.ts +2 -0
  174. package/build/src/{modules/systeminfo → plugins/systeminfo/src}/SystemInfo.d.ts +22 -32
  175. package/build/src/plugins/toolbox/index.d.ts +4 -0
  176. package/build/src/{modules/toolbox → plugins/toolbox/src}/BaseTool.d.ts +4 -6
  177. package/build/src/{modules/toolbox → plugins/toolbox/src}/Toolbox.d.ts +8 -17
  178. package/build/src/{modules/toolbox → plugins/toolbox/src}/select/SelectTool.d.ts +7 -11
  179. package/build/src/{modules/toolbox → plugins/toolbox/src}/transform/TransformTool.d.ts +6 -10
  180. package/build/src/types/components/DIVELight.d.ts +4 -0
  181. package/build/src/types/components/DIVESceneObject.d.ts +6 -0
  182. package/build/src/types/components/index.d.ts +2 -0
  183. package/build/src/types/index.d.ts +2 -5
  184. package/build/src/types/schema/BaseEntitySchema.d.ts +8 -0
  185. package/build/src/types/schema/EntitySchema.d.ts +11 -0
  186. package/build/src/types/schema/EntityTypeSchema.d.ts +1 -0
  187. package/build/src/types/schema/GeometrySchema.d.ts +7 -0
  188. package/build/src/types/schema/GeometryTypeSchema.d.ts +1 -0
  189. package/build/src/types/schema/GroupSchema.d.ts +11 -0
  190. package/build/src/types/schema/LightSchema.d.ts +28 -0
  191. package/build/src/{modules/state/types/COMMaterial.d.ts → types/schema/MaterialSchema.d.ts} +1 -1
  192. package/build/src/types/schema/ModelSchema.d.ts +14 -0
  193. package/build/src/types/schema/PovSchema.d.ts +10 -0
  194. package/build/src/types/schema/PrimitiveSchema.d.ts +14 -0
  195. package/build/src/types/schema/index.d.ts +11 -0
  196. package/package.json +59 -41
  197. package/build/chunks/FileTypes-BjZ0rrIV.cjs +0 -1
  198. package/build/chunks/FileTypes-qgYnI0Jg.mjs +0 -30
  199. package/build/chunks/ModuleRegistry-NyNtjHb2.cjs +0 -1
  200. package/build/chunks/ModuleRegistry-RSub8W0G.mjs +0 -13
  201. package/build/chunks/SelectTool-BAXTVyWs.cjs +0 -1
  202. package/build/chunks/SystemInfo-oX-NNneO.cjs +0 -1
  203. package/build/chunks/findInterface-BEdL2iUQ.cjs +0 -1
  204. package/build/chunks/findInterface-OrXgmwxj.mjs +0 -18
  205. package/build/chunks/index-C_uFFwT2.mjs +0 -5
  206. package/build/chunks/index-DAwIH9xh.cjs +0 -1
  207. package/build/chunks/package-BHjZWYD6.mjs +0 -39
  208. package/build/chunks/package-JHvTSNgQ.cjs +0 -1
  209. package/build/chunks/parse-error-2f5qpXP5.cjs +0 -6
  210. package/build/chunks/parse-error-DRBVHL9E.mjs +0 -614
  211. package/build/src/error/ar-compatibility/ar-compatibility-error.d.ts +0 -12
  212. package/build/src/modules/ModuleRegistry.d.ts +0 -19
  213. package/build/src/modules/animation/AnimationSystem.cjs +0 -1
  214. package/build/src/modules/animation/AnimationSystem.d.ts +0 -36
  215. package/build/src/modules/animation/AnimationSystem.mjs +0 -95
  216. package/build/src/modules/ar/ARSystem.cjs +0 -1
  217. package/build/src/modules/ar/ARSystem.d.ts +0 -71
  218. package/build/src/modules/ar/ARSystem.mjs +0 -163
  219. package/build/src/modules/ar/arquicklook/ARQuickLook.d.ts +0 -7
  220. package/build/src/modules/asset/converter/AssetConverter.d.ts +0 -30
  221. package/build/src/modules/asset/draco/README.md +0 -32
  222. package/build/src/modules/asset/draco/draco_decoder.js +0 -33
  223. package/build/src/modules/asset/draco/draco_decoder.wasm +0 -0
  224. package/build/src/modules/asset/draco/draco_encoder.js +0 -33
  225. package/build/src/modules/asset/draco/draco_wasm_wrapper.js +0 -116
  226. package/build/src/modules/asset/draco/gltf/draco_decoder.js +0 -33
  227. package/build/src/modules/asset/draco/gltf/draco_decoder.wasm +0 -0
  228. package/build/src/modules/asset/draco/gltf/draco_encoder.js +0 -33
  229. package/build/src/modules/asset/draco/gltf/draco_wasm_wrapper.js +0 -116
  230. package/build/src/modules/asset/exporter/AssetExporter.cjs +0 -164
  231. package/build/src/modules/asset/loader/AssetLoader.cjs +0 -3
  232. package/build/src/modules/asset/loader/AssetLoader.d.ts +0 -29
  233. package/build/src/modules/asset/loader/AssetLoader.mjs +0 -2154
  234. package/build/src/modules/axiscamera/AxisCamera.d.ts +0 -21
  235. package/build/src/modules/controller/orbit/OrbitController.d.ts +0 -30
  236. package/build/src/modules/events/EventExecutor.d.ts +0 -5
  237. package/build/src/modules/mediacreator/MediaCreator.cjs +0 -1
  238. package/build/src/modules/mediacreator/MediaCreator.d.ts +0 -44
  239. package/build/src/modules/state/State.cjs +0 -27
  240. package/build/src/modules/state/State.mjs +0 -4296
  241. package/build/src/modules/state/actions/object/addobject.d.ts +0 -8
  242. package/build/src/modules/state/actions/object/deleteobject.d.ts +0 -12
  243. package/build/src/modules/state/actions/object/deselectobject.d.ts +0 -12
  244. package/build/src/modules/state/actions/object/getobjects.d.ts +0 -12
  245. package/build/src/modules/state/actions/object/selectobject.d.ts +0 -12
  246. package/build/src/modules/state/actions/object/setparent.d.ts +0 -22
  247. package/build/src/modules/state/actions/object/updateobject.d.ts +0 -12
  248. package/build/src/modules/state/actions/scene/getallscenedata.d.ts +0 -9
  249. package/build/src/modules/state/actions/toolbox/setgizmovisible.d.ts +0 -8
  250. package/build/src/modules/state/types/ActionTypes.d.ts +0 -18
  251. package/build/src/modules/state/types/COMBaseEntity.d.ts +0 -8
  252. package/build/src/modules/state/types/COMEntity.d.ts +0 -11
  253. package/build/src/modules/state/types/COMEntityType.d.ts +0 -1
  254. package/build/src/modules/state/types/COMGeometry.d.ts +0 -7
  255. package/build/src/modules/state/types/COMGeometryType.d.ts +0 -1
  256. package/build/src/modules/state/types/COMGroup.d.ts +0 -11
  257. package/build/src/modules/state/types/COMLight.d.ts +0 -28
  258. package/build/src/modules/state/types/COMModel.d.ts +0 -14
  259. package/build/src/modules/state/types/COMPov.d.ts +0 -10
  260. package/build/src/modules/state/types/COMPrimitive.d.ts +0 -14
  261. package/build/src/modules/state/types/index.d.ts +0 -11
  262. package/build/src/modules/systeminfo/SystemInfo.cjs +0 -1
  263. package/build/src/modules/systeminfo/SystemInfo.mjs +0 -5
  264. package/build/src/modules/toolbox/Toolbox.cjs +0 -1
  265. package/build/src/types/SceneData.d.ts +0 -19
  266. package/build/src/types/SceneObjects.d.ts +0 -9
  267. package/build/src/types/UUID.d.ts +0 -1
  268. /package/build/{src/modules/asset/converter/AssetConverter.cjs → plugins/assetconverter/index.cjs} +0 -0
  269. /package/build/{src/modules/asset/converter/AssetConverter.mjs → plugins/assetconverter/index.mjs} +0 -0
  270. /package/build/src/{modules/animation → plugins/animation/src}/types/AnimatorParameters.d.ts +0 -0
  271. /package/build/src/{modules/state → plugins/state/src}/ActionRegistry.d.ts +0 -0
  272. /package/build/src/{modules/state → plugins/state/src}/actions/ar/index.d.ts +0 -0
  273. /package/build/src/{modules/state → plugins/state/src}/actions/camera/index.d.ts +0 -0
  274. /package/build/src/{modules/state → plugins/state/src}/actions/index.d.ts +0 -0
  275. /package/build/src/{modules/state → plugins/state/src}/actions/media/index.d.ts +0 -0
  276. /package/build/src/{modules/state → plugins/state/src}/actions/object/index.d.ts +0 -0
  277. /package/build/src/{modules/state → plugins/state/src}/actions/renderer/index.d.ts +0 -0
  278. /package/build/src/{modules/state → plugins/state/src}/actions/scene/index.d.ts +0 -0
  279. /package/build/src/{modules/state → plugins/state/src}/actions/toolbox/index.d.ts +0 -0
  280. /package/build/src/{types/info → plugins/systeminfo/types}/index.d.ts +0 -0
@@ -1,95 +0,0 @@
1
- var c = Object.defineProperty;
2
- var d = (p, t, e) => t in p ? c(p, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : p[t] = e;
3
- var i = (p, t, e) => d(p, typeof t != "symbol" ? t + "" : t, e);
4
- import { update as u, Tween as r, Easing as _ } from "@tweenjs/tween.js";
5
- import { EventDispatcher as g, MathUtils as h } from "three";
6
- class w extends g {
7
- constructor(e, n, a, s) {
8
- super();
9
- i(this, "_uuid", h.generateUUID());
10
- i(this, "_playing", !1);
11
- i(this, "_stopped", !1);
12
- i(this, "_completed", !1);
13
- this.object = e, this.to = n, this.duration = a, this.options = s;
14
- }
15
- get uuid() {
16
- return this._uuid;
17
- }
18
- get playing() {
19
- return this._playing;
20
- }
21
- get stopped() {
22
- return this._stopped;
23
- }
24
- get completed() {
25
- return this._completed;
26
- }
27
- dispose() {
28
- this._playing = !1, this._stopped = !1, this._completed = !1;
29
- }
30
- play() {
31
- return this._playing = !0, this._stopped = !1, this.dispatchEvent({ type: "play", target: this }), console.log("play", this), this;
32
- }
33
- stop() {
34
- return this._playing = !1, this._stopped = !0, this.dispatchEvent({ type: "stop", target: this }), this;
35
- }
36
- }
37
- class M {
38
- constructor() {
39
- i(this, "uuid", h.generateUUID());
40
- i(this, "_callbackMap", /* @__PURE__ */ new Map());
41
- i(this, "_tweens", /* @__PURE__ */ new Map());
42
- }
43
- /**
44
- * Creates a new animator and registers it.
45
- * @param object - The object to animate.
46
- * @param to - The target object.
47
- * @param duration - The duration of the animation.
48
- * @param options - The options for the animation.
49
- * @returns The animator.
50
- */
51
- createAnimator(t, e, n, a) {
52
- var o, l;
53
- const s = new w(t, e, n, a);
54
- return this._callbackMap.set(s.uuid, {
55
- onUpdate: ((o = s.options) == null ? void 0 : o.onUpdate) ?? (() => {
56
- }),
57
- onComplete: ((l = s.options) == null ? void 0 : l.onComplete) ?? (() => {
58
- })
59
- }), this._setupTween(s), s;
60
- }
61
- unregister(t) {
62
- if (!this._callbackMap.has(t)) {
63
- console.warn(`Animator with uuid ${t} not registered`);
64
- return;
65
- }
66
- this._callbackMap.delete(t), this._tweens.delete(t);
67
- }
68
- Dispose() {
69
- this._callbackMap.clear(), this._tweens.clear();
70
- }
71
- tick() {
72
- u();
73
- }
74
- Animate(t) {
75
- return new r(t);
76
- }
77
- _setupTween(t) {
78
- var n;
79
- const e = new r(t.object).to(t.to, t.duration).easing(((n = t.options) == null ? void 0 : n.easing) ?? _.Quadratic.Out).onUpdate((a, s) => {
80
- var o;
81
- (o = this._callbackMap.get(t.uuid)) == null || o.onUpdate(a, s);
82
- }).onComplete((a) => {
83
- var s;
84
- (s = this._callbackMap.get(t.uuid)) == null || s.onComplete(a);
85
- });
86
- t.addEventListener("play", () => {
87
- e.start();
88
- }), t.addEventListener("stop", () => {
89
- e.stop();
90
- }), this._tweens.set(t.uuid, e);
91
- }
92
- }
93
- export {
94
- M as AnimationSystem
95
- };
@@ -1 +0,0 @@
1
- "use strict";var u=Object.defineProperty;var d=(a,e,t)=>e in a?u(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var l=(a,e,t)=>d(a,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../../../chunks/SystemInfo-oX-NNneO.cjs"),i=require("../../../chunks/index-DAwIH9xh.cjs"),m=require("../asset/converter/AssetConverter.cjs"),h=require("../asset/loader/AssetLoader.cjs"),y=require("../asset/exporter/AssetExporter.cjs");class S{constructor(){l(this,"converter",new m.AssetConverter(new h.AssetLoader,new y.AssetExporter))}async launch(e,t){const r=await this.convertToUSDZ(e,t);return this.launchARQuickLook(r,t)}async convertToUSDZ(e,t){const r=await this.converter.convert(e).to("usdz",{quickLookCompatible:!0,ar:{anchoring:{type:"plane"},planeAnchoring:{alignment:(t==null?void 0:t.arPlacement)==="vertical"?"vertical":"horizontal"}}}),n=new Blob([r],{type:"model/vnd.usdz+zip"});return URL.createObjectURL(n)}launchARQuickLook(e,t){return new Promise(r=>{(t==null?void 0:t.arScale)==="fixed"&&(e=e.concat("#allowsContentScaling=0"));const n=document.createElement("a");n.innerHTML="<picture></picture>",n.rel="ar",n.href=e,n.download="scene.usdz",r(),n.click()})}}class _{launch(e,t){const r=self.location.toString(),n=document.createElement("a"),c=this._createParams(r,e,t),o=this._createIntent(r,e,c);n.setAttribute("href",o),n.click()}_createParams(e,t,r){const n=new URL(t,e),c=new URLSearchParams(n.search);return c.set("mode","ar_preferred"),this._applyScaleOption(c,r),this._applyPlacementOption(c,r),this._applySoundOption(c,e),this._applyLinkOption(c,e),c}_applyScaleOption(e,t){(t==null?void 0:t.arScale)==="fixed"&&e.set("resizable","false")}_applyPlacementOption(e,t){(t==null?void 0:t.arPlacement)==="vertical"&&e.set("enable_vertical_placement","true")}_applySoundOption(e,t){if(e.has("sound")){const r=new URL(e.get("sound"),t);e.set("sound",r.toString())}}_applyLinkOption(e,t){if(e.has("link")){const r=new URL(e.get("link"),t);e.set("link",r.toString())}}_createIntent(e,t,r){const n=new URL(e),c=new URL(t,e),o="#model-viewer-no-ar-fallback";return n.hash=o,`intent://arvr.google.com/scene-viewer/1.2?${r.toString()+"&file="+c.toString()}#Intent;scheme=https;package=com.google.android.googlequicksearchbox;action=android.intent.action.VIEW;S.browser_fallback_url=${encodeURIComponent(n.toString())};end;`}}class w{async launch(e,t){const r=s.SystemInfo.getSystem();return r===i.ESystem.IOS?this.tryARQuickLook(e,t):r===i.ESystem.ANDROID?this.trySceneViewer(e,t):Promise.reject(new s.ARCompatibilityError("AR not supported on non-mobile systems",window.navigator.userAgent,window.navigator.platform,window.navigator.vendor))}async tryARQuickLook(e,t){try{s.SystemInfo.getSupportsARQuickLook()}catch(r){return Promise.reject(r)}return new S().launch(e,t)}async trySceneViewer(e,t){try{return new _().launch(e,t)}catch(r){return Promise.reject(r)}}}exports.ARSystem=w;
@@ -1,71 +0,0 @@
1
- declare global {
2
- interface ModuleClasses {
3
- ARSystem: typeof ARSystem;
4
- }
5
- }
6
- /**
7
- * @module ARSystem
8
- *
9
- * The AR module enables Augmented Reality features across different platforms:
10
- *
11
- * ```ts
12
- * import { ARSystem } from '@shopware-ag/dive/modules/ARSystem';
13
- *
14
- * const arSystem = new ARSystem();
15
- *
16
- * // Launch AR with options
17
- * await arSystem.launch('path/to/model.glb', {
18
- * arPlacement: 'horizontal', // or 'vertical'
19
- * arScale: 'auto' // or 'fixed'
20
- * });
21
- * ```
22
- *
23
- * Features:
24
- * - Platform-specific AR implementations (ARQuickLook for iOS, SceneViewer for Android)
25
- * - Automatic format conversion for AR compatibility
26
- * - Configurable placement and scaling options
27
- */
28
- /**
29
- * Options for configuring the AR system behavior
30
- */
31
- export type ARSystemOptions = {
32
- /** The placement orientation for AR content - either horizontal or vertical */
33
- arPlacement: 'horizontal' | 'vertical';
34
- /** The scaling behavior for AR content - either automatic or fixed */
35
- arScale: 'auto' | 'fixed';
36
- };
37
- /**
38
- * Main class for handling AR functionality across different platforms
39
- * Provides methods to launch AR experiences using platform-specific implementations
40
- */
41
- export declare class ARSystem {
42
- /**
43
- * Launches an AR experience using the appropriate platform-specific implementation
44
- *
45
- * @param uri - The URI of the 3D model to display in AR
46
- * @param options - Optional configuration for the AR experience
47
- * @returns Promise that resolves when AR is launched successfully
48
- * @throws Error if AR is not supported on the current platform
49
- */
50
- launch(uri: string, options?: ARSystemOptions): Promise<void>;
51
- /**
52
- * Attempts to launch AR using ARQuickLook (iOS-specific implementation)
53
- *
54
- * @param uri - The URI of the 3D model to display in AR
55
- * @param options - Optional configuration for the AR experience
56
- * @returns Promise that resolves when ARQuickLook is launched successfully
57
- * @throws Error if ARQuickLook is not supported on the device
58
- */
59
- private tryARQuickLook;
60
- /**
61
- * Launches AR using SceneViewer (Android-specific implementation)
62
- * Note: SceneViewer is supported on all Android devices. If ARCore is not installed,
63
- * the model will be displayed in 3D view mode instead of AR mode.
64
- *
65
- * @param uri - The URI of the 3D model to display in AR
66
- * @param options - Optional configuration for the AR experience
67
- * @returns Promise that resolves when SceneViewer is launched successfully
68
- * @throws Error if there's an issue launching SceneViewer
69
- */
70
- private trySceneViewer;
71
- }
@@ -1,163 +0,0 @@
1
- var u = Object.defineProperty;
2
- var m = (c, e, t) => e in c ? u(c, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : c[e] = t;
3
- var i = (c, e, t) => m(c, typeof e != "symbol" ? e + "" : e, t);
4
- import { S as l, A as d } from "../../../chunks/SystemInfo-DPAQG-S5.mjs";
5
- import { E as s } from "../../../chunks/index-C_uFFwT2.mjs";
6
- import { AssetConverter as h } from "../asset/converter/AssetConverter.mjs";
7
- import { AssetLoader as w } from "../asset/loader/AssetLoader.mjs";
8
- import { AssetExporter as p } from "../asset/exporter/AssetExporter.mjs";
9
- class y {
10
- constructor() {
11
- i(this, "converter", new h(
12
- new w(),
13
- new p()
14
- ));
15
- }
16
- async launch(e, t) {
17
- const r = await this.convertToUSDZ(e, t);
18
- return this.launchARQuickLook(r, t);
19
- }
20
- async convertToUSDZ(e, t) {
21
- const r = await this.converter.convert(e).to("usdz", {
22
- quickLookCompatible: !0,
23
- ar: {
24
- anchoring: { type: "plane" },
25
- planeAnchoring: {
26
- alignment: (t == null ? void 0 : t.arPlacement) === "vertical" ? "vertical" : "horizontal"
27
- }
28
- }
29
- }), n = new Blob([r], { type: "model/vnd.usdz+zip" });
30
- return URL.createObjectURL(n);
31
- }
32
- launchARQuickLook(e, t) {
33
- return new Promise((r) => {
34
- (t == null ? void 0 : t.arScale) === "fixed" && (e = e.concat("#allowsContentScaling=0"));
35
- const n = document.createElement("a");
36
- n.innerHTML = "<picture></picture>", n.rel = "ar", n.href = e, n.download = "scene.usdz", r(), n.click();
37
- });
38
- }
39
- }
40
- class S {
41
- launch(e, t) {
42
- const r = self.location.toString(), n = document.createElement("a"), a = this._createParams(r, e, t), o = this._createIntent(r, e, a);
43
- n.setAttribute("href", o), n.click();
44
- }
45
- /**
46
- * Creates the base URL parameters for SceneViewer
47
- * @param location Current page location URL
48
- * @returns URLSearchParams with base configuration
49
- */
50
- _createParams(e, t, r) {
51
- const n = new URL(t, e), a = new URLSearchParams(n.search);
52
- return a.set("mode", "ar_preferred"), this._applyScaleOption(a, r), this._applyPlacementOption(a, r), this._applySoundOption(a, e), this._applyLinkOption(a, e), a;
53
- }
54
- /**
55
- * Applies the scale option to the parameters
56
- * If scale is set to 'fixed', the model will not be resizable in AR
57
- * @param params URLSearchParams to modify
58
- */
59
- _applyScaleOption(e, t) {
60
- (t == null ? void 0 : t.arScale) === "fixed" && e.set("resizable", "false");
61
- }
62
- /**
63
- * Applies the placement option to the parameters
64
- * If placement is set to 'vertical', vertical placement will be enabled
65
- * @param params URLSearchParams to modify
66
- */
67
- _applyPlacementOption(e, t) {
68
- (t == null ? void 0 : t.arPlacement) === "vertical" && e.set("enable_vertical_placement", "true");
69
- }
70
- /**
71
- * Applies the sound option to the parameters if present
72
- * This will resolve any relative sound URLs to absolute URLs
73
- * @param params URLSearchParams to modify
74
- * @param location Current page location URL
75
- */
76
- _applySoundOption(e, t) {
77
- if (e.has("sound")) {
78
- const r = new URL(e.get("sound"), t);
79
- e.set("sound", r.toString());
80
- }
81
- }
82
- /**
83
- * Applies the link option to the parameters if present
84
- * This will resolve any relative link URLs to absolute URLs
85
- * @param params URLSearchParams to modify
86
- * @param location Current page location URL
87
- */
88
- _applyLinkOption(e, t) {
89
- if (e.has("link")) {
90
- const r = new URL(e.get("link"), t);
91
- e.set("link", r.toString());
92
- }
93
- }
94
- /**
95
- * Creates the Android Intent URL for SceneViewer
96
- * @param params URLSearchParams containing all configuration
97
- * @param location Current page location URL
98
- * @returns The complete Intent URL
99
- */
100
- _createIntent(e, t, r) {
101
- const n = new URL(e), a = new URL(t, e), o = "#model-viewer-no-ar-fallback";
102
- return n.hash = o, `intent://arvr.google.com/scene-viewer/1.2?${r.toString() + "&file=" + a.toString()}#Intent;scheme=https;package=com.google.android.googlequicksearchbox;action=android.intent.action.VIEW;S.browser_fallback_url=${encodeURIComponent(
103
- n.toString()
104
- )};end;`;
105
- }
106
- }
107
- class A {
108
- /**
109
- * Launches an AR experience using the appropriate platform-specific implementation
110
- *
111
- * @param uri - The URI of the 3D model to display in AR
112
- * @param options - Optional configuration for the AR experience
113
- * @returns Promise that resolves when AR is launched successfully
114
- * @throws Error if AR is not supported on the current platform
115
- */
116
- async launch(e, t) {
117
- const r = l.getSystem();
118
- return r === s.IOS ? this.tryARQuickLook(e, t) : r === s.ANDROID ? this.trySceneViewer(e, t) : Promise.reject(
119
- new d(
120
- "AR not supported on non-mobile systems",
121
- window.navigator.userAgent,
122
- window.navigator.platform,
123
- window.navigator.vendor
124
- )
125
- );
126
- }
127
- /**
128
- * Attempts to launch AR using ARQuickLook (iOS-specific implementation)
129
- *
130
- * @param uri - The URI of the 3D model to display in AR
131
- * @param options - Optional configuration for the AR experience
132
- * @returns Promise that resolves when ARQuickLook is launched successfully
133
- * @throws Error if ARQuickLook is not supported on the device
134
- */
135
- async tryARQuickLook(e, t) {
136
- try {
137
- l.getSupportsARQuickLook();
138
- } catch (r) {
139
- return Promise.reject(r);
140
- }
141
- return new y().launch(e, t);
142
- }
143
- /**
144
- * Launches AR using SceneViewer (Android-specific implementation)
145
- * Note: SceneViewer is supported on all Android devices. If ARCore is not installed,
146
- * the model will be displayed in 3D view mode instead of AR mode.
147
- *
148
- * @param uri - The URI of the 3D model to display in AR
149
- * @param options - Optional configuration for the AR experience
150
- * @returns Promise that resolves when SceneViewer is launched successfully
151
- * @throws Error if there's an issue launching SceneViewer
152
- */
153
- async trySceneViewer(e, t) {
154
- try {
155
- return new S().launch(e, t);
156
- } catch (r) {
157
- return Promise.reject(r);
158
- }
159
- }
160
- }
161
- export {
162
- A as ARSystem
163
- };
@@ -1,7 +0,0 @@
1
- import { ARSystemOptions } from '../ARSystem.ts';
2
- export declare class ARQuickLook {
3
- private converter;
4
- launch(uri: string, options?: ARSystemOptions): Promise<void>;
5
- private convertToUSDZ;
6
- private launchARQuickLook;
7
- }
@@ -1,30 +0,0 @@
1
- import { AssetLoader } from '../loader/AssetLoader.ts';
2
- import { AssetExporter, FileTypeToExporterOptions } from '../exporter/AssetExporter.ts';
3
- import { FileType } from '../../../types/file/index.ts';
4
- declare global {
5
- interface ModuleClasses {
6
- AssetConverter: typeof AssetConverter;
7
- }
8
- }
9
- /**
10
- * @module AssetConverter
11
- *
12
- * Converts between different 3D file formats:
13
- *
14
- * ```ts
15
- * import { AssetConverter } from '@shopware-ag/dive/modules/AssetConverter';
16
- *
17
- * const assetConverter = new AssetConverter();
18
- * const usdzBuffer = await assetConverter.convert('input.glb').to('usdz');
19
- * ```
20
- */
21
- export declare class AssetConverter {
22
- private _loader;
23
- private _exporter;
24
- private _uri;
25
- constructor(_loader: AssetLoader, _exporter: AssetExporter);
26
- convert(uri: string): {
27
- to: <T extends FileType>(type: T, options?: FileTypeToExporterOptions[T]) => Promise<ArrayBuffer>;
28
- };
29
- private _to;
30
- }
@@ -1,32 +0,0 @@
1
- # Draco 3D Data Compression
2
-
3
- Draco is an open-source library for compressing and decompressing 3D geometric meshes and point clouds. It is intended to improve the storage and transmission of 3D graphics.
4
-
5
- [Website](https://google.github.io/draco/) | [GitHub](https://github.com/google/draco)
6
-
7
- ## Contents
8
-
9
- This folder contains three utilities:
10
-
11
- * `draco_decoder.js` — Emscripten-compiled decoder, compatible with any modern browser.
12
- * `draco_decoder.wasm` — WebAssembly decoder, compatible with newer browsers and devices.
13
- * `draco_wasm_wrapper.js` — JavaScript wrapper for the WASM decoder.
14
-
15
- Each file is provided in two variations:
16
-
17
- * **Default:** Latest stable builds, tracking the project's [master branch](https://github.com/google/draco).
18
- * **glTF:** Builds targeted by the [glTF mesh compression extension](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_draco_mesh_compression), tracking the [corresponding Draco branch](https://github.com/google/draco/tree/gltf_2.0_draco_extension).
19
-
20
- Either variation may be used with `THREE.DRACOLoader`:
21
-
22
- ```js
23
- var dracoLoader = new THREE.DRACOLoader();
24
- dracoLoader.setDecoderPath('path/to/decoders/');
25
- dracoLoader.setDecoderConfig({type: 'js'}); // (Optional) Override detection of WASM support.
26
- ```
27
-
28
- Further [documentation on GitHub](https://github.com/google/draco/tree/master/javascript/example#static-loading-javascript-decoder).
29
-
30
- ## License
31
-
32
- [Apache License 2.0](https://github.com/google/draco/blob/master/LICENSE)