@shopware-ag/dive 2.0.1-beta.0 → 2.0.1-beta.10
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.
- package/build/chunks/AssetCache-C-7MpNrK.cjs +1 -0
- package/build/chunks/AssetCache-CZV5A70i.mjs +79 -0
- package/build/chunks/AssetExporter-DsbC2rqv.cjs +164 -0
- package/build/{src/modules/asset/exporter/AssetExporter.mjs → chunks/AssetExporter-brT7ogoM.mjs} +22 -21
- package/build/chunks/AssetLoader-BZlqXTbf.cjs +4 -0
- package/build/chunks/AssetLoader-Dnh5tbUZ.mjs +2341 -0
- package/build/chunks/FileTypes-DMybIHHj.mjs +1109 -0
- package/build/chunks/FileTypes-PEcAgRZ8.cjs +30 -0
- package/build/chunks/MathUtils-CBW56ZuG.cjs +1 -0
- package/build/chunks/MathUtils-CFGjHuVF.mjs +159 -0
- package/build/chunks/OrbitController-D-WNei2f.mjs +940 -0
- package/build/chunks/OrbitController-rMX8EHvJ.cjs +1 -0
- package/build/chunks/PerspectiveCamera-CONx93im.cjs +1 -0
- package/build/chunks/PerspectiveCamera-DUiWJJIj.mjs +38 -0
- package/build/chunks/PovSchema-Co9FznEz.cjs +1 -0
- package/build/chunks/PovSchema-DWWvr_ED.mjs +10 -0
- package/build/chunks/SelectTool-BVxDEcnM.cjs +1 -0
- package/build/chunks/{SelectTool-mTRiZYaC.mjs → SelectTool-D5QfT5rr.mjs} +59 -54
- package/build/chunks/draco_decoder-Bh9flJPu.cjs +1 -0
- package/build/chunks/draco_decoder-CEzwqP9o.mjs +38 -0
- package/build/chunks/draco_decoder-DtHHc5d0.mjs +4 -0
- package/build/chunks/draco_decoder-DvYjcLz_.cjs +35 -0
- package/build/chunks/draco_wasm_wrapper-FoEVV9af.cjs +118 -0
- package/build/chunks/draco_wasm_wrapper-yQy2VLhb.mjs +121 -0
- package/build/chunks/fflate.module-DHdJvhNh.cjs +6 -0
- package/build/chunks/fflate.module-xyO_T3Zm.mjs +602 -0
- package/build/chunks/findInterface-C6mrvf_t.cjs +1 -0
- package/build/chunks/findInterface-DbJ5qzbc.mjs +11 -0
- package/build/chunks/isFileTypeSupported-BSpswPHU.mjs +12 -0
- package/build/chunks/isFileTypeSupported-CrEqYiv9.cjs +1 -0
- package/build/chunks/network-error-BONfHWQq.mjs +14 -0
- package/build/chunks/network-error-CdDXil5g.cjs +1 -0
- package/build/chunks/package-Bf92jAR_.cjs +1 -0
- package/build/chunks/package-ZPbjnXun.mjs +39 -0
- package/build/chunks/parse-error-DfOPyLWM.mjs +14 -0
- package/build/chunks/parse-error-Dy_EE4rL.cjs +1 -0
- package/build/dive.cjs +1 -30
- package/build/dive.mjs +665 -1622
- package/build/plugins/animation/index.cjs +1 -0
- package/build/plugins/animation/index.d.ts +2 -0
- package/build/plugins/animation/index.mjs +126 -0
- package/build/plugins/ar/index.cjs +1 -0
- package/build/plugins/ar/index.d.ts +2 -0
- package/build/plugins/ar/index.mjs +207 -0
- package/build/plugins/assetcache/index.cjs +1 -0
- package/build/plugins/assetcache/index.d.ts +2 -0
- package/build/plugins/assetcache/index.mjs +5 -0
- package/build/plugins/assetconverter/index.d.ts +2 -0
- package/build/plugins/assetexporter/index.cjs +1 -0
- package/build/plugins/assetexporter/index.d.ts +2 -0
- package/build/plugins/assetexporter/index.mjs +4 -0
- package/build/plugins/assetloader/index.cjs +1 -0
- package/build/plugins/assetloader/index.d.ts +2 -0
- package/build/plugins/assetloader/index.mjs +6 -0
- package/build/plugins/axiscamera/index.cjs +1 -0
- package/build/plugins/axiscamera/index.d.ts +2 -0
- package/build/plugins/axiscamera/index.mjs +4 -0
- package/build/plugins/mediacreator/index.cjs +1 -0
- package/build/plugins/mediacreator/index.d.ts +2 -0
- package/build/{src/modules/mediacreator/MediaCreator.mjs → plugins/mediacreator/index.mjs} +4 -4
- package/build/plugins/orbitcontroller/index.cjs +1 -0
- package/build/plugins/orbitcontroller/index.d.ts +2 -0
- package/build/plugins/orbitcontroller/index.mjs +5 -0
- package/build/plugins/state/index.cjs +27 -0
- package/build/plugins/state/index.d.ts +2 -0
- package/build/plugins/state/index.mjs +4265 -0
- package/build/plugins/systeminfo/index.cjs +1 -0
- package/build/plugins/systeminfo/index.d.ts +2 -0
- package/build/{chunks/SystemInfo-DPAQG-S5.mjs → plugins/systeminfo/index.mjs} +48 -51
- package/build/plugins/toolbox/index.cjs +1 -0
- package/build/plugins/toolbox/index.d.ts +2 -0
- package/build/{src/modules/toolbox/Toolbox.mjs → plugins/toolbox/index.mjs} +23 -17
- package/build/src/components/floor/Floor.d.ts +2 -2
- package/build/src/components/gizmo/Gizmo.d.ts +1 -1
- package/build/src/components/gizmo/handles/AxisHandle.d.ts +1 -1
- package/build/src/components/gizmo/handles/RadialHandle.d.ts +1 -1
- package/build/src/components/gizmo/handles/ScaleHandle.d.ts +1 -1
- package/build/src/components/gizmo/rotate/RotateGizmo.d.ts +2 -2
- package/build/src/components/gizmo/scale/ScaleGizmo.d.ts +2 -2
- package/build/src/components/gizmo/translate/TranslateGizmo.d.ts +2 -2
- package/build/src/components/grid/Grid.d.ts +1 -1
- package/build/src/components/group/Group.d.ts +4 -4
- package/build/src/components/light/AmbientLight.d.ts +3 -3
- package/build/src/components/light/PointLight.d.ts +3 -3
- package/build/src/components/light/SceneLight.d.ts +3 -3
- package/build/src/components/model/Model.d.ts +8 -5
- package/build/src/components/node/Node.d.ts +8 -8
- package/build/src/components/primitive/Primitive.d.ts +5 -5
- package/build/src/components/root/Root.d.ts +19 -31
- package/build/src/core/Dive.d.ts +8 -7
- package/build/src/engine/Engine.d.ts +2 -6
- package/build/src/engine/clock/Clock.d.ts +1 -0
- package/build/src/engine/index.d.ts +6 -0
- package/build/src/engine/renderer/Renderer.d.ts +47 -7
- package/build/src/engine/scene/Scene.d.ts +4 -22
- package/build/src/engine/scene/xrroot/XRRoot.d.ts +2 -2
- package/build/src/engine/scene/xrroot/xrlightroot/XRLightRoot.d.ts +2 -2
- package/build/src/error/file-content/file-content-error.d.ts +4 -0
- package/build/src/error/index.d.ts +4 -0
- package/build/src/error/network/network-error.d.ts +1 -1
- package/build/src/error/parse/parse-error.d.ts +2 -1
- package/build/src/events/dispatcher/EventDispatcher.d.ts +6 -0
- package/build/src/events/index.d.ts +1 -0
- package/build/src/helpers/deepClone/deepClone.d.ts +34 -0
- package/build/src/helpers/index.d.ts +5 -4
- package/build/src/index.d.ts +5 -5
- package/build/src/interfaces/Draggable.d.ts +1 -1
- package/build/src/plugins/animation/index.d.ts +2 -0
- package/build/src/{modules/animation → plugins/animation/src}/animator/Animator.d.ts +2 -3
- package/build/src/plugins/animation/src/index.d.ts +3 -0
- package/build/src/plugins/animation/src/system/AnimationSystem.d.ts +23 -0
- package/build/src/plugins/ar/index.d.ts +4 -0
- package/build/src/plugins/ar/src/ARSystem.d.ts +24 -0
- package/build/src/plugins/ar/src/arquicklook/ARQuickLook.d.ts +15 -0
- package/build/src/plugins/ar/src/error/ar-errors.d.ts +24 -0
- package/build/src/{modules/ar → plugins/ar/src}/sceneviewer/SceneViewer.d.ts +10 -0
- package/build/src/{modules/ar → plugins/ar/src}/webxr/WebXR.d.ts +4 -4
- package/build/src/{modules/ar → plugins/ar/src}/webxr/controller/WebXRController.d.ts +5 -5
- package/build/src/{modules/ar → plugins/ar/src}/webxr/crosshair/WebXRCrosshair.d.ts +2 -2
- package/build/src/{modules/ar → plugins/ar/src}/webxr/origin/WebXROrigin.d.ts +4 -4
- package/build/src/{modules/ar → plugins/ar/src}/webxr/overlay/Overlay.d.ts +2 -2
- package/build/src/{modules/ar → plugins/ar/src}/webxr/raycaster/WebXRRaycaster.d.ts +8 -8
- package/build/src/{modules/ar → plugins/ar/src}/webxr/raycaster/ar/WebXRRaycasterAR.d.ts +4 -4
- package/build/src/{modules/ar → plugins/ar/src}/webxr/raycaster/three/WebXRRaycasterTHREE.d.ts +4 -4
- package/build/src/{modules/ar → plugins/ar/src}/webxr/touchscreencontrols/WebXRTouchscreenControls.d.ts +3 -3
- package/build/src/plugins/assetcache/index.d.ts +1 -0
- package/build/src/plugins/assetcache/src/cache/AssetCache.d.ts +12 -0
- package/build/src/plugins/assetcache/src/chunk/Chunk.d.ts +16 -0
- package/build/src/plugins/assetcache/src/index.d.ts +2 -0
- package/build/src/plugins/assetconverter/index.d.ts +1 -0
- package/build/src/plugins/assetconverter/src/AssetConverter.d.ts +13 -0
- package/build/src/plugins/assetexporter/index.d.ts +1 -0
- package/build/src/{modules/asset/exporter → plugins/assetexporter/src}/AssetExporter.d.ts +0 -17
- package/build/src/plugins/assetloader/index.d.ts +3 -0
- package/build/src/plugins/assetloader/src/draco/DracoLoader.d.ts +10 -0
- package/build/src/plugins/assetloader/src/loader/AssetLoader.d.ts +14 -0
- package/build/src/plugins/axiscamera/index.d.ts +1 -0
- package/build/src/{modules/axiscamera → plugins/axiscamera/src}/AxisCamera.d.ts +3 -6
- package/build/src/plugins/mediacreator/index.d.ts +1 -0
- package/build/src/plugins/mediacreator/src/MediaCreator.d.ts +15 -0
- package/build/src/plugins/orbitcontroller/index.d.ts +1 -0
- package/build/src/{modules/controller/orbit → plugins/orbitcontroller/src}/OrbitController.d.ts +3 -3
- package/build/src/plugins/state/index.d.ts +4 -0
- package/build/src/{modules/state → plugins/state/src}/State.d.ts +4 -27
- package/build/src/{modules/state → plugins/state/src}/actions/action.d.ts +1 -1
- package/build/src/{modules/state → plugins/state/src}/actions/ar/launchar.d.ts +2 -2
- package/build/src/{modules/state → plugins/state/src}/actions/camera/computeencompassingview.d.ts +1 -1
- package/build/src/{modules/state → plugins/state/src}/actions/camera/getcameratransform.d.ts +1 -1
- package/build/src/{modules/state → plugins/state/src}/actions/camera/lockcamera.d.ts +1 -1
- package/build/src/{modules/state → plugins/state/src}/actions/camera/movecamera.d.ts +1 -1
- package/build/src/{modules/state → plugins/state/src}/actions/camera/setcameralayer.d.ts +1 -1
- package/build/src/{modules/state → plugins/state/src}/actions/camera/setcameratransform.d.ts +1 -1
- package/build/src/{modules/state → plugins/state/src}/actions/camera/zoomcamera.d.ts +1 -1
- package/build/src/{modules/state → plugins/state/src}/actions/media/generatemedia.d.ts +1 -1
- package/build/src/plugins/state/src/actions/object/addobject.d.ts +9 -0
- package/build/src/{modules/state → plugins/state/src}/actions/object/deleteobject.d.ts +4 -3
- package/build/src/{modules/state → plugins/state/src}/actions/object/deselectobject.d.ts +4 -3
- package/build/src/{modules/state → plugins/state/src}/actions/object/dropit.d.ts +1 -1
- package/build/src/{modules/state → plugins/state/src}/actions/object/getallobjects.d.ts +3 -2
- package/build/src/{modules/state → plugins/state/src}/actions/object/getobjects.d.ts +3 -2
- package/build/src/{modules/state → plugins/state/src}/actions/object/modelloaded.d.ts +1 -1
- package/build/src/{modules/state → plugins/state/src}/actions/object/placeonfloor.d.ts +1 -1
- package/build/src/{modules/state → plugins/state/src}/actions/object/selectobject.d.ts +4 -3
- package/build/src/{modules/state → plugins/state/src}/actions/object/setparent.d.ts +6 -5
- package/build/src/{modules/state → plugins/state/src}/actions/object/updateobject.d.ts +4 -3
- package/build/src/{modules/state → plugins/state/src}/actions/renderer/startrender.d.ts +1 -1
- package/build/src/{modules/state → plugins/state/src}/actions/scene/exportscene.d.ts +4 -4
- package/build/src/{modules/state → plugins/state/src}/actions/scene/getallscenedata.d.ts +3 -3
- package/build/src/{modules/state → plugins/state/src}/actions/scene/setbackground.d.ts +1 -1
- package/build/src/{modules/state → plugins/state/src}/actions/scene/updatescene.d.ts +1 -1
- package/build/src/{modules/state → plugins/state/src}/actions/toolbox/setgizmomode.d.ts +1 -1
- package/build/src/{modules/state → plugins/state/src}/actions/toolbox/setgizmoscalelinked.d.ts +1 -1
- package/build/src/{modules/state → plugins/state/src}/actions/toolbox/setgizmovisible.d.ts +1 -1
- package/build/src/{modules/state → plugins/state/src}/actions/toolbox/usetool.d.ts +2 -2
- package/build/src/plugins/state/types/ActionTypes.d.ts +17 -0
- package/build/src/{types/SceneType.d.ts → plugins/state/types/StateExportFileType.d.ts} +1 -1
- package/build/src/plugins/state/types/StateSceneData.d.ts +19 -0
- package/build/src/plugins/state/types/index.d.ts +1 -0
- package/build/src/plugins/systeminfo/index.d.ts +2 -0
- package/build/src/{modules/systeminfo → plugins/systeminfo/src}/SystemInfo.d.ts +22 -32
- package/build/src/plugins/toolbox/index.d.ts +4 -0
- package/build/src/{modules/toolbox → plugins/toolbox/src}/BaseTool.d.ts +4 -6
- package/build/src/{modules/toolbox → plugins/toolbox/src}/Toolbox.d.ts +8 -17
- package/build/src/{modules/toolbox → plugins/toolbox/src}/select/SelectTool.d.ts +7 -11
- package/build/src/{modules/toolbox → plugins/toolbox/src}/transform/TransformTool.d.ts +6 -10
- package/build/src/types/components/DIVELight.d.ts +4 -0
- package/build/src/types/components/DIVESceneObject.d.ts +6 -0
- package/build/src/types/components/index.d.ts +2 -0
- package/build/src/types/index.d.ts +2 -5
- package/build/src/types/schema/BaseEntitySchema.d.ts +8 -0
- package/build/src/types/schema/EntitySchema.d.ts +11 -0
- package/build/src/types/schema/EntityTypeSchema.d.ts +1 -0
- package/build/src/types/schema/GeometrySchema.d.ts +7 -0
- package/build/src/types/schema/GeometryTypeSchema.d.ts +1 -0
- package/build/src/types/schema/GroupSchema.d.ts +11 -0
- package/build/src/types/schema/LightSchema.d.ts +28 -0
- package/build/src/{modules/state/types/COMMaterial.d.ts → types/schema/MaterialSchema.d.ts} +1 -1
- package/build/src/types/schema/ModelSchema.d.ts +14 -0
- package/build/src/types/schema/PovSchema.d.ts +10 -0
- package/build/src/types/schema/PrimitiveSchema.d.ts +14 -0
- package/build/src/types/schema/index.d.ts +11 -0
- package/package.json +60 -41
- package/build/chunks/FileTypes-BjZ0rrIV.cjs +0 -1
- package/build/chunks/FileTypes-qgYnI0Jg.mjs +0 -30
- package/build/chunks/ModuleRegistry-NyNtjHb2.cjs +0 -1
- package/build/chunks/ModuleRegistry-RSub8W0G.mjs +0 -13
- package/build/chunks/PerspectiveCamera-BByyG5R4.cjs +0 -1
- package/build/chunks/PerspectiveCamera-sm4_81KJ.mjs +0 -34
- package/build/chunks/SelectTool-BRKko7uz.cjs +0 -1
- package/build/chunks/SystemInfo-oX-NNneO.cjs +0 -1
- package/build/chunks/VisibilityLayerMask-BI7jPKdx.cjs +0 -1
- package/build/chunks/VisibilityLayerMask-CXgt1fJc.mjs +0 -8
- package/build/chunks/findInterface-BEdL2iUQ.cjs +0 -1
- package/build/chunks/findInterface-OrXgmwxj.mjs +0 -18
- package/build/chunks/index-C_uFFwT2.mjs +0 -5
- package/build/chunks/index-DAwIH9xh.cjs +0 -1
- package/build/chunks/package-BFpY3sIj.cjs +0 -1
- package/build/chunks/package-BvoZkrge.mjs +0 -39
- package/build/chunks/parse-error-2f5qpXP5.cjs +0 -6
- package/build/chunks/parse-error-DRBVHL9E.mjs +0 -614
- package/build/src/error/ar-compatibility/ar-compatibility-error.d.ts +0 -12
- package/build/src/modules/ModuleRegistry.d.ts +0 -19
- package/build/src/modules/animation/AnimationSystem.cjs +0 -1
- package/build/src/modules/animation/AnimationSystem.d.ts +0 -36
- package/build/src/modules/animation/AnimationSystem.mjs +0 -95
- package/build/src/modules/ar/ARSystem.cjs +0 -1
- package/build/src/modules/ar/ARSystem.d.ts +0 -71
- package/build/src/modules/ar/ARSystem.mjs +0 -163
- package/build/src/modules/ar/arquicklook/ARQuickLook.d.ts +0 -7
- package/build/src/modules/asset/converter/AssetConverter.d.ts +0 -30
- package/build/src/modules/asset/exporter/AssetExporter.cjs +0 -164
- package/build/src/modules/asset/loader/AssetLoader.cjs +0 -2
- package/build/src/modules/asset/loader/AssetLoader.d.ts +0 -29
- package/build/src/modules/asset/loader/AssetLoader.mjs +0 -1919
- package/build/src/modules/events/EventExecutor.d.ts +0 -5
- package/build/src/modules/mediacreator/MediaCreator.cjs +0 -1
- package/build/src/modules/mediacreator/MediaCreator.d.ts +0 -44
- package/build/src/modules/state/State.cjs +0 -27
- package/build/src/modules/state/State.mjs +0 -4271
- package/build/src/modules/state/actions/object/addobject.d.ts +0 -8
- package/build/src/modules/state/types/ActionTypes.d.ts +0 -18
- package/build/src/modules/state/types/COMBaseEntity.d.ts +0 -8
- package/build/src/modules/state/types/COMEntity.d.ts +0 -6
- package/build/src/modules/state/types/COMEntityType.d.ts +0 -1
- package/build/src/modules/state/types/COMGeometry.d.ts +0 -7
- package/build/src/modules/state/types/COMGeometryType.d.ts +0 -1
- package/build/src/modules/state/types/COMGroup.d.ts +0 -10
- package/build/src/modules/state/types/COMLight.d.ts +0 -12
- package/build/src/modules/state/types/COMModel.d.ts +0 -13
- package/build/src/modules/state/types/COMPov.d.ts +0 -9
- package/build/src/modules/state/types/COMPrimitive.d.ts +0 -13
- package/build/src/modules/state/types/index.d.ts +0 -11
- package/build/src/modules/systeminfo/SystemInfo.cjs +0 -1
- package/build/src/modules/systeminfo/SystemInfo.mjs +0 -5
- package/build/src/modules/toolbox/Toolbox.cjs +0 -1
- package/build/src/types/SceneData.d.ts +0 -19
- package/build/src/types/SceneObjects.d.ts +0 -7
- package/build/src/types/UUID.d.ts +0 -1
- /package/build/{src/modules/asset/converter/AssetConverter.cjs → plugins/assetconverter/index.cjs} +0 -0
- /package/build/{src/modules/asset/converter/AssetConverter.mjs → plugins/assetconverter/index.mjs} +0 -0
- /package/build/src/{modules/animation → plugins/animation/src}/types/AnimatorParameters.d.ts +0 -0
- /package/build/src/{modules/state → plugins/state/src}/ActionRegistry.d.ts +0 -0
- /package/build/src/{modules/state → plugins/state/src}/actions/ar/index.d.ts +0 -0
- /package/build/src/{modules/state → plugins/state/src}/actions/camera/index.d.ts +0 -0
- /package/build/src/{modules/state → plugins/state/src}/actions/index.d.ts +0 -0
- /package/build/src/{modules/state → plugins/state/src}/actions/media/index.d.ts +0 -0
- /package/build/src/{modules/state → plugins/state/src}/actions/object/index.d.ts +0 -0
- /package/build/src/{modules/state → plugins/state/src}/actions/renderer/index.d.ts +0 -0
- /package/build/src/{modules/state → plugins/state/src}/actions/scene/index.d.ts +0 -0
- /package/build/src/{modules/state → plugins/state/src}/actions/toolbox/index.d.ts +0 -0
- /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,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 p=Object.defineProperty;var h=(n,e,r)=>e in n?p(n,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[e]=r;var l=(n,e,r)=>h(n,typeof e!="symbol"?e+"":e,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../systeminfo/index.cjs"),A=require("../assetconverter/index.cjs"),O=require("../../chunks/AssetLoader-BZlqXTbf.cjs"),w=require("../../chunks/AssetExporter-DsbC2rqv.cjs");var m=(n=>(n.AR_DESKTOP_PLATFORM_ERROR="ar-desktop-platform-error",n.AR_QUICK_LOOK_NOT_SAFARI_ERROR="ar-quicklook-not-safari-error",n.AR_QUICK_LOOK_VERSION_MISMATCH_ERROR="ar-quicklook-version-mismatch-error",n.AR_QUICK_LOOK_UNKNOWN_ERROR="ar-quicklook-unknown-error",n))(m||{});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 R 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-quicklook-not-safari-error")}}class S extends a{constructor(e,r){super(`ARQuickLook requires iOS version ${r} or later. Current version: ${e}.`,"ar-quicklook-version-mismatch-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 _{constructor(){l(this,"converter",new A.AssetConverter(new O.AssetLoader,new w.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 S(t.full,k));if(!t)return Promise.reject(new u);if(!c.SystemInfo.getSupportsARQuickLook())return Promise.reject(new u);const o=await this.convertToUSDZ(e,r);return this.launchARQuickLook(o,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"}}}),o=new Blob([t],{type:"model/vnd.usdz+zip"});return URL.createObjectURL(o)}launchARQuickLook(e,r){return new Promise(t=>{(r==null?void 0:r.arScale)==="fixed"&&(e=e.concat("#allowsContentScaling=0"));const o=document.createElement("a");o.innerHTML="<picture></picture>",o.rel="ar",o.href=e,o.download="scene.usdz",t(),o.click()})}}class f{launch(e,r){const t=self.location.toString(),o=document.createElement("a"),s=this._createParams(t,e,r),i=this._createIntent(t,e,s);o.setAttribute("href",i),o.click()}_createParams(e,r,t){const o=new URL(r,e),s=new URLSearchParams(o.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 o=new URL(e),s=new URL(r,e),i="#model-viewer-no-ar-fallback";return o.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(o.toString())};end;`}}class L{async launch(e,r){const t=c.SystemInfo.getSystem();return t===c.ESystem.IOS?new _().launch(e,r):t===c.ESystem.ANDROID?new f().launch(e,r):Promise.reject(new R)}}exports.ARDesktopPlatformError=R;exports.ARError=a;exports.ARQuickLook=_;exports.ARQuickLookNotSafariError=d;exports.ARQuickLookUnknownError=u;exports.ARQuickLookVersionMismatchError=S;exports.ARSystem=L;exports.EARErrorType=m;exports.SceneViewer=f;
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
var R = Object.defineProperty;
|
|
2
|
+
var d = (n, e, r) => e in n ? R(n, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : n[e] = r;
|
|
3
|
+
var l = (n, e, r) => d(n, typeof e != "symbol" ? e + "" : e, r);
|
|
4
|
+
import { SystemInfo as c, EBrowser as p, ESystem as u } from "../systeminfo/index.mjs";
|
|
5
|
+
import { AssetConverter as h } from "../assetconverter/index.mjs";
|
|
6
|
+
import { A as _ } from "../../chunks/AssetLoader-Dnh5tbUZ.mjs";
|
|
7
|
+
import { A as f } from "../../chunks/AssetExporter-brT7ogoM.mjs";
|
|
8
|
+
var S = /* @__PURE__ */ ((n) => (n.AR_DESKTOP_PLATFORM_ERROR = "ar-desktop-platform-error", n.AR_QUICK_LOOK_NOT_SAFARI_ERROR = "ar-quicklook-not-safari-error", n.AR_QUICK_LOOK_VERSION_MISMATCH_ERROR = "ar-quicklook-version-mismatch-error", n.AR_QUICK_LOOK_UNKNOWN_ERROR = "ar-quicklook-unknown-error", n))(S || {});
|
|
9
|
+
class s extends Error {
|
|
10
|
+
constructor(r, t) {
|
|
11
|
+
super(r);
|
|
12
|
+
l(this, "type");
|
|
13
|
+
this.name = this.constructor.name, this.type = t, Object.setPrototypeOf(this, new.target.prototype);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
class O extends s {
|
|
17
|
+
constructor() {
|
|
18
|
+
super(
|
|
19
|
+
"AR features are not supported on desktop platforms.",
|
|
20
|
+
"ar-desktop-platform-error"
|
|
21
|
+
/* AR_DESKTOP_PLATFORM_ERROR */
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
class w extends s {
|
|
26
|
+
constructor() {
|
|
27
|
+
super(
|
|
28
|
+
"ARQuickLook on iOS is only available in Safari.",
|
|
29
|
+
"ar-quicklook-not-safari-error"
|
|
30
|
+
/* AR_QUICK_LOOK_NOT_SAFARI_ERROR */
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
class A extends s {
|
|
35
|
+
constructor(e, r) {
|
|
36
|
+
super(
|
|
37
|
+
`ARQuickLook requires iOS version ${r} or later. Current version: ${e}.`,
|
|
38
|
+
"ar-quicklook-version-mismatch-error"
|
|
39
|
+
/* AR_QUICK_LOOK_VERSION_MISMATCH_ERROR */
|
|
40
|
+
), this.currentVersion = e, this.requiredVersion = r;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
class k extends s {
|
|
44
|
+
constructor() {
|
|
45
|
+
super(
|
|
46
|
+
"An unknown ARQuickLook compatibility error occurred.",
|
|
47
|
+
"ar-quicklook-unknown-error"
|
|
48
|
+
/* AR_QUICK_LOOK_UNKNOWN_ERROR */
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
const m = 12;
|
|
53
|
+
class L {
|
|
54
|
+
constructor() {
|
|
55
|
+
l(this, "converter", new h(
|
|
56
|
+
new _(),
|
|
57
|
+
new f()
|
|
58
|
+
));
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Launches AR using ARQuickLook (iOS-specific implementation)
|
|
62
|
+
*
|
|
63
|
+
* @param uri - The URI of the 3D model to display in AR
|
|
64
|
+
* @param options - Optional configuration for the AR experience
|
|
65
|
+
* @returns Promise that resolves when ARQuickLook is launched successfully
|
|
66
|
+
* @throws Error if ARQuickLook is not supported on the device
|
|
67
|
+
*/
|
|
68
|
+
async launch(e, r) {
|
|
69
|
+
if (c.getBrowser() !== p.SAFARI)
|
|
70
|
+
return Promise.reject(new w());
|
|
71
|
+
const t = c.getIOSVersion();
|
|
72
|
+
if (t && t.major < m)
|
|
73
|
+
return Promise.reject(
|
|
74
|
+
new A(
|
|
75
|
+
t.full,
|
|
76
|
+
m
|
|
77
|
+
)
|
|
78
|
+
);
|
|
79
|
+
if (!t)
|
|
80
|
+
return Promise.reject(new k());
|
|
81
|
+
if (!c.getSupportsARQuickLook())
|
|
82
|
+
return Promise.reject(new k());
|
|
83
|
+
const o = await this.convertToUSDZ(e, r);
|
|
84
|
+
return this.launchARQuickLook(o, r);
|
|
85
|
+
}
|
|
86
|
+
async convertToUSDZ(e, r) {
|
|
87
|
+
const t = await this.converter.convert(e).to("usdz", {
|
|
88
|
+
quickLookCompatible: !0,
|
|
89
|
+
ar: {
|
|
90
|
+
anchoring: { type: "plane" },
|
|
91
|
+
planeAnchoring: {
|
|
92
|
+
alignment: (r == null ? void 0 : r.arPlacement) === "vertical" ? "vertical" : "horizontal"
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}), o = new Blob([t], { type: "model/vnd.usdz+zip" });
|
|
96
|
+
return URL.createObjectURL(o);
|
|
97
|
+
}
|
|
98
|
+
launchARQuickLook(e, r) {
|
|
99
|
+
return new Promise((t) => {
|
|
100
|
+
(r == null ? void 0 : r.arScale) === "fixed" && (e = e.concat("#allowsContentScaling=0"));
|
|
101
|
+
const o = document.createElement("a");
|
|
102
|
+
o.innerHTML = "<picture></picture>", o.rel = "ar", o.href = e, o.download = "scene.usdz", t(), o.click();
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
class g {
|
|
107
|
+
/**
|
|
108
|
+
* Launches AR using SceneViewer (Android-specific implementation)
|
|
109
|
+
* Note: SceneViewer is supported on all Android devices. If ARCore is not installed,
|
|
110
|
+
* the model will be displayed in 3D view mode instead of AR mode.
|
|
111
|
+
*
|
|
112
|
+
* @param uri - The URI of the 3D model to display in AR
|
|
113
|
+
* @param options - Optional configuration for the AR experience
|
|
114
|
+
* @returns Promise that resolves when SceneViewer is launched successfully
|
|
115
|
+
* @throws Error if there's an issue launching SceneViewer
|
|
116
|
+
*/
|
|
117
|
+
launch(e, r) {
|
|
118
|
+
const t = self.location.toString(), o = document.createElement("a"), a = this._createParams(t, e, r), i = this._createIntent(t, e, a);
|
|
119
|
+
o.setAttribute("href", i), o.click();
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Creates the base URL parameters for SceneViewer
|
|
123
|
+
* @param location Current page location URL
|
|
124
|
+
* @returns URLSearchParams with base configuration
|
|
125
|
+
*/
|
|
126
|
+
_createParams(e, r, t) {
|
|
127
|
+
const o = new URL(r, e), a = new URLSearchParams(o.search);
|
|
128
|
+
return a.set("mode", "ar_preferred"), this._applyScaleOption(a, t), this._applyPlacementOption(a, t), this._applySoundOption(a, e), this._applyLinkOption(a, e), a;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Applies the scale option to the parameters
|
|
132
|
+
* If scale is set to 'fixed', the model will not be resizable in AR
|
|
133
|
+
* @param params URLSearchParams to modify
|
|
134
|
+
*/
|
|
135
|
+
_applyScaleOption(e, r) {
|
|
136
|
+
(r == null ? void 0 : r.arScale) === "fixed" && e.set("resizable", "false");
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Applies the placement option to the parameters
|
|
140
|
+
* If placement is set to 'vertical', vertical placement will be enabled
|
|
141
|
+
* @param params URLSearchParams to modify
|
|
142
|
+
*/
|
|
143
|
+
_applyPlacementOption(e, r) {
|
|
144
|
+
(r == null ? void 0 : r.arPlacement) === "vertical" && e.set("enable_vertical_placement", "true");
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Applies the sound option to the parameters if present
|
|
148
|
+
* This will resolve any relative sound URLs to absolute URLs
|
|
149
|
+
* @param params URLSearchParams to modify
|
|
150
|
+
* @param location Current page location URL
|
|
151
|
+
*/
|
|
152
|
+
_applySoundOption(e, r) {
|
|
153
|
+
if (e.has("sound")) {
|
|
154
|
+
const t = new URL(e.get("sound"), r);
|
|
155
|
+
e.set("sound", t.toString());
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Applies the link option to the parameters if present
|
|
160
|
+
* This will resolve any relative link URLs to absolute URLs
|
|
161
|
+
* @param params URLSearchParams to modify
|
|
162
|
+
* @param location Current page location URL
|
|
163
|
+
*/
|
|
164
|
+
_applyLinkOption(e, r) {
|
|
165
|
+
if (e.has("link")) {
|
|
166
|
+
const t = new URL(e.get("link"), r);
|
|
167
|
+
e.set("link", t.toString());
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Creates the Android Intent URL for SceneViewer
|
|
172
|
+
* @param params URLSearchParams containing all configuration
|
|
173
|
+
* @param location Current page location URL
|
|
174
|
+
* @returns The complete Intent URL
|
|
175
|
+
*/
|
|
176
|
+
_createIntent(e, r, t) {
|
|
177
|
+
const o = new URL(e), a = new URL(r, e), i = "#model-viewer-no-ar-fallback";
|
|
178
|
+
return o.hash = i, `intent://arvr.google.com/scene-viewer/1.2?${t.toString() + "&file=" + a.toString()}#Intent;scheme=https;package=com.google.android.googlequicksearchbox;action=android.intent.action.VIEW;S.browser_fallback_url=${encodeURIComponent(
|
|
179
|
+
o.toString()
|
|
180
|
+
)};end;`;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
class b {
|
|
184
|
+
/**
|
|
185
|
+
* Launches an AR experience using the appropriate platform-specific implementation
|
|
186
|
+
*
|
|
187
|
+
* @param uri - The URI of the 3D model to display in AR
|
|
188
|
+
* @param options - Optional configuration for the AR experience
|
|
189
|
+
* @returns Promise that resolves when AR is launched successfully
|
|
190
|
+
* @throws Error if AR is not supported on the current platform
|
|
191
|
+
*/
|
|
192
|
+
async launch(e, r) {
|
|
193
|
+
const t = c.getSystem();
|
|
194
|
+
return t === u.IOS ? new L().launch(e, r) : t === u.ANDROID ? new g().launch(e, r) : Promise.reject(new O());
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
export {
|
|
198
|
+
O as ARDesktopPlatformError,
|
|
199
|
+
s as ARError,
|
|
200
|
+
L as ARQuickLook,
|
|
201
|
+
w as ARQuickLookNotSafariError,
|
|
202
|
+
k as ARQuickLookUnknownError,
|
|
203
|
+
A as ARQuickLookVersionMismatchError,
|
|
204
|
+
b as ARSystem,
|
|
205
|
+
S as EARErrorType,
|
|
206
|
+
g as SceneViewer
|
|
207
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../chunks/AssetCache-C-7MpNrK.cjs");exports.AssetCache=e.AssetCache;exports.Chunk=e.Chunk;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../chunks/AssetExporter-DsbC2rqv.cjs");exports.AssetExporter=e.AssetExporter;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../chunks/AssetLoader-BZlqXTbf.cjs");exports.AssetLoader=e.AssetLoader;exports.DRACOWorker=e.DRACOWorker;exports.DracoLoader=e.DracoLoader;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../chunks/FileTypes-PEcAgRZ8.cjs");exports.DIVEAxisCamera=e.DIVEAxisCamera;
|
|
@@ -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;
|
|
@@ -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 {
|
|
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");
|
|
@@ -9,13 +9,13 @@ class m {
|
|
|
9
9
|
n(this, "_controller");
|
|
10
10
|
this._renderer = e, this._scene = r, this._controller = o;
|
|
11
11
|
}
|
|
12
|
-
|
|
12
|
+
generateMedia(e, r, o, s) {
|
|
13
13
|
const c = this._controller.object.position.clone(), l = this._controller.object.quaternion.clone();
|
|
14
14
|
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();
|
|
15
|
-
const _ = this.
|
|
15
|
+
const _ = this.drawCanvas().toDataURL();
|
|
16
16
|
return this._controller.object.position.copy(c), this._controller.object.quaternion.copy(l), _;
|
|
17
17
|
}
|
|
18
|
-
|
|
18
|
+
drawCanvas(e) {
|
|
19
19
|
const r = this._renderer.webglrenderer.domElement;
|
|
20
20
|
e && (this._renderer.webglrenderer.domElement = e), this._controller.object.layers.mask = i.LIVE_VIEW_LAYER_MASK, this._renderer.webglrenderer.render(
|
|
21
21
|
this._scene,
|
|
@@ -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;
|