@shopware-ag/dive 2.0.1-beta.5 → 2.0.1-beta.7

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 (234) hide show
  1. package/build/{src/modules/asset/exporter/AssetExporter.mjs → chunks/AssetExporter-QnOue3VT.mjs} +21 -21
  2. package/build/{src/modules/asset/exporter/AssetExporter.cjs → chunks/AssetExporter-TzKB2FHh.cjs} +4 -4
  3. package/build/chunks/AssetLoader-DCBiLwef.cjs +4 -0
  4. package/build/{src/modules/asset/loader/AssetLoader.mjs → chunks/AssetLoader-Dqrg0Re8.mjs} +43 -40
  5. package/build/chunks/FileTypes-Ca8pkRlQ.cjs +30 -0
  6. package/build/chunks/FileTypes-CpKiTXEY.mjs +1109 -0
  7. package/build/chunks/MathUtils-CBW56ZuG.cjs +1 -0
  8. package/build/chunks/MathUtils-CFGjHuVF.mjs +159 -0
  9. package/build/chunks/OrbitController-D-WNei2f.mjs +940 -0
  10. package/build/chunks/OrbitController-rMX8EHvJ.cjs +1 -0
  11. package/build/chunks/PerspectiveCamera-CONx93im.cjs +1 -0
  12. package/build/chunks/PerspectiveCamera-DUiWJJIj.mjs +38 -0
  13. package/build/chunks/PovSchema-Co9FznEz.cjs +1 -0
  14. package/build/chunks/PovSchema-DWWvr_ED.mjs +10 -0
  15. package/build/chunks/SelectTool-BizqI7_a.cjs +1 -0
  16. package/build/chunks/{SelectTool-DmuTopJx.mjs → SelectTool-DVFL7BtX.mjs} +30 -25
  17. package/build/chunks/findInterface-C6mrvf_t.cjs +1 -0
  18. package/build/chunks/findInterface-DbJ5qzbc.mjs +11 -0
  19. package/build/chunks/network-error-CHvryg-4.mjs +18 -0
  20. package/build/chunks/network-error-D_pq8VU6.cjs +1 -0
  21. package/build/chunks/package-CeZyVg2G.mjs +39 -0
  22. package/build/chunks/package-D_hIrGNz.cjs +1 -0
  23. package/build/dive.cjs +1 -30
  24. package/build/dive.mjs +599 -1540
  25. package/build/plugins/animation/index.cjs +1 -0
  26. package/build/plugins/animation/index.d.ts +2 -0
  27. package/build/plugins/animation/index.mjs +126 -0
  28. package/build/plugins/ar/index.cjs +1 -0
  29. package/build/plugins/ar/index.d.ts +2 -0
  30. package/build/plugins/ar/index.mjs +202 -0
  31. package/build/plugins/assetconverter/index.d.ts +2 -0
  32. package/build/plugins/assetexporter/index.cjs +1 -0
  33. package/build/plugins/assetexporter/index.d.ts +2 -0
  34. package/build/plugins/assetexporter/index.mjs +4 -0
  35. package/build/plugins/assetloader/index.cjs +1 -0
  36. package/build/plugins/assetloader/index.d.ts +2 -0
  37. package/build/plugins/assetloader/index.mjs +6 -0
  38. package/build/plugins/axiscamera/index.cjs +1 -0
  39. package/build/plugins/axiscamera/index.d.ts +2 -0
  40. package/build/plugins/axiscamera/index.mjs +4 -0
  41. package/build/plugins/mediacreator/index.cjs +1 -0
  42. package/build/plugins/mediacreator/index.d.ts +2 -0
  43. package/build/{src/modules/mediacreator/MediaCreator.mjs → plugins/mediacreator/index.mjs} +1 -1
  44. package/build/plugins/orbitcontroller/index.cjs +1 -0
  45. package/build/plugins/orbitcontroller/index.d.ts +2 -0
  46. package/build/plugins/orbitcontroller/index.mjs +5 -0
  47. package/build/plugins/state/index.cjs +27 -0
  48. package/build/plugins/state/index.d.ts +2 -0
  49. package/build/plugins/state/index.mjs +4265 -0
  50. package/build/plugins/systeminfo/index.cjs +1 -0
  51. package/build/plugins/systeminfo/index.d.ts +2 -0
  52. package/build/plugins/systeminfo/index.mjs +136 -0
  53. package/build/plugins/toolbox/index.cjs +1 -0
  54. package/build/plugins/toolbox/index.d.ts +2 -0
  55. package/build/{src/modules/toolbox/Toolbox.mjs → plugins/toolbox/index.mjs} +8 -2
  56. package/build/src/components/gizmo/Gizmo.d.ts +1 -1
  57. package/build/src/components/gizmo/handles/AxisHandle.d.ts +1 -1
  58. package/build/src/components/gizmo/handles/RadialHandle.d.ts +1 -1
  59. package/build/src/components/gizmo/handles/ScaleHandle.d.ts +1 -1
  60. package/build/src/components/gizmo/rotate/RotateGizmo.d.ts +2 -2
  61. package/build/src/components/gizmo/scale/ScaleGizmo.d.ts +2 -2
  62. package/build/src/components/gizmo/translate/TranslateGizmo.d.ts +2 -2
  63. package/build/src/components/model/Model.d.ts +2 -2
  64. package/build/src/components/primitive/Primitive.d.ts +3 -3
  65. package/build/src/components/root/Root.d.ts +5 -7
  66. package/build/src/core/Dive.d.ts +1 -1
  67. package/build/src/engine/clock/Clock.d.ts +1 -0
  68. package/build/src/engine/index.d.ts +6 -0
  69. package/build/src/engine/renderer/Renderer.d.ts +47 -7
  70. package/build/src/events/index.d.ts +1 -0
  71. package/build/src/index.d.ts +4 -2
  72. package/build/src/interfaces/Draggable.d.ts +1 -1
  73. package/build/src/plugins/animation/index.d.ts +2 -0
  74. package/build/src/{modules/animation → plugins/animation/src}/animator/Animator.d.ts +2 -3
  75. package/build/src/plugins/animation/src/index.d.ts +3 -0
  76. package/build/src/plugins/animation/src/system/AnimationSystem.d.ts +23 -0
  77. package/build/src/plugins/ar/index.d.ts +4 -0
  78. package/build/src/plugins/ar/src/ARSystem.d.ts +24 -0
  79. package/build/src/plugins/ar/src/arquicklook/ARQuickLook.d.ts +15 -0
  80. package/build/src/plugins/ar/src/error/ar-errors.d.ts +18 -0
  81. package/build/src/{modules/ar → plugins/ar/src}/sceneviewer/SceneViewer.d.ts +10 -0
  82. package/build/src/{modules/ar → plugins/ar/src}/webxr/WebXR.d.ts +2 -2
  83. package/build/src/{modules/ar → plugins/ar/src}/webxr/controller/WebXRController.d.ts +2 -2
  84. package/build/src/{modules/ar → plugins/ar/src}/webxr/origin/WebXROrigin.d.ts +1 -1
  85. package/build/src/{modules/ar → plugins/ar/src}/webxr/raycaster/WebXRRaycaster.d.ts +3 -3
  86. package/build/src/{modules/ar → plugins/ar/src}/webxr/raycaster/ar/WebXRRaycasterAR.d.ts +1 -1
  87. package/build/src/{modules/ar → plugins/ar/src}/webxr/raycaster/three/WebXRRaycasterTHREE.d.ts +2 -2
  88. package/build/src/{modules/ar → plugins/ar/src}/webxr/touchscreencontrols/WebXRTouchscreenControls.d.ts +1 -1
  89. package/build/src/plugins/assetconverter/index.d.ts +1 -0
  90. package/build/src/plugins/assetconverter/src/AssetConverter.d.ts +13 -0
  91. package/build/src/plugins/assetexporter/index.d.ts +1 -0
  92. package/build/src/{modules/asset/exporter → plugins/assetexporter/src}/AssetExporter.d.ts +0 -17
  93. package/build/src/plugins/assetloader/index.d.ts +3 -0
  94. package/build/src/plugins/assetloader/src/loader/AssetLoader.d.ts +8 -0
  95. package/build/src/plugins/axiscamera/index.d.ts +1 -0
  96. package/build/src/{modules/axiscamera → plugins/axiscamera/src}/AxisCamera.d.ts +1 -4
  97. package/build/src/plugins/mediacreator/index.d.ts +1 -0
  98. package/build/src/plugins/mediacreator/src/MediaCreator.d.ts +15 -0
  99. package/build/src/plugins/orbitcontroller/index.d.ts +1 -0
  100. package/build/src/{modules/controller/orbit → plugins/orbitcontroller/src}/OrbitController.d.ts +3 -3
  101. package/build/src/plugins/state/index.d.ts +4 -0
  102. package/build/src/{modules/state → plugins/state/src}/State.d.ts +4 -27
  103. package/build/src/{modules/state → plugins/state/src}/actions/action.d.ts +1 -1
  104. package/build/src/{modules/state → plugins/state/src}/actions/ar/launchar.d.ts +2 -2
  105. package/build/src/{modules/state → plugins/state/src}/actions/camera/computeencompassingview.d.ts +1 -1
  106. package/build/src/{modules/state → plugins/state/src}/actions/camera/getcameratransform.d.ts +1 -1
  107. package/build/src/{modules/state → plugins/state/src}/actions/camera/lockcamera.d.ts +1 -1
  108. package/build/src/{modules/state → plugins/state/src}/actions/camera/movecamera.d.ts +3 -3
  109. package/build/src/{modules/state → plugins/state/src}/actions/camera/setcameralayer.d.ts +1 -1
  110. package/build/src/{modules/state → plugins/state/src}/actions/camera/setcameratransform.d.ts +1 -1
  111. package/build/src/{modules/state → plugins/state/src}/actions/camera/zoomcamera.d.ts +1 -1
  112. package/build/src/{modules/state → plugins/state/src}/actions/media/generatemedia.d.ts +1 -1
  113. package/build/src/plugins/state/src/actions/object/addobject.d.ts +9 -0
  114. package/build/src/plugins/state/src/actions/object/deleteobject.d.ts +13 -0
  115. package/build/src/plugins/state/src/actions/object/deselectobject.d.ts +13 -0
  116. package/build/src/{modules/state → plugins/state/src}/actions/object/dropit.d.ts +3 -3
  117. package/build/src/{modules/state → plugins/state/src}/actions/object/getallobjects.d.ts +3 -2
  118. package/build/src/plugins/state/src/actions/object/getobjects.d.ts +13 -0
  119. package/build/src/{modules/state → plugins/state/src}/actions/object/modelloaded.d.ts +1 -1
  120. package/build/src/{modules/state → plugins/state/src}/actions/object/placeonfloor.d.ts +3 -3
  121. package/build/src/plugins/state/src/actions/object/selectobject.d.ts +13 -0
  122. package/build/src/plugins/state/src/actions/object/setparent.d.ts +23 -0
  123. package/build/src/plugins/state/src/actions/object/updateobject.d.ts +13 -0
  124. package/build/src/{modules/state → plugins/state/src}/actions/renderer/startrender.d.ts +1 -1
  125. package/build/src/{modules/state → plugins/state/src}/actions/scene/exportscene.d.ts +4 -4
  126. package/build/src/plugins/state/src/actions/scene/getallscenedata.d.ts +9 -0
  127. package/build/src/{modules/state → plugins/state/src}/actions/scene/setbackground.d.ts +1 -1
  128. package/build/src/{modules/state → plugins/state/src}/actions/scene/updatescene.d.ts +1 -1
  129. package/build/src/{modules/state → plugins/state/src}/actions/toolbox/setgizmomode.d.ts +1 -1
  130. package/build/src/{modules/state → plugins/state/src}/actions/toolbox/setgizmoscalelinked.d.ts +1 -1
  131. package/build/src/{modules/state → plugins/state/src}/actions/toolbox/setgizmovisible.d.ts +1 -1
  132. package/build/src/{modules/state → plugins/state/src}/actions/toolbox/usetool.d.ts +2 -2
  133. package/build/src/plugins/state/types/ActionTypes.d.ts +17 -0
  134. package/build/src/{types/SceneType.d.ts → plugins/state/types/StateExportFileType.d.ts} +1 -1
  135. package/build/src/plugins/state/types/StateSceneData.d.ts +19 -0
  136. package/build/src/plugins/state/types/index.d.ts +1 -0
  137. package/build/src/plugins/systeminfo/index.d.ts +2 -0
  138. package/build/src/{modules/systeminfo → plugins/systeminfo/src}/SystemInfo.d.ts +21 -31
  139. package/build/src/plugins/toolbox/index.d.ts +4 -0
  140. package/build/src/{modules/toolbox → plugins/toolbox/src}/BaseTool.d.ts +2 -4
  141. package/build/src/{modules/toolbox → plugins/toolbox/src}/Toolbox.d.ts +2 -11
  142. package/build/src/{modules/toolbox → plugins/toolbox/src}/select/SelectTool.d.ts +2 -6
  143. package/build/src/{modules/toolbox → plugins/toolbox/src}/transform/TransformTool.d.ts +2 -6
  144. package/build/src/types/components/DIVELight.d.ts +4 -0
  145. package/build/src/types/components/DIVESceneObject.d.ts +6 -0
  146. package/build/src/types/components/index.d.ts +2 -0
  147. package/build/src/types/index.d.ts +2 -5
  148. package/build/src/types/schema/BaseEntitySchema.d.ts +8 -0
  149. package/build/src/types/schema/EntitySchema.d.ts +11 -0
  150. package/build/src/types/schema/EntityTypeSchema.d.ts +1 -0
  151. package/build/src/types/schema/GeometrySchema.d.ts +7 -0
  152. package/build/src/types/schema/GeometryTypeSchema.d.ts +1 -0
  153. package/build/src/types/schema/GroupSchema.d.ts +11 -0
  154. package/build/src/types/schema/LightSchema.d.ts +28 -0
  155. package/build/src/{modules/state/types/COMMaterial.d.ts → types/schema/MaterialSchema.d.ts} +1 -1
  156. package/build/src/types/schema/ModelSchema.d.ts +14 -0
  157. package/build/src/types/schema/PovSchema.d.ts +10 -0
  158. package/build/src/types/schema/PrimitiveSchema.d.ts +14 -0
  159. package/build/src/types/schema/index.d.ts +11 -0
  160. package/package.json +52 -42
  161. package/build/chunks/FileTypes-DuVGjbcR.mjs +0 -36
  162. package/build/chunks/FileTypes-DzVpDu_p.cjs +0 -1
  163. package/build/chunks/ModuleRegistry-NyNtjHb2.cjs +0 -1
  164. package/build/chunks/ModuleRegistry-RSub8W0G.mjs +0 -13
  165. package/build/chunks/PerspectiveCamera-BByyG5R4.cjs +0 -1
  166. package/build/chunks/PerspectiveCamera-sm4_81KJ.mjs +0 -34
  167. package/build/chunks/SelectTool-C7nerV4P.cjs +0 -1
  168. package/build/chunks/VisibilityLayerMask-BI7jPKdx.cjs +0 -1
  169. package/build/chunks/VisibilityLayerMask-CXgt1fJc.mjs +0 -8
  170. package/build/chunks/findInterface-BEdL2iUQ.cjs +0 -1
  171. package/build/chunks/findInterface-OrXgmwxj.mjs +0 -18
  172. package/build/chunks/index-C7Wx_9uY.mjs +0 -33
  173. package/build/chunks/index-MNP0K5dt.cjs +0 -1
  174. package/build/chunks/package-DeBkqggW.mjs +0 -39
  175. package/build/chunks/package-o6as1hwQ.cjs +0 -1
  176. package/build/src/error/ar-compatibility/ar-compatibility-error.d.ts +0 -12
  177. package/build/src/modules/ModuleRegistry.d.ts +0 -19
  178. package/build/src/modules/animation/AnimationSystem.cjs +0 -1
  179. package/build/src/modules/animation/AnimationSystem.d.ts +0 -36
  180. package/build/src/modules/animation/AnimationSystem.mjs +0 -95
  181. package/build/src/modules/ar/ARSystem.cjs +0 -1
  182. package/build/src/modules/ar/ARSystem.d.ts +0 -71
  183. package/build/src/modules/ar/ARSystem.mjs +0 -163
  184. package/build/src/modules/ar/arquicklook/ARQuickLook.d.ts +0 -7
  185. package/build/src/modules/asset/converter/AssetConverter.d.ts +0 -30
  186. package/build/src/modules/asset/loader/AssetLoader.cjs +0 -4
  187. package/build/src/modules/asset/loader/AssetLoader.d.ts +0 -29
  188. package/build/src/modules/mediacreator/MediaCreator.cjs +0 -1
  189. package/build/src/modules/mediacreator/MediaCreator.d.ts +0 -44
  190. package/build/src/modules/state/State.cjs +0 -27
  191. package/build/src/modules/state/State.mjs +0 -4296
  192. package/build/src/modules/state/actions/object/addobject.d.ts +0 -8
  193. package/build/src/modules/state/actions/object/deleteobject.d.ts +0 -12
  194. package/build/src/modules/state/actions/object/deselectobject.d.ts +0 -12
  195. package/build/src/modules/state/actions/object/getobjects.d.ts +0 -12
  196. package/build/src/modules/state/actions/object/selectobject.d.ts +0 -12
  197. package/build/src/modules/state/actions/object/setparent.d.ts +0 -22
  198. package/build/src/modules/state/actions/object/updateobject.d.ts +0 -12
  199. package/build/src/modules/state/actions/scene/getallscenedata.d.ts +0 -9
  200. package/build/src/modules/state/types/ActionTypes.d.ts +0 -18
  201. package/build/src/modules/state/types/COMBaseEntity.d.ts +0 -8
  202. package/build/src/modules/state/types/COMEntity.d.ts +0 -11
  203. package/build/src/modules/state/types/COMEntityType.d.ts +0 -1
  204. package/build/src/modules/state/types/COMGeometry.d.ts +0 -7
  205. package/build/src/modules/state/types/COMGeometryType.d.ts +0 -1
  206. package/build/src/modules/state/types/COMGroup.d.ts +0 -11
  207. package/build/src/modules/state/types/COMLight.d.ts +0 -28
  208. package/build/src/modules/state/types/COMModel.d.ts +0 -14
  209. package/build/src/modules/state/types/COMPov.d.ts +0 -10
  210. package/build/src/modules/state/types/COMPrimitive.d.ts +0 -14
  211. package/build/src/modules/state/types/index.d.ts +0 -11
  212. package/build/src/modules/systeminfo/SystemInfo.cjs +0 -1
  213. package/build/src/modules/systeminfo/SystemInfo.mjs +0 -114
  214. package/build/src/modules/toolbox/Toolbox.cjs +0 -1
  215. package/build/src/types/SceneData.d.ts +0 -19
  216. package/build/src/types/SceneObjects.d.ts +0 -9
  217. package/build/src/types/UUID.d.ts +0 -1
  218. /package/build/{src/modules/asset/converter/AssetConverter.cjs → plugins/assetconverter/index.cjs} +0 -0
  219. /package/build/{src/modules/asset/converter/AssetConverter.mjs → plugins/assetconverter/index.mjs} +0 -0
  220. /package/build/src/{modules/events → events}/EventExecutor.d.ts +0 -0
  221. /package/build/src/{modules/animation → plugins/animation/src}/types/AnimatorParameters.d.ts +0 -0
  222. /package/build/src/{modules/ar → plugins/ar/src}/webxr/crosshair/WebXRCrosshair.d.ts +0 -0
  223. /package/build/src/{modules/ar → plugins/ar/src}/webxr/overlay/Overlay.d.ts +0 -0
  224. /package/build/src/{modules/asset → plugins/assetloader/src}/draco/DracoLoader.d.ts +0 -0
  225. /package/build/src/{modules/state → plugins/state/src}/ActionRegistry.d.ts +0 -0
  226. /package/build/src/{modules/state → plugins/state/src}/actions/ar/index.d.ts +0 -0
  227. /package/build/src/{modules/state → plugins/state/src}/actions/camera/index.d.ts +0 -0
  228. /package/build/src/{modules/state → plugins/state/src}/actions/index.d.ts +0 -0
  229. /package/build/src/{modules/state → plugins/state/src}/actions/media/index.d.ts +0 -0
  230. /package/build/src/{modules/state → plugins/state/src}/actions/object/index.d.ts +0 -0
  231. /package/build/src/{modules/state → plugins/state/src}/actions/renderer/index.d.ts +0 -0
  232. /package/build/src/{modules/state → plugins/state/src}/actions/scene/index.d.ts +0 -0
  233. /package/build/src/{modules/state → plugins/state/src}/actions/toolbox/index.d.ts +0 -0
  234. /package/build/src/{types/info → plugins/systeminfo/types}/index.d.ts +0 -0
