@shopware-ag/dive 1.19.1-beta.8 → 2.0.1-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/chunks/FileTypes-BjZ0rrIV.cjs +1 -0
- package/build/chunks/FileTypes-qgYnI0Jg.mjs +30 -0
- package/build/chunks/ModuleRegistry-NyNtjHb2.cjs +1 -0
- package/build/chunks/ModuleRegistry-RSub8W0G.mjs +13 -0
- package/build/chunks/PerspectiveCamera-BByyG5R4.cjs +1 -0
- package/build/chunks/PerspectiveCamera-sm4_81KJ.mjs +34 -0
- package/build/chunks/SelectTool-BRKko7uz.cjs +1 -0
- package/build/chunks/SelectTool-mTRiZYaC.mjs +712 -0
- package/build/chunks/SystemInfo-DPAQG-S5.mjs +139 -0
- package/build/chunks/SystemInfo-oX-NNneO.cjs +1 -0
- package/build/chunks/VisibilityLayerMask-BI7jPKdx.cjs +1 -0
- package/build/chunks/VisibilityLayerMask-CXgt1fJc.mjs +8 -0
- package/build/chunks/findInterface-BEdL2iUQ.cjs +1 -0
- package/build/chunks/findInterface-OrXgmwxj.mjs +18 -0
- package/build/chunks/index-C_uFFwT2.mjs +5 -0
- package/build/chunks/index-DAwIH9xh.cjs +1 -0
- package/build/chunks/package-BFpY3sIj.cjs +1 -0
- package/build/chunks/package-BvoZkrge.mjs +39 -0
- package/build/chunks/parse-error-2f5qpXP5.cjs +6 -0
- package/build/chunks/parse-error-DRBVHL9E.mjs +614 -0
- package/build/dive.cjs +30 -0
- package/build/dive.d.ts +2 -0
- package/build/dive.mjs +1757 -0
- package/build/src/{primitive → components}/floor/Floor.d.ts +1 -1
- package/build/src/{gizmo → components/gizmo}/Gizmo.d.ts +4 -4
- package/build/src/{gizmo → components/gizmo}/handles/AxisHandle.d.ts +4 -4
- package/build/src/{gizmo → components/gizmo}/handles/RadialHandle.d.ts +4 -4
- package/build/src/{gizmo → components/gizmo}/handles/ScaleHandle.d.ts +4 -4
- package/build/src/{gizmo → components/gizmo}/plane/GizmoPlane.d.ts +1 -1
- package/build/src/{gizmo → components/gizmo}/rotate/RotateGizmo.d.ts +4 -4
- package/build/src/{gizmo → components/gizmo}/scale/ScaleGizmo.d.ts +5 -5
- package/build/src/{gizmo → components/gizmo}/translate/TranslateGizmo.d.ts +4 -4
- package/build/src/{group → components/group}/Group.d.ts +8 -3
- package/build/src/components/index.d.ts +9 -0
- package/build/src/{light → components/light}/AmbientLight.d.ts +1 -1
- package/build/src/{light → components/light}/PointLight.d.ts +4 -4
- package/build/src/{light → components/light}/SceneLight.d.ts +1 -1
- package/build/src/components/light/index.d.ts +3 -0
- package/build/src/{model → components/model}/Model.d.ts +2 -2
- package/build/src/{node → components/node}/Node.d.ts +4 -4
- package/build/src/{primitive → components/primitive}/Primitive.d.ts +2 -2
- package/build/src/{engine/scene → components}/root/Root.d.ts +6 -2
- package/build/src/constants/index.d.ts +3 -0
- package/build/src/core/Dive.d.ts +57 -0
- package/build/src/core/index.d.ts +1 -0
- package/build/src/engine/Engine.d.ts +19 -19
- package/build/src/engine/camera/PerspectiveCamera.d.ts +6 -3
- package/build/src/engine/clock/Clock.d.ts +19 -0
- package/build/src/engine/renderer/Renderer.d.ts +29 -57
- package/build/src/engine/resize/ResizeManager.d.ts +11 -0
- package/build/src/engine/scene/Scene.d.ts +6 -15
- package/build/src/engine/scene/xrroot/XRRoot.d.ts +5 -5
- package/build/src/engine/scene/xrroot/xrlightroot/XRLightRoot.d.ts +3 -3
- package/build/src/{helper → helpers}/findSceneRecursive/findSceneRecursive.d.ts +1 -1
- package/build/src/helpers/index.d.ts +8 -0
- package/build/src/{helper → helpers}/isFileTypeSupported/isFileTypeSupported.d.ts +1 -1
- package/build/src/index.d.ts +8 -2
- package/build/src/{interface → interfaces}/Draggable.d.ts +1 -1
- package/build/src/interfaces/index.d.ts +6 -0
- package/build/src/modules/ModuleRegistry.d.ts +19 -0
- package/build/src/modules/animation/AnimationSystem.cjs +1 -0
- package/build/src/modules/animation/AnimationSystem.d.ts +36 -0
- package/build/src/modules/animation/AnimationSystem.mjs +95 -0
- package/build/src/modules/animation/animator/Animator.d.ts +26 -0
- package/build/src/modules/animation/types/AnimatorParameters.d.ts +7 -0
- package/build/src/modules/ar/ARSystem.cjs +1 -2
- package/build/src/modules/ar/ARSystem.d.ts +1 -2
- package/build/src/modules/ar/ARSystem.mjs +2 -3
- package/build/src/modules/ar/arquicklook/ARQuickLook.d.ts +1 -1
- package/build/src/modules/ar/sceneviewer/SceneViewer.d.ts +1 -1
- package/build/src/modules/ar/webxr/WebXR.d.ts +3 -4
- package/build/src/modules/ar/webxr/controller/WebXRController.d.ts +3 -3
- package/build/src/modules/ar/webxr/origin/WebXROrigin.d.ts +2 -2
- package/build/src/modules/ar/webxr/raycaster/WebXRRaycaster.d.ts +4 -4
- package/build/src/modules/ar/webxr/raycaster/ar/WebXRRaycasterAR.d.ts +3 -3
- package/build/src/modules/ar/webxr/raycaster/three/WebXRRaycasterTHREE.d.ts +4 -4
- package/build/src/modules/ar/webxr/touchscreencontrols/WebXRTouchscreenControls.d.ts +1 -1
- package/build/src/modules/asset/converter/AssetConverter.cjs +0 -1
- package/build/src/modules/asset/converter/AssetConverter.d.ts +4 -5
- package/build/src/modules/asset/converter/AssetConverter.mjs +0 -1
- package/build/src/modules/asset/exporter/AssetExporter.cjs +24 -25
- package/build/src/modules/asset/exporter/AssetExporter.d.ts +15 -3
- package/build/src/modules/asset/exporter/AssetExporter.mjs +3 -5
- package/build/src/modules/asset/loader/AssetLoader.cjs +2 -3
- package/build/src/modules/asset/loader/AssetLoader.d.ts +1 -3
- package/build/src/modules/asset/loader/AssetLoader.mjs +96 -101
- package/build/src/modules/axiscamera/AxisCamera.d.ts +21 -0
- package/build/src/modules/controller/orbit/OrbitController.d.ts +30 -0
- package/build/src/modules/mediacreator/MediaCreator.cjs +1 -2
- package/build/src/modules/mediacreator/MediaCreator.d.ts +5 -6
- package/build/src/modules/mediacreator/MediaCreator.mjs +13 -11
- package/build/src/modules/state/ActionRegistry.d.ts +26 -0
- package/build/src/modules/state/State.cjs +27 -0
- package/build/src/modules/state/State.d.ts +58 -0
- package/build/src/modules/state/State.mjs +4271 -0
- package/build/src/modules/state/actions/action.d.ts +36 -0
- package/build/src/modules/state/actions/ar/index.d.ts +1 -0
- package/build/src/modules/state/actions/ar/launchar.d.ts +15 -0
- package/build/src/modules/state/actions/camera/computeencompassingview.d.ts +12 -0
- package/build/src/modules/state/actions/camera/getcameratransform.d.ts +12 -0
- package/build/src/modules/state/actions/camera/index.d.ts +6 -0
- package/build/src/modules/state/actions/camera/lockcamera.d.ts +8 -0
- package/build/src/modules/state/actions/camera/movecamera.d.ts +29 -0
- package/build/src/modules/state/actions/camera/setcameralayer.d.ts +12 -0
- package/build/src/modules/state/actions/camera/setcameratransform.d.ts +15 -0
- package/build/src/modules/state/actions/camera/zoomcamera.d.ts +14 -0
- package/build/src/modules/state/actions/index.d.ts +7 -0
- package/build/src/modules/state/actions/media/generatemedia.d.ts +25 -0
- package/build/src/modules/state/actions/media/index.d.ts +1 -0
- package/build/src/modules/state/actions/object/addobject.d.ts +8 -0
- package/build/src/modules/state/actions/object/deleteobject.d.ts +12 -0
- package/build/src/modules/state/actions/object/deselectobject.d.ts +12 -0
- package/build/src/modules/state/actions/object/dropit.d.ts +12 -0
- package/build/src/modules/state/actions/object/getallobjects.d.ts +8 -0
- package/build/src/modules/state/actions/object/getobjects.d.ts +12 -0
- package/build/src/modules/state/actions/object/index.d.ts +11 -0
- package/build/src/modules/state/actions/object/modelloaded.d.ts +12 -0
- package/build/src/modules/state/actions/object/placeonfloor.d.ts +12 -0
- package/build/src/modules/state/actions/object/selectobject.d.ts +12 -0
- package/build/src/modules/state/actions/object/setparent.d.ts +22 -0
- package/build/src/modules/state/actions/object/updateobject.d.ts +12 -0
- package/build/src/modules/state/actions/renderer/index.d.ts +1 -0
- package/build/src/modules/state/actions/renderer/startrender.d.ts +8 -0
- package/build/src/modules/state/actions/scene/exportscene.d.ts +13 -0
- package/build/src/modules/state/actions/scene/getallscenedata.d.ts +9 -0
- package/build/src/modules/state/actions/scene/index.d.ts +4 -0
- package/build/src/modules/state/actions/scene/setbackground.d.ts +12 -0
- package/build/src/modules/state/actions/scene/updatescene.d.ts +20 -0
- package/build/src/modules/state/actions/toolbox/index.d.ts +4 -0
- package/build/src/modules/state/actions/toolbox/setgizmomode.d.ts +12 -0
- package/build/src/modules/state/actions/toolbox/setgizmoscalelinked.d.ts +8 -0
- package/build/src/modules/state/actions/toolbox/setgizmovisible.d.ts +8 -0
- package/build/src/modules/state/actions/toolbox/usetool.d.ts +13 -0
- package/build/src/modules/state/types/ActionTypes.d.ts +18 -0
- package/build/src/{com → modules/state}/types/COMBaseEntity.d.ts +1 -1
- package/build/src/modules/state/types/COMEntity.d.ts +6 -0
- package/build/src/{com → modules/state}/types/COMGeometry.d.ts +1 -1
- package/build/src/{com → modules/state}/types/COMGroup.d.ts +3 -1
- package/build/src/{com → modules/state}/types/COMLight.d.ts +3 -1
- package/build/src/{com → modules/state}/types/COMModel.d.ts +4 -2
- package/build/src/modules/state/types/COMPov.d.ts +9 -0
- package/build/src/modules/state/types/COMPrimitive.d.ts +13 -0
- package/build/src/modules/state/types/index.d.ts +11 -0
- package/build/src/modules/systeminfo/SystemInfo.cjs +1 -2
- package/build/src/modules/systeminfo/SystemInfo.d.ts +6 -9
- package/build/src/modules/systeminfo/SystemInfo.mjs +3 -113
- package/build/src/{toolbox → modules/toolbox}/BaseTool.d.ts +6 -6
- package/build/src/modules/toolbox/Toolbox.cjs +1 -0
- package/build/src/{toolbox → modules/toolbox}/Toolbox.d.ts +10 -6
- package/build/src/modules/toolbox/Toolbox.mjs +99 -0
- package/build/src/{toolbox → modules/toolbox}/select/SelectTool.d.ts +5 -5
- package/build/src/{toolbox → modules/toolbox}/transform/TransformTool.d.ts +6 -6
- package/build/src/types/SceneData.d.ts +1 -1
- package/build/src/types/SceneObjects.d.ts +6 -6
- package/build/src/types/SceneType.d.ts +1 -1
- package/build/src/types/UUID.d.ts +1 -0
- package/build/src/types/file/index.d.ts +1 -1
- package/build/src/types/index.d.ts +6 -6
- package/package.json +67 -26
- package/build/chunks/PerspectiveCamera-ACx6umAu.mjs +0 -38
- package/build/chunks/PerspectiveCamera-ACx6umAu.mjs.map +0 -1
- package/build/chunks/PerspectiveCamera-BXPNOM71.cjs +0 -2
- package/build/chunks/PerspectiveCamera-BXPNOM71.cjs.map +0 -1
- package/build/chunks/fflate.module-DHdJvhNh.cjs +0 -7
- package/build/chunks/fflate.module-DHdJvhNh.cjs.map +0 -1
- package/build/chunks/fflate.module-DkZg07PZ.mjs +0 -603
- package/build/chunks/fflate.module-DkZg07PZ.mjs.map +0 -1
- package/build/chunks/file-type-error-D6aWGgyc.mjs +0 -15
- package/build/chunks/file-type-error-D6aWGgyc.mjs.map +0 -1
- package/build/chunks/file-type-error-DtvBgs64.cjs +0 -2
- package/build/chunks/file-type-error-DtvBgs64.cjs.map +0 -1
- package/build/chunks/index-C7Wx_9uY.mjs +0 -34
- package/build/chunks/index-C7Wx_9uY.mjs.map +0 -1
- package/build/chunks/index-MNP0K5dt.cjs +0 -2
- package/build/chunks/index-MNP0K5dt.cjs.map +0 -1
- package/build/chunks/network-error-C2ZDC8qS.cjs +0 -2
- package/build/chunks/network-error-C2ZDC8qS.cjs.map +0 -1
- package/build/chunks/network-error-DgecatEk.mjs +0 -27
- package/build/chunks/network-error-DgecatEk.mjs.map +0 -1
- package/build/index.cjs +0 -57
- package/build/index.cjs.map +0 -1
- package/build/index.d.ts +0 -6
- package/build/index.mjs +0 -6809
- package/build/index.mjs.map +0 -1
- package/build/src/animation/AnimationSystem.d.ts +0 -16
- package/build/src/axiscamera/AxisCamera.d.ts +0 -18
- package/build/src/com/Communication.d.ts +0 -74
- package/build/src/com/actions/camera/computeencompassingview.d.ts +0 -9
- package/build/src/com/actions/camera/getcameratransform.d.ts +0 -9
- package/build/src/com/actions/camera/movecamera.d.ts +0 -15
- package/build/src/com/actions/camera/resetcamera.d.ts +0 -7
- package/build/src/com/actions/camera/setcameralayer.d.ts +0 -7
- package/build/src/com/actions/camera/setcameratransform.d.ts +0 -9
- package/build/src/com/actions/camera/zoomcamera.d.ts +0 -8
- package/build/src/com/actions/index.d.ts +0 -60
- package/build/src/com/actions/media/generatemedia.d.ts +0 -14
- package/build/src/com/actions/object/addobject.d.ts +0 -6
- package/build/src/com/actions/object/deleteobject.d.ts +0 -8
- package/build/src/com/actions/object/deselectobject.d.ts +0 -8
- package/build/src/com/actions/object/getallobjects.d.ts +0 -6
- package/build/src/com/actions/object/getobjects.d.ts +0 -8
- package/build/src/com/actions/object/model/dropit.d.ts +0 -7
- package/build/src/com/actions/object/model/modelloaded.d.ts +0 -7
- package/build/src/com/actions/object/model/placeonfloor.d.ts +0 -7
- package/build/src/com/actions/object/selectobject.d.ts +0 -8
- package/build/src/com/actions/object/setparent.d.ts +0 -13
- package/build/src/com/actions/object/updateobject.d.ts +0 -8
- package/build/src/com/actions/renderer/startrender.d.ts +0 -5
- package/build/src/com/actions/scene/exportscene.d.ts +0 -8
- package/build/src/com/actions/scene/getallscenedata.d.ts +0 -6
- package/build/src/com/actions/scene/launchar.d.ts +0 -9
- package/build/src/com/actions/scene/setbackground.d.ts +0 -7
- package/build/src/com/actions/scene/updatescene.d.ts +0 -11
- package/build/src/com/actions/toolbox/select/setgizmomode.d.ts +0 -7
- package/build/src/com/actions/toolbox/transform/setgizmoscalelinked.d.ts +0 -5
- package/build/src/com/actions/toolbox/transform/setgizmovisible.d.ts +0 -5
- package/build/src/com/actions/toolbox/usetool.d.ts +0 -8
- package/build/src/com/types/COMEntity.d.ts +0 -6
- package/build/src/com/types/COMPov.d.ts +0 -7
- package/build/src/com/types/COMPrimitive.d.ts +0 -11
- package/build/src/com/types/index.d.ts +0 -11
- package/build/src/controls/OrbitControls.d.ts +0 -38
- package/build/src/dive.d.ts +0 -49
- package/build/src/error/index.d.ts +0 -4
- package/build/src/helper/index.d.ts +0 -7
- package/build/src/modules/_system/ModuleImporter.d.ts +0 -21
- package/build/src/modules/_system/ModuleRegistry.d.ts +0 -72
- package/build/src/modules/ar/ARSystem.cjs.map +0 -1
- package/build/src/modules/ar/ARSystem.mjs.map +0 -1
- package/build/src/modules/asset/converter/AssetConverter.cjs.map +0 -1
- package/build/src/modules/asset/converter/AssetConverter.mjs.map +0 -1
- package/build/src/modules/asset/exporter/AssetExporter.cjs.map +0 -1
- package/build/src/modules/asset/exporter/AssetExporter.mjs.map +0 -1
- package/build/src/modules/asset/loader/AssetLoader.cjs.map +0 -1
- package/build/src/modules/asset/loader/AssetLoader.mjs.map +0 -1
- package/build/src/modules/index.cjs +0 -2
- package/build/src/modules/index.cjs.map +0 -1
- package/build/src/modules/index.d.ts +0 -10
- package/build/src/modules/index.mjs +0 -109
- package/build/src/modules/index.mjs.map +0 -1
- package/build/src/modules/mediacreator/MediaCreator.cjs.map +0 -1
- package/build/src/modules/mediacreator/MediaCreator.mjs.map +0 -1
- package/build/src/modules/systeminfo/SystemInfo.cjs.map +0 -1
- package/build/src/modules/systeminfo/SystemInfo.mjs.map +0 -1
- /package/build/src/{grid → components/grid}/Grid.d.ts +0 -0
- /package/build/src/{constant → constants}/AxisHelperColors.d.ts +0 -0
- /package/build/src/{constant → constants}/GridColors.d.ts +0 -0
- /package/build/src/{constant → constants}/VisibilityLayerMask.d.ts +0 -0
- /package/build/src/{helper → helpers}/applyMixins/applyMixins.d.ts +0 -0
- /package/build/src/{helper → helpers}/findInterface/findInterface.d.ts +0 -0
- /package/build/src/{helper → helpers}/getFileTypeFromUri/getFileTypeFromUri.d.ts +0 -0
- /package/build/src/{helper → helpers}/getObjectDelta/getObjectDelta.d.ts +0 -0
- /package/build/src/{helper/isInterface → helpers/implementsInterface}/implementsInterface.d.ts +0 -0
- /package/build/src/{math → helpers/math}/ceil/ceilExp.d.ts +0 -0
- /package/build/src/{math → helpers/math}/degToRad/degToRad.d.ts +0 -0
- /package/build/src/{math → helpers/math}/floor/floorExp.d.ts +0 -0
- /package/build/src/{math → helpers/math}/helper/shift.d.ts +0 -0
- /package/build/src/{math → helpers/math}/index.d.ts +0 -0
- /package/build/src/{math → helpers/math}/radToDeg/radToDeg.d.ts +0 -0
- /package/build/src/{math → helpers/math}/round/roundExp.d.ts +0 -0
- /package/build/src/{math → helpers/math}/signedAngleTo/signedAngleTo.d.ts +0 -0
- /package/build/src/{math → helpers/math}/toFixed/toFixedExp.d.ts +0 -0
- /package/build/src/{math → helpers/math}/truncate/truncateExp.d.ts +0 -0
- /package/build/src/{interface → interfaces}/Hoverable.d.ts +0 -0
- /package/build/src/{interface → interfaces}/Movable.d.ts +0 -0
- /package/build/src/{interface → interfaces}/Rotatable.d.ts +0 -0
- /package/build/src/{interface → interfaces}/Scalable.d.ts +0 -0
- /package/build/src/{interface → interfaces}/Selectable.d.ts +0 -0
- /package/build/src/{events → modules/events}/EventExecutor.d.ts +0 -0
- /package/build/src/{com → modules/state}/types/COMEntityType.d.ts +0 -0
- /package/build/src/{com → modules/state}/types/COMGeometryType.d.ts +0 -0
- /package/build/src/{com → modules/state}/types/COMMaterial.d.ts +0 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './getFileTypeFromUri/getFileTypeFromUri.ts';
|
|
2
|
+
export * from './isFileTypeSupported/isFileTypeSupported.ts';
|
|
3
|
+
export * from './findSceneRecursive/findSceneRecursive.ts';
|
|
4
|
+
export * from './getObjectDelta/getObjectDelta.ts';
|
|
5
|
+
export * from './implementsInterface/implementsInterface.ts';
|
|
6
|
+
export * from './findInterface/findInterface.ts';
|
|
7
|
+
export * from './applyMixins/applyMixins.ts';
|
|
8
|
+
export * from './math/index.ts';
|
package/build/src/index.d.ts
CHANGED
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
export
|
|
2
|
-
export * from './
|
|
1
|
+
export * from './core/index.ts';
|
|
2
|
+
export * from './helpers/index.ts';
|
|
3
|
+
export type { ARCompatibilityError } from './error/ar-compatibility/ar-compatibility-error.ts';
|
|
4
|
+
export type { FileTypeError } from './error/file-type/file-type-error.ts';
|
|
5
|
+
export type { NetworkError } from './error/network/network-error.ts';
|
|
6
|
+
export type { ParseError } from './error/parse/parse-error.ts';
|
|
7
|
+
export * from './types/index.ts';
|
|
8
|
+
export * from './modules/ModuleRegistry.ts';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Central export point for the module system.
|
|
3
|
+
* This is the only place where ModuleRegistry should be imported from.
|
|
4
|
+
*/
|
|
5
|
+
declare const ModuleRegistry: {
|
|
6
|
+
readonly AnimationSystem: () => Promise<typeof import('./animation/AnimationSystem.ts').AnimationSystem>;
|
|
7
|
+
readonly ARSystem: () => Promise<typeof import('./ar/ARSystem.ts').ARSystem>;
|
|
8
|
+
readonly AssetConverter: () => Promise<typeof import('./asset/converter/AssetConverter.ts').AssetConverter>;
|
|
9
|
+
readonly AssetExporter: () => Promise<typeof import('./asset/exporter/AssetExporter.ts').AssetExporter>;
|
|
10
|
+
readonly AssetLoader: () => Promise<typeof import('./asset/loader/AssetLoader.ts').AssetLoader>;
|
|
11
|
+
readonly MediaCreator: () => Promise<typeof import('./mediacreator/MediaCreator.ts').MediaCreator>;
|
|
12
|
+
readonly State: () => Promise<typeof import('./state/State.ts').State>;
|
|
13
|
+
readonly Toolbox: () => Promise<typeof import('./toolbox/Toolbox.ts').Toolbox>;
|
|
14
|
+
};
|
|
15
|
+
type ModuleRegistry = typeof ModuleRegistry;
|
|
16
|
+
type ModuleName = keyof ModuleRegistry;
|
|
17
|
+
type ModuleType<T extends keyof ModuleRegistry> = ReturnType<ModuleRegistry[T]> extends Promise<infer U> ? U : never;
|
|
18
|
+
export declare const getModule: <T extends ModuleName>(moduleName: T) => Promise<ModuleType<T>>;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var h=Object.defineProperty;var u=(n,e,t)=>e in n?h(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var i=(n,e,t)=>u(n,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("@tweenjs/tween.js"),r=require("three");class d extends r.EventDispatcher{constructor(t,p,a,s){super();i(this,"_uuid",r.MathUtils.generateUUID());i(this,"_playing",!1);i(this,"_stopped",!1);i(this,"_completed",!1);this.object=t,this.to=p,this.duration=a,this.options=s}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}),console.log("play",this),this}stop(){return this._playing=!1,this._stopped=!0,this.dispatchEvent({type:"stop",target:this}),this}}class _{constructor(){i(this,"uuid",r.MathUtils.generateUUID());i(this,"_callbackMap",new Map);i(this,"_tweens",new Map)}createAnimator(e,t,p,a){var o,c;const s=new d(e,t,p,a);return this._callbackMap.set(s.uuid,{onUpdate:((o=s.options)==null?void 0:o.onUpdate)??(()=>{}),onComplete:((c=s.options)==null?void 0:c.onComplete)??(()=>{})}),this._setupTween(s),s}unregister(e){if(!this._callbackMap.has(e)){console.warn(`Animator with uuid ${e} not registered`);return}this._callbackMap.delete(e),this._tweens.delete(e)}Dispose(){this._callbackMap.clear(),this._tweens.clear()}tick(){l.update()}Animate(e){return new l.Tween(e)}_setupTween(e){var p;const t=new l.Tween(e.object).to(e.to,e.duration).easing(((p=e.options)==null?void 0:p.easing)??l.Easing.Quadratic.Out).onUpdate((a,s)=>{var o;(o=this._callbackMap.get(e.uuid))==null||o.onUpdate(a,s)}).onComplete(a=>{var s;(s=this._callbackMap.get(e.uuid))==null||s.onComplete(a)});e.addEventListener("play",()=>{t.start()}),e.addEventListener("stop",()=>{t.stop()}),this._tweens.set(e.uuid,t)}}exports.AnimationSystem=_;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Tween } from '@tweenjs/tween.js';
|
|
2
|
+
import { Animator } from './animator/Animator.ts';
|
|
3
|
+
import { UUID } from '../../types/index.ts';
|
|
4
|
+
import { DIVETicker } from '../../engine/clock/Clock.ts';
|
|
5
|
+
import { TAnimatorParameters } from './types/AnimatorParameters.ts';
|
|
6
|
+
export type * from './animator/Animator.ts';
|
|
7
|
+
declare global {
|
|
8
|
+
interface ModuleClasses {
|
|
9
|
+
AnimationSystem: typeof AnimationSystem;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* @module AnimationSystem
|
|
14
|
+
*
|
|
15
|
+
* Updates all animations.
|
|
16
|
+
* DIVE uses Tween.js to handle animations.
|
|
17
|
+
*/
|
|
18
|
+
export declare class AnimationSystem implements DIVETicker {
|
|
19
|
+
uuid: string;
|
|
20
|
+
private _callbackMap;
|
|
21
|
+
private _tweens;
|
|
22
|
+
/**
|
|
23
|
+
* Creates a new animator and registers it.
|
|
24
|
+
* @param object - The object to animate.
|
|
25
|
+
* @param to - The target object.
|
|
26
|
+
* @param duration - The duration of the animation.
|
|
27
|
+
* @param options - The options for the animation.
|
|
28
|
+
* @returns The animator.
|
|
29
|
+
*/
|
|
30
|
+
createAnimator<T extends object>(object: T, to: T, duration: number, options?: TAnimatorParameters<T>): Animator<T>;
|
|
31
|
+
unregister(uuid: UUID): void;
|
|
32
|
+
Dispose(): void;
|
|
33
|
+
tick(): void;
|
|
34
|
+
Animate<T extends object>(object: T): Tween<T>;
|
|
35
|
+
private _setupTween;
|
|
36
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { EventDispatcher, Event } from 'three';
|
|
2
|
+
import { UUID } from '../../../types/index.ts';
|
|
3
|
+
import { TAnimatorParameters } from '../types/AnimatorParameters.ts';
|
|
4
|
+
type TAnimatorEventMap = {
|
|
5
|
+
play: Event;
|
|
6
|
+
stop: Event;
|
|
7
|
+
};
|
|
8
|
+
export declare class Animator<T extends object> extends EventDispatcher<TAnimatorEventMap> {
|
|
9
|
+
readonly object: T;
|
|
10
|
+
readonly to: T;
|
|
11
|
+
readonly duration: number;
|
|
12
|
+
readonly options?: TAnimatorParameters<T> | undefined;
|
|
13
|
+
private _uuid;
|
|
14
|
+
private _playing;
|
|
15
|
+
private _stopped;
|
|
16
|
+
private _completed;
|
|
17
|
+
constructor(object: T, to: T, duration: number, options?: TAnimatorParameters<T> | undefined);
|
|
18
|
+
get uuid(): UUID;
|
|
19
|
+
get playing(): boolean;
|
|
20
|
+
get stopped(): boolean;
|
|
21
|
+
get completed(): boolean;
|
|
22
|
+
dispose(): void;
|
|
23
|
+
play(): this;
|
|
24
|
+
stop(): this;
|
|
25
|
+
}
|
|
26
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
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
|
|
2
|
-
//# sourceMappingURL=ARSystem.cjs.map
|
|
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;
|
|
@@ -9,9 +9,8 @@ declare global {
|
|
|
9
9
|
* The AR module enables Augmented Reality features across different platforms:
|
|
10
10
|
*
|
|
11
11
|
* ```ts
|
|
12
|
-
* import {
|
|
12
|
+
* import { ARSystem } from '@shopware-ag/dive/modules/ARSystem';
|
|
13
13
|
*
|
|
14
|
-
* const ARSystem = await ModuleRegistry.get('ARSystem');
|
|
15
14
|
* const arSystem = new ARSystem();
|
|
16
15
|
*
|
|
17
16
|
* // Launch AR with options
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var u = Object.defineProperty;
|
|
2
2
|
var m = (c, e, t) => e in c ? u(c, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : c[e] = t;
|
|
3
3
|
var i = (c, e, t) => m(c, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
-
import {
|
|
5
|
-
import { E as s
|
|
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
6
|
import { AssetConverter as h } from "../asset/converter/AssetConverter.mjs";
|
|
7
7
|
import { AssetLoader as w } from "../asset/loader/AssetLoader.mjs";
|
|
8
8
|
import { AssetExporter as p } from "../asset/exporter/AssetExporter.mjs";
|
|
@@ -161,4 +161,3 @@ class A {
|
|
|
161
161
|
export {
|
|
162
162
|
A as ARSystem
|
|
163
163
|
};
|
|
164
|
-
//# sourceMappingURL=ARSystem.mjs.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { DIVEScene } from '../../../engine/scene/Scene';
|
|
1
|
+
import { OrbitController } from '../../../modules/controller/orbit/OrbitController.ts';
|
|
2
|
+
import { DIVEEngine } from '../../../engine/Engine.ts';
|
|
4
3
|
export declare class DIVEWebXR {
|
|
5
4
|
private static _renderer;
|
|
6
5
|
private static _scene;
|
|
@@ -13,7 +12,7 @@ export declare class DIVEWebXR {
|
|
|
13
12
|
private static _overlay;
|
|
14
13
|
private static _options;
|
|
15
14
|
private static _xrController;
|
|
16
|
-
static Launch(
|
|
15
|
+
static Launch(engine: DIVEEngine, controller: OrbitController): Promise<void>;
|
|
17
16
|
static Update(_time: DOMHighResTimeStamp, frame: XRFrame): void;
|
|
18
17
|
static End(): void;
|
|
19
18
|
private static _onSessionStarted;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Object3D } from 'three';
|
|
2
|
-
import {
|
|
3
|
-
import { DIVEScene } from '../../../../engine/scene/Scene';
|
|
2
|
+
import { DIVERenderPipeline } from '../../../../engine/renderer/Renderer.ts';
|
|
3
|
+
import { DIVEScene } from '../../../../engine/scene/Scene.ts';
|
|
4
4
|
export declare class DIVEWebXRController extends Object3D {
|
|
5
5
|
private _renderer;
|
|
6
6
|
private _scene;
|
|
@@ -23,7 +23,7 @@ export declare class DIVEWebXRController extends Object3D {
|
|
|
23
23
|
private _touchQuaterion;
|
|
24
24
|
private _touchScale;
|
|
25
25
|
private _scaleThreshold;
|
|
26
|
-
constructor(session: XRSession, renderer:
|
|
26
|
+
constructor(session: XRSession, renderer: DIVERenderPipeline, scene: DIVEScene);
|
|
27
27
|
Init(): Promise<this>;
|
|
28
28
|
Dispose(): void;
|
|
29
29
|
Update(frame: XRFrame): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Matrix4, Quaternion, Vector3 } from 'three';
|
|
2
|
-
import {
|
|
2
|
+
import { DIVERenderPipeline } from '../../../../engine/renderer/Renderer.ts';
|
|
3
3
|
export declare class DIVEWebXROrigin {
|
|
4
4
|
private _renderer;
|
|
5
5
|
private _session;
|
|
@@ -22,7 +22,7 @@ export declare class DIVEWebXROrigin {
|
|
|
22
22
|
get quaternion(): Quaternion;
|
|
23
23
|
private _scale;
|
|
24
24
|
get scale(): Vector3;
|
|
25
|
-
constructor(session: XRSession, renderer:
|
|
25
|
+
constructor(session: XRSession, renderer: DIVERenderPipeline, entityTypes?: XRHitTestTrackableType[]);
|
|
26
26
|
Init(): Promise<this>;
|
|
27
27
|
Dispose(): void;
|
|
28
28
|
Update(frame: XRFrame): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Matrix4, Mesh, Vector3 } from 'three';
|
|
2
|
-
import {
|
|
3
|
-
import { DIVEScene } from '../../../../engine/scene/Scene';
|
|
4
|
-
import { DIVEEventExecutor } from '../../../../events/EventExecutor';
|
|
2
|
+
import { DIVERenderPipeline } from '../../../../engine/renderer/Renderer.ts';
|
|
3
|
+
import { DIVEScene } from '../../../../engine/scene/Scene.ts';
|
|
4
|
+
import { DIVEEventExecutor } from '../../../../modules/events/EventExecutor.ts';
|
|
5
5
|
/**
|
|
6
6
|
* object is undefined when AR world is hit.
|
|
7
7
|
*/
|
|
@@ -28,7 +28,7 @@ export declare class DIVEWebXRRaycaster extends DIVEEventExecutor<DIVEWebXRRayca
|
|
|
28
28
|
private _arHitResultBuffer;
|
|
29
29
|
private _sceneHitResultBuffer;
|
|
30
30
|
private _hasHit;
|
|
31
|
-
constructor(session: XRSession, renderer:
|
|
31
|
+
constructor(session: XRSession, renderer: DIVERenderPipeline, scene: DIVEScene);
|
|
32
32
|
Dispose(): void;
|
|
33
33
|
Init(): Promise<this>;
|
|
34
34
|
GetARIntersections(frame: XRFrame): DIVEHitResult[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { DIVEHitResult } from '../WebXRRaycaster';
|
|
1
|
+
import { DIVERenderPipeline } from '../../../../../engine/renderer/Renderer.ts';
|
|
2
|
+
import { DIVEHitResult } from '../WebXRRaycaster.ts';
|
|
3
3
|
export declare class DIVEWebXRRaycasterAR {
|
|
4
4
|
private _session;
|
|
5
5
|
private _renderer;
|
|
@@ -8,7 +8,7 @@ export declare class DIVEWebXRRaycasterAR {
|
|
|
8
8
|
private _requesting;
|
|
9
9
|
private _initialized;
|
|
10
10
|
private _hitMatrixBuffer;
|
|
11
|
-
constructor(session: XRSession, renderer:
|
|
11
|
+
constructor(session: XRSession, renderer: DIVERenderPipeline);
|
|
12
12
|
Dispose(): void;
|
|
13
13
|
Init(): Promise<this>;
|
|
14
14
|
GetIntersections(frame: XRFrame): DIVEHitResult[];
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { DIVEScene } from '../../../../../engine/scene/Scene';
|
|
3
|
-
import { DIVEHitResult } from '../WebXRRaycaster';
|
|
1
|
+
import { DIVERenderPipeline } from '../../../../../engine/renderer/Renderer.ts';
|
|
2
|
+
import { DIVEScene } from '../../../../../engine/scene/Scene.ts';
|
|
3
|
+
import { DIVEHitResult } from '../WebXRRaycaster.ts';
|
|
4
4
|
export declare class DIVEWebXRRaycasterTHREE {
|
|
5
5
|
private _renderer;
|
|
6
6
|
private _scene;
|
|
7
7
|
private _controller;
|
|
8
8
|
private _raycaster;
|
|
9
|
-
constructor(renderer:
|
|
9
|
+
constructor(renderer: DIVERenderPipeline, scene: DIVEScene);
|
|
10
10
|
Init(): Promise<this>;
|
|
11
11
|
GetIntersections(): DIVEHitResult[];
|
|
12
12
|
}
|
|
@@ -1,2 +1 @@
|
|
|
1
1
|
"use strict";var i=Object.defineProperty;var n=(e,t,r)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var o=(e,t,r)=>n(e,typeof t!="symbol"?t+"":t,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class a{constructor(t,r){o(this,"_uri","");this._loader=t,this._exporter=r}convert(t){return this._uri=t,{to:this._to.bind(this)}}async _to(t,r){const s=await this._loader.load(this._uri);return this._exporter.export(s,t,r)}}exports.AssetConverter=a;
|
|
2
|
-
//# sourceMappingURL=AssetConverter.cjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AssetLoader } from '../loader/AssetLoader';
|
|
2
|
-
import { AssetExporter, FileTypeToExporterOptions } from '../exporter/AssetExporter';
|
|
3
|
-
import { FileType } from '../../../types/file';
|
|
1
|
+
import { AssetLoader } from '../loader/AssetLoader.ts';
|
|
2
|
+
import { AssetExporter, FileTypeToExporterOptions } from '../exporter/AssetExporter.ts';
|
|
3
|
+
import { FileType } from '../../../types/file/index.ts';
|
|
4
4
|
declare global {
|
|
5
5
|
interface ModuleClasses {
|
|
6
6
|
AssetConverter: typeof AssetConverter;
|
|
@@ -12,9 +12,8 @@ declare global {
|
|
|
12
12
|
* Converts between different 3D file formats:
|
|
13
13
|
*
|
|
14
14
|
* ```ts
|
|
15
|
-
* import {
|
|
15
|
+
* import { AssetConverter } from '@shopware-ag/dive/modules/AssetConverter';
|
|
16
16
|
*
|
|
17
|
-
* const AssetConverter = await ModuleRegistry.get('AssetConverter');
|
|
18
17
|
* const assetConverter = new AssetConverter();
|
|
19
18
|
* const usdzBuffer = await assetConverter.convert('input.glb').to('usdz');
|
|
20
19
|
* ```
|