@@ -0,0 +1 @@
1
+ "use strict";var u=Object.defineProperty;var h=(n,e,t)=>e in n?u(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var a=(n,e,t)=>h(n,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("@tweenjs/tween.js"),c=require("../../chunks/MathUtils-CBW56ZuG.cjs");function _(n){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const t in n)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,s.get?s:{enumerable:!0,get:()=>n[t]})}}return e.default=n,Object.freeze(e)}const d=_(f);class g{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});const s=this._listeners;s[e]===void 0&&(s[e]=[]),s[e].indexOf(t)===-1&&s[e].push(t)}hasEventListener(e,t){if(this._listeners===void 0)return!1;const s=this._listeners;return s[e]!==void 0&&s[e].indexOf(t)!==-1}removeEventListener(e,t){if(this._listeners===void 0)return;const r=this._listeners[e];if(r!==void 0){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}}dispatchEvent(e){if(this._listeners===void 0)return;const s=this._listeners[e.type];if(s!==void 0){e.target=this;const r=s.slice(0);for(let i=0,l=r.length;i<l;i++)r[i].call(this,e);e.target=null}}}class p extends g{constructor(t,s,r,i){super();a(this,"_uuid",c.MathUtils.generateUUID());a(this,"_playing",!1);a(this,"_stopped",!1);a(this,"_completed",!1);this.object=t,this.to=s,this.duration=r,this.options=i}get uuid(){return this._uuid}get playing(){return this._playing}get stopped(){return this._stopped}get completed(){return this._completed}dispose(){this._playing=!1,this._stopped=!1,this._completed=!1}play(){return this._playing=!0,this._stopped=!1,this.dispatchEvent({type:"play",target:this}),this}stop(){return this._playing=!1,this._stopped=!0,this.dispatchEvent({type:"stop",target:this}),this}}class E{constructor(){a(this,"uuid",c.MathUtils.generateUUID());a(this,"TWEEN",d);a(this,"_callbackMap",new Map);a(this,"_tweens",new Map)}animate(e,t,s,r){var l,o;const i=new p(e,t,s,r);return this._callbackMap.set(i.uuid,{onUpdate:((l=i.options)==null?void 0:l.onUpdate)??(()=>{}),onComplete:((o=i.options)==null?void 0:o.onComplete)??(()=>{})}),this._createTween(i),i}remove(e){if(!this._callbackMap.has(e)){console.warn(`Animator with uuid ${e} not found`);return}this._callbackMap.delete(e),this._tweens.delete(e)}dispose(){this._callbackMap.clear(),this._tweens.clear()}tick(){this.TWEEN.update()}_createTween(e){var s;const t=new this.TWEEN.Tween(e.object).to(e.to,e.duration).easing(((s=e.options)==null?void 0:s.easing)??this.TWEEN.Easing.Quadratic.Out).onUpdate((r,i)=>{var l;(l=this._callbackMap.get(e.uuid))==null||l.onUpdate(r,i)}).onComplete(r=>{var i;(i=this._callbackMap.get(e.uuid))==null||i.onComplete(r)});e.addEventListener("play",()=>{t.start()}),e.addEventListener("stop",()=>{t.stop()}),this._tweens.set(e.uuid,t)}}exports.TWEEN=d;exports.AnimationSystem=E;exports.Animator=p;
@@ -0,0 +1,2 @@
1
+ export * from '../../src/plugins/animation/index'
2
+ export {}
@@ -0,0 +1,126 @@
1
+ var d = Object.defineProperty;
2
+ var h = (r, e, t) => e in r ? d(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
+ var a = (r, e, t) => h(r, typeof e != "symbol" ? e + "" : e, t);
4
+ import * as c from "@tweenjs/tween.js";
5
+ import { M as p } from "../../chunks/MathUtils-CFGjHuVF.mjs";
6
+ class u {
7
+ addEventListener(e, t) {
8
+ this._listeners === void 0 && (this._listeners = {});
9
+ const i = this._listeners;
10
+ i[e] === void 0 && (i[e] = []), i[e].indexOf(t) === -1 && i[e].push(t);
11
+ }
12
+ hasEventListener(e, t) {
13
+ if (this._listeners === void 0) return !1;
14
+ const i = this._listeners;
15
+ return i[e] !== void 0 && i[e].indexOf(t) !== -1;
16
+ }
17
+ removeEventListener(e, t) {
18
+ if (this._listeners === void 0) return;
19
+ const n = this._listeners[e];
20
+ if (n !== void 0) {
21
+ const s = n.indexOf(t);
22
+ s !== -1 && n.splice(s, 1);
23
+ }
24
+ }
25
+ dispatchEvent(e) {
26
+ if (this._listeners === void 0) return;
27
+ const i = this._listeners[e.type];
28
+ if (i !== void 0) {
29
+ e.target = this;
30
+ const n = i.slice(0);
31
+ for (let s = 0, l = n.length; s < l; s++)
32
+ n[s].call(this, e);
33
+ e.target = null;
34
+ }
35
+ }
36
+ }
37
+ class _ extends u {
38
+ constructor(t, i, n, s) {
39
+ super();
40
+ a(this, "_uuid", p.generateUUID());
41
+ a(this, "_playing", !1);
42
+ a(this, "_stopped", !1);
43
+ a(this, "_completed", !1);
44
+ this.object = t, this.to = i, this.duration = n, this.options = s;
45
+ }
46
+ get uuid() {
47
+ return this._uuid;
48
+ }
49
+ get playing() {
50
+ return this._playing;
51
+ }
52
+ get stopped() {
53
+ return this._stopped;
54
+ }
55
+ get completed() {
56
+ return this._completed;
57
+ }
58
+ dispose() {
59
+ this._playing = !1, this._stopped = !1, this._completed = !1;
60
+ }
61
+ play() {
62
+ return this._playing = !0, this._stopped = !1, this.dispatchEvent({ type: "play", target: this }), this;
63
+ }
64
+ stop() {
65
+ return this._playing = !1, this._stopped = !0, this.dispatchEvent({ type: "stop", target: this }), this;
66
+ }
67
+ }
68
+ class E {
69
+ constructor() {
70
+ a(this, "uuid", p.generateUUID());
71
+ a(this, "TWEEN", c);
72
+ a(this, "_callbackMap", /* @__PURE__ */ new Map());
73
+ a(this, "_tweens", /* @__PURE__ */ new Map());
74
+ }
75
+ /**
76
+ * Creates a new animator and registers it.
77
+ * @param object - The object to animate.
78
+ * @param to - The target value.
79
+ * @param duration - The duration of the animation in milliseconds.
80
+ * @param options - The options for the animation.
81
+ * @returns The animator.
82
+ */
83
+ animate(e, t, i, n) {
84
+ var l, o;
85
+ const s = new _(e, t, i, n);
86
+ return this._callbackMap.set(s.uuid, {
87
+ onUpdate: ((l = s.options) == null ? void 0 : l.onUpdate) ?? (() => {
88
+ }),
89
+ onComplete: ((o = s.options) == null ? void 0 : o.onComplete) ?? (() => {
90
+ })
91
+ }), this._createTween(s), s;
92
+ }
93
+ remove(e) {
94
+ if (!this._callbackMap.has(e)) {
95
+ console.warn(`Animator with uuid ${e} not found`);
96
+ return;
97
+ }
98
+ this._callbackMap.delete(e), this._tweens.delete(e);
99
+ }
100
+ dispose() {
101
+ this._callbackMap.clear(), this._tweens.clear();
102
+ }
103
+ tick() {
104
+ this.TWEEN.update();
105
+ }
106
+ _createTween(e) {
107
+ var i;
108
+ const t = new this.TWEEN.Tween(e.object).to(e.to, e.duration).easing(((i = e.options) == null ? void 0 : i.easing) ?? this.TWEEN.Easing.Quadratic.Out).onUpdate((n, s) => {
109
+ var l;
110
+ (l = this._callbackMap.get(e.uuid)) == null || l.onUpdate(n, s);
111
+ }).onComplete((n) => {
112
+ var s;
113
+ (s = this._callbackMap.get(e.uuid)) == null || s.onComplete(n);
114
+ });
115
+ e.addEventListener("play", () => {
116
+ t.start();
117
+ }), e.addEventListener("stop", () => {
118
+ t.stop();
119
+ }), this._tweens.set(e.uuid, t);
120
+ }
121
+ }
122
+ export {
123
+ E as AnimationSystem,
124
+ _ as Animator,
125
+ c as TWEEN
126
+ };
@@ -0,0 +1 @@
1
+ "use strict";var h=Object.defineProperty;var w=(o,e,r)=>e in o?h(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r;var l=(o,e,r)=>w(o,typeof e!="symbol"?e+"":e,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../systeminfo/index.cjs"),R=require("../assetconverter/index.cjs"),A=require("../../chunks/AssetLoader-DCBiLwef.cjs"),y=require("../../chunks/AssetExporter-TzKB2FHh.cjs");class a extends Error{constructor(r,t){super(r);l(this,"type");this.name=this.constructor.name,this.type=t,Object.setPrototypeOf(this,new.target.prototype)}}class m extends a{constructor(){super("AR features are not supported on desktop platforms.","ar-desktop-platform-error")}}class d extends a{constructor(){super("ARQuickLook on iOS is only available in Safari.","ar-not-safari-on-ios-error")}}class p extends a{constructor(e,r){super(`ARQuickLook requires iOS version ${r} or later. Current version: ${e}.`,"ar-ios-version-too-low-error"),this.currentVersion=e,this.requiredVersion=r}}class u extends a{constructor(){super("An unknown ARQuickLook compatibility error occurred.","ar-quicklook-unknown-error")}}const k=12;class S{constructor(){l(this,"converter",new R.AssetConverter(new A.AssetLoader,new y.AssetExporter))}async launch(e,r){if(c.SystemInfo.getBrowser()!==c.EBrowser.SAFARI)return Promise.reject(new d);const t=c.SystemInfo.getIOSVersion();if(t&&t.major<k)return Promise.reject(new p(t.full,k));if(!t)return Promise.reject(new u);if(!c.SystemInfo.getSupportsARQuickLook())return Promise.reject(new u);const n=await this.convertToUSDZ(e,r);return this.launchARQuickLook(n,r)}async convertToUSDZ(e,r){const t=await this.converter.convert(e).to("usdz",{quickLookCompatible:!0,ar:{anchoring:{type:"plane"},planeAnchoring:{alignment:(r==null?void 0:r.arPlacement)==="vertical"?"vertical":"horizontal"}}}),n=new Blob([t],{type:"model/vnd.usdz+zip"});return URL.createObjectURL(n)}launchARQuickLook(e,r){return new Promise(t=>{(r==null?void 0:r.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",t(),n.click()})}}class f{launch(e,r){const t=self.location.toString(),n=document.createElement("a"),s=this._createParams(t,e,r),i=this._createIntent(t,e,s);n.setAttribute("href",i),n.click()}_createParams(e,r,t){const n=new URL(r,e),s=new URLSearchParams(n.search);return s.set("mode","ar_preferred"),this._applyScaleOption(s,t),this._applyPlacementOption(s,t),this._applySoundOption(s,e),this._applyLinkOption(s,e),s}_applyScaleOption(e,r){(r==null?void 0:r.arScale)==="fixed"&&e.set("resizable","false")}_applyPlacementOption(e,r){(r==null?void 0:r.arPlacement)==="vertical"&&e.set("enable_vertical_placement","true")}_applySoundOption(e,r){if(e.has("sound")){const t=new URL(e.get("sound"),r);e.set("sound",t.toString())}}_applyLinkOption(e,r){if(e.has("link")){const t=new URL(e.get("link"),r);e.set("link",t.toString())}}_createIntent(e,r,t){const n=new URL(e),s=new URL(r,e),i="#model-viewer-no-ar-fallback";return n.hash=i,`intent://arvr.google.com/scene-viewer/1.2?${t.toString()+"&file="+s.toString()}#Intent;scheme=https;package=com.google.android.googlequicksearchbox;action=android.intent.action.VIEW;S.browser_fallback_url=${encodeURIComponent(n.toString())};end;`}}class g{async launch(e,r){const t=c.SystemInfo.getSystem();return t===c.ESystem.IOS?new S().launch(e,r):t===c.ESystem.ANDROID?new f().launch(e,r):Promise.reject(new m)}}exports.ARDesktopPlatformError=m;exports.ARError=a;exports.ARQuickLook=S;exports.ARQuickLookNotSafariError=d;exports.ARQuickLookUnknownError=u;exports.ARQuickLookVersionMismatchError=p;exports.ARSystem=g;exports.SceneViewer=f;
@@ -0,0 +1,2 @@
1
+ export * from '../../src/plugins/ar/index'
2
+ export {}
@@ -0,0 +1,202 @@
1
+ var p = Object.defineProperty;
2
+ var d = (o, e, r) => e in o ? p(o, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : o[e] = r;
3
+ var l = (o, e, r) => d(o, typeof e != "symbol" ? e + "" : e, r);
4
+ import { SystemInfo as s, EBrowser as h, ESystem as u } from "../systeminfo/index.mjs";
5
+ import { AssetConverter as f } from "../assetconverter/index.mjs";
6
+ import { A as w } from "../../chunks/AssetLoader-Dqrg0Re8.mjs";
7
+ import { A as S } from "../../chunks/AssetExporter-QnOue3VT.mjs";
8
+ class a extends Error {
9
+ constructor(r, t) {
10
+ super(r);
11
+ l(this, "type");
12
+ this.name = this.constructor.name, this.type = t, Object.setPrototypeOf(this, new.target.prototype);
13
+ }
14
+ }
15
+ class R extends a {
16
+ constructor() {
17
+ super(
18
+ "AR features are not supported on desktop platforms.",
19
+ "ar-desktop-platform-error"
20
+ );
21
+ }
22
+ }
23
+ class A extends a {
24
+ constructor() {
25
+ super(
26
+ "ARQuickLook on iOS is only available in Safari.",
27
+ "ar-not-safari-on-ios-error"
28
+ );
29
+ }
30
+ }
31
+ class g extends a {
32
+ constructor(e, r) {
33
+ super(
34
+ `ARQuickLook requires iOS version ${r} or later. Current version: ${e}.`,
35
+ "ar-ios-version-too-low-error"
36
+ ), this.currentVersion = e, this.requiredVersion = r;
37
+ }
38
+ }
39
+ class m extends a {
40
+ constructor() {
41
+ super(
42
+ "An unknown ARQuickLook compatibility error occurred.",
43
+ "ar-quicklook-unknown-error"
44
+ // Updated type to be more specific
45
+ );
46
+ }
47
+ }
48
+ const k = 12;
49
+ class y {
50
+ constructor() {
51
+ l(this, "converter", new f(
52
+ new w(),
53
+ new S()
54
+ ));
55
+ }
56
+ /**
57
+ * Launches AR using ARQuickLook (iOS-specific implementation)
58
+ *
59
+ * @param uri - The URI of the 3D model to display in AR
60
+ * @param options - Optional configuration for the AR experience
61
+ * @returns Promise that resolves when ARQuickLook is launched successfully
62
+ * @throws Error if ARQuickLook is not supported on the device
63
+ */
64
+ async launch(e, r) {
65
+ if (s.getBrowser() !== h.SAFARI)
66
+ return Promise.reject(new A());
67
+ const t = s.getIOSVersion();
68
+ if (t && t.major < k)
69
+ return Promise.reject(
70
+ new g(
71
+ t.full,
72
+ k
73
+ )
74
+ );
75
+ if (!t)
76
+ return Promise.reject(new m());
77
+ if (!s.getSupportsARQuickLook())
78
+ return Promise.reject(new m());
79
+ const n = await this.convertToUSDZ(e, r);
80
+ return this.launchARQuickLook(n, r);
81
+ }
82
+ async convertToUSDZ(e, r) {
83
+ const t = await this.converter.convert(e).to("usdz", {
84
+ quickLookCompatible: !0,
85
+ ar: {
86
+ anchoring: { type: "plane" },
87
+ planeAnchoring: {
88
+ alignment: (r == null ? void 0 : r.arPlacement) === "vertical" ? "vertical" : "horizontal"
89
+ }
90
+ }
91
+ }), n = new Blob([t], { type: "model/vnd.usdz+zip" });
92
+ return URL.createObjectURL(n);
93
+ }
94
+ launchARQuickLook(e, r) {
95
+ return new Promise((t) => {
96
+ (r == null ? void 0 : r.arScale) === "fixed" && (e = e.concat("#allowsContentScaling=0"));
97
+ const n = document.createElement("a");
98
+ n.innerHTML = "<picture></picture>", n.rel = "ar", n.href = e, n.download = "scene.usdz", t(), n.click();
99
+ });
100
+ }
101
+ }
102
+ class L {
103
+ /**
104
+ * Launches AR using SceneViewer (Android-specific implementation)
105
+ * Note: SceneViewer is supported on all Android devices. If ARCore is not installed,
106
+ * the model will be displayed in 3D view mode instead of AR mode.
107
+ *
108
+ * @param uri - The URI of the 3D model to display in AR
109
+ * @param options - Optional configuration for the AR experience
110
+ * @returns Promise that resolves when SceneViewer is launched successfully
111
+ * @throws Error if there's an issue launching SceneViewer
112
+ */
113
+ launch(e, r) {
114
+ const t = self.location.toString(), n = document.createElement("a"), c = this._createParams(t, e, r), i = this._createIntent(t, e, c);
115
+ n.setAttribute("href", i), n.click();
116
+ }
117
+ /**
118
+ * Creates the base URL parameters for SceneViewer
119
+ * @param location Current page location URL
120
+ * @returns URLSearchParams with base configuration
121
+ */
122
+ _createParams(e, r, t) {
123
+ const n = new URL(r, e), c = new URLSearchParams(n.search);
124
+ return c.set("mode", "ar_preferred"), this._applyScaleOption(c, t), this._applyPlacementOption(c, t), this._applySoundOption(c, e), this._applyLinkOption(c, e), c;
125
+ }
126
+ /**
127
+ * Applies the scale option to the parameters
128
+ * If scale is set to 'fixed', the model will not be resizable in AR
129
+ * @param params URLSearchParams to modify
130
+ */
131
+ _applyScaleOption(e, r) {
132
+ (r == null ? void 0 : r.arScale) === "fixed" && e.set("resizable", "false");
133
+ }
134
+ /**
135
+ * Applies the placement option to the parameters
136
+ * If placement is set to 'vertical', vertical placement will be enabled
137
+ * @param params URLSearchParams to modify
138
+ */
139
+ _applyPlacementOption(e, r) {
140
+ (r == null ? void 0 : r.arPlacement) === "vertical" && e.set("enable_vertical_placement", "true");
141
+ }
142
+ /**
143
+ * Applies the sound option to the parameters if present
144
+ * This will resolve any relative sound URLs to absolute URLs
145
+ * @param params URLSearchParams to modify
146
+ * @param location Current page location URL
147
+ */
148
+ _applySoundOption(e, r) {
149
+ if (e.has("sound")) {
150
+ const t = new URL(e.get("sound"), r);
151
+ e.set("sound", t.toString());
152
+ }
153
+ }
154
+ /**
155
+ * Applies the link option to the parameters if present
156
+ * This will resolve any relative link URLs to absolute URLs
157
+ * @param params URLSearchParams to modify
158
+ * @param location Current page location URL
159
+ */
160
+ _applyLinkOption(e, r) {
161
+ if (e.has("link")) {
162
+ const t = new URL(e.get("link"), r);
163
+ e.set("link", t.toString());
164
+ }
165
+ }
166
+ /**
167
+ * Creates the Android Intent URL for SceneViewer
168
+ * @param params URLSearchParams containing all configuration
169
+ * @param location Current page location URL
170
+ * @returns The complete Intent URL
171
+ */
172
+ _createIntent(e, r, t) {
173
+ const n = new URL(e), c = new URL(r, e), i = "#model-viewer-no-ar-fallback";
174
+ return n.hash = i, `intent://arvr.google.com/scene-viewer/1.2?${t.toString() + "&file=" + c.toString()}#Intent;scheme=https;package=com.google.android.googlequicksearchbox;action=android.intent.action.VIEW;S.browser_fallback_url=${encodeURIComponent(
175
+ n.toString()
176
+ )};end;`;
177
+ }
178
+ }
179
+ class P {
180
+ /**
181
+ * Launches an AR experience using the appropriate platform-specific implementation
182
+ *
183
+ * @param uri - The URI of the 3D model to display in AR
184
+ * @param options - Optional configuration for the AR experience
185
+ * @returns Promise that resolves when AR is launched successfully
186
+ * @throws Error if AR is not supported on the current platform
187
+ */
188
+ async launch(e, r) {
189
+ const t = s.getSystem();
190
+ return t === u.IOS ? new y().launch(e, r) : t === u.ANDROID ? new L().launch(e, r) : Promise.reject(new R());
191
+ }
192
+ }
193
+ export {
194
+ R as ARDesktopPlatformError,
195
+ a as ARError,
196
+ y as ARQuickLook,
197
+ A as ARQuickLookNotSafariError,
198
+ m as ARQuickLookUnknownError,
199
+ g as ARQuickLookVersionMismatchError,
200
+ P as ARSystem,
201
+ L as SceneViewer
202
+ };
@@ -0,0 +1,2 @@
1
+ export * from '../../src/plugins/assetconverter/index'
2
+ export {}
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../chunks/AssetExporter-TzKB2FHh.cjs");exports.AssetExporter=e.AssetExporter;
@@ -0,0 +1,2 @@
1
+ export * from '../../src/plugins/assetexporter/index'
2
+ export {}
@@ -0,0 +1,4 @@
1
+ import { A as o } from "../../chunks/AssetExporter-QnOue3VT.mjs";
2
+ export {
3
+ o as AssetExporter
4
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../chunks/AssetLoader-DCBiLwef.cjs");exports.AssetLoader=e.AssetLoader;exports.DRACOWorker=e.DRACOWorker;exports.DracoLoader=e.DracoLoader;
@@ -0,0 +1,2 @@
1
+ export * from '../../src/plugins/assetloader/index'
2
+ export {}
@@ -0,0 +1,6 @@
1
+ import { A as o, a as e, D as s } from "../../chunks/AssetLoader-Dqrg0Re8.mjs";
2
+ export {
3
+ o as AssetLoader,
4
+ e as DRACOWorker,
5
+ s as DracoLoader
6
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../chunks/FileTypes-Ca8pkRlQ.cjs");exports.DIVEAxisCamera=e.DIVEAxisCamera;
@@ -0,0 +1,2 @@
1
+ export * from '../../src/plugins/axiscamera/index'
2
+ export {}
@@ -0,0 +1,4 @@
1
+ import { D as e } from "../../chunks/FileTypes-CpKiTXEY.mjs";
2
+ export {
3
+ e as DIVEAxisCamera
4
+ };
@@ -0,0 +1 @@
1
+ "use strict";var _=Object.defineProperty;var d=(t,e,r)=>e in t?_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var n=(t,e,r)=>d(t,typeof e!="symbol"?e+"":e,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../../chunks/PerspectiveCamera-CONx93im.cjs");class h{constructor(e,r,o){n(this,"_renderer");n(this,"_scene");n(this,"_controller");this._renderer=e,this._scene=r,this._controller=o}generateMedia(e,r,o,s){const c=this._controller.object.position.clone(),l=this._controller.object.quaternion.clone();this._renderer.onResize(o,s),this._controller.object.onResize(o,s),this._controller.object.position.copy(e),this._controller.target.copy(r),this._controller.update();const a=this.drawCanvas().toDataURL();return this._controller.object.position.copy(c),this._controller.object.quaternion.copy(l),a}drawCanvas(e){const r=this._renderer.webglrenderer.domElement;e&&(this._renderer.webglrenderer.domElement=e),this._controller.object.layers.mask=i.DIVEPerspectiveCamera.LIVE_VIEW_LAYER_MASK,this._renderer.webglrenderer.render(this._scene,this._controller.object),this._controller.object.layers.mask=i.DIVEPerspectiveCamera.EDITOR_VIEW_LAYER_MASK;const o=this._renderer.webglrenderer.domElement;return e&&(this._renderer.webglrenderer.domElement=r),o}}exports.MediaCreator=h;
@@ -0,0 +1,2 @@
1
+ export * from '../../src/plugins/mediacreator/index'
2
+ export {}
@@ -1,7 +1,7 @@
1
1
  var a = Object.defineProperty;
2
2
  var d = (t, e, r) => e in t ? a(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
3
  var n = (t, e, r) => d(t, typeof e != "symbol" ? e + "" : e, r);
4
- import { a as i } from "../../../chunks/PerspectiveCamera-sm4_81KJ.mjs";
4
+ import { D as i } from "../../chunks/PerspectiveCamera-DUiWJJIj.mjs";
5
5
  class m {
6
6
  constructor(e, r, o) {
7
7
  n(this, "_renderer");
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../chunks/OrbitController-rMX8EHvJ.cjs");exports.OrbitController=t.OrbitController;exports.OrbitControllerDefaultSettings=t.OrbitControllerDefaultSettings;
@@ -0,0 +1,2 @@
1
+ export * from '../../src/plugins/orbitcontroller/index'
2
+ export {}
@@ -0,0 +1,5 @@
1
+ import { a as o, O as e } from "../../chunks/OrbitController-D-WNei2f.mjs";
2
+ export {
3
+ o as OrbitController,
4
+ e as OrbitControllerDefaultSettings
5
+ };