@shopware-ag/dive 2.0.2 → 2.1.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/README.md +0 -1
- package/build/chunks/{AssetCache-CuVztq_7.cjs → AssetCache-BQRROeKj.cjs} +1 -1
- package/build/chunks/{AssetCache-CiC4wZkh.mjs → AssetCache-D-tIG2cD.mjs} +1 -1
- package/build/chunks/{AssetLoader-DUhBw4FF.cjs → AssetLoader-CoPAaRfM.cjs} +1 -1
- package/build/chunks/{AssetLoader-o_4syRGj.mjs → AssetLoader-Da8hFXRL.mjs} +2 -2
- package/build/chunks/FileTypes-B2n185uW.cjs +29 -0
- package/build/chunks/FileTypes-CTHWb2IV.mjs +1878 -0
- package/build/chunks/PerspectiveCamera-8tnOn5YS.mjs +39 -0
- package/build/chunks/PerspectiveCamera-Dp8ElZGj.cjs +1 -0
- package/build/chunks/{SelectTool-6ZRGPwYE.mjs → SelectTool-Bcc2oxWf.mjs} +2 -2
- package/build/chunks/SelectTool-ut3Qwv63.cjs +1 -0
- package/build/{src/components → components}/index.d.ts +1 -0
- package/build/{src/components → components}/model/Model.d.ts +3 -2
- package/build/dive.cjs +1 -1
- package/build/dive.d.ts +1 -1
- package/build/dive.mjs +69 -68
- package/build/engine/AsciiArt.d.ts +1 -0
- package/build/engine/Dive.d.ts +98 -0
- package/build/{src/engine → engine}/camera/PerspectiveCamera.d.ts +1 -0
- package/build/{src/engine → engine}/clock/Clock.d.ts +1 -4
- package/build/{src/engine → engine}/index.d.ts +2 -1
- package/build/{src/engine → engine}/renderer/Renderer.d.ts +12 -5
- package/build/{src/engine → engine}/resize/ResizeManager.d.ts +5 -2
- package/build/engine/scene/Scene.d.ts +41 -0
- package/build/{src/engine → engine}/scene/xrroot/XRRoot.d.ts +2 -2
- package/build/{src/engine → engine}/scene/xrroot/xrlightroot/XRLightRoot.d.ts +2 -2
- package/build/engine/view/View.d.ts +24 -0
- package/build/{src/index.d.ts → index.d.ts} +1 -1
- package/build/plugins/animation/index.cjs +1 -1
- package/build/plugins/animation/index.d.ts +2 -2
- package/build/plugins/animation/index.mjs +11 -11
- package/build/plugins/ar/index.cjs +1 -1
- package/build/plugins/ar/index.d.ts +4 -2
- package/build/plugins/ar/index.mjs +27 -27
- package/build/{src/plugins → plugins}/ar/src/webxr/WebXR.d.ts +2 -2
- package/build/{src/plugins → plugins}/ar/src/webxr/controller/WebXRController.d.ts +2 -2
- package/build/{src/plugins → plugins}/ar/src/webxr/origin/WebXROrigin.d.ts +2 -2
- package/build/{src/plugins → plugins}/ar/src/webxr/raycaster/WebXRRaycaster.d.ts +2 -2
- package/build/{src/plugins → plugins}/ar/src/webxr/raycaster/ar/WebXRRaycasterAR.d.ts +2 -2
- package/build/{src/plugins → plugins}/ar/src/webxr/raycaster/three/WebXRRaycasterTHREE.d.ts +2 -2
- package/build/plugins/assetcache/index.cjs +1 -1
- package/build/plugins/assetcache/index.d.ts +1 -2
- package/build/plugins/assetcache/index.mjs +1 -1
- package/build/plugins/assetconverter/index.d.ts +1 -2
- package/build/plugins/assetexporter/index.d.ts +1 -2
- package/build/plugins/assetloader/index.cjs +1 -1
- package/build/plugins/assetloader/index.d.ts +3 -2
- package/build/plugins/assetloader/index.mjs +1 -1
- package/build/plugins/mediacreator/index.cjs +1 -1
- package/build/plugins/mediacreator/index.d.ts +2 -2
- package/build/plugins/mediacreator/index.mjs +8 -8
- package/build/{src/plugins → plugins}/mediacreator/src/MediaCreator.d.ts +2 -2
- package/build/plugins/orbitcontroller/index.cjs +1 -1
- package/build/plugins/orbitcontroller/index.d.ts +1 -2
- package/build/plugins/orbitcontroller/index.mjs +1 -1
- package/build/plugins/orbitcontroller/src/OrbitController.d.ts +195 -0
- package/build/plugins/orbitcontroller/types/OrbitControllerState.types.d.ts +9 -0
- package/build/plugins/orbitcontroller/types/index.d.ts +1 -0
- package/build/plugins/orientationdisplay/index.cjs +1 -1
- package/build/plugins/orientationdisplay/index.d.ts +2 -2
- package/build/plugins/orientationdisplay/index.mjs +1 -1
- package/build/{src/plugins → plugins}/orientationdisplay/src/OrientationDisplay.d.ts +2 -2
- package/build/plugins/quickview/index.cjs +1 -0
- package/build/plugins/quickview/index.d.ts +2 -0
- package/build/plugins/quickview/index.mjs +28 -0
- package/build/plugins/quickview/src/QuickView.d.ts +14 -0
- package/build/plugins/quickview/types/QuickViewSettings.d.ts +4 -0
- package/build/plugins/quickview/types/index.d.ts +1 -0
- package/build/plugins/state/index.cjs +7 -7
- package/build/plugins/state/index.d.ts +4 -2
- package/build/plugins/state/index.mjs +498 -500
- package/build/{src/plugins → plugins}/state/src/State.d.ts +2 -2
- package/build/{src/plugins → plugins}/state/src/actions/media/generatemedia.d.ts +1 -1
- package/build/{src/plugins → plugins}/state/types/ActionTypes.d.ts +2 -2
- package/build/plugins/systeminfo/index.d.ts +2 -2
- package/build/plugins/toolbox/index.cjs +1 -1
- package/build/plugins/toolbox/index.d.ts +5 -2
- package/build/plugins/toolbox/index.mjs +2 -2
- package/package.json +6 -1
- package/build/chunks/FileTypes-B2VTJIm5.cjs +0 -30
- package/build/chunks/FileTypes-C8pTXmiC.mjs +0 -1059
- package/build/chunks/MathUtils-CBW56ZuG.cjs +0 -1
- package/build/chunks/MathUtils-CFGjHuVF.mjs +0 -159
- package/build/chunks/OrbitController-BQ6SV1O_.mjs +0 -1159
- package/build/chunks/OrbitController-CpFQ3A1H.cjs +0 -1
- package/build/chunks/PerspectiveCamera-BByyG5R4.cjs +0 -1
- package/build/chunks/PerspectiveCamera-PMJPzAn3.mjs +0 -34
- package/build/chunks/SelectTool-B1awJ9PA.cjs +0 -1
- package/build/chunks/VisibilityLayerMask-BI7jPKdx.cjs +0 -1
- package/build/chunks/VisibilityLayerMask-CXgt1fJc.mjs +0 -8
- package/build/chunks/package-AmvzOXm_.cjs +0 -1
- package/build/chunks/package-BrpVRfq7.mjs +0 -39
- package/build/src/core/Dive.d.ts +0 -58
- package/build/src/core/index.d.ts +0 -1
- package/build/src/engine/Engine.d.ts +0 -28
- package/build/src/engine/scene/Scene.d.ts +0 -19
- package/build/src/plugins/animation/index.d.ts +0 -2
- package/build/src/plugins/ar/index.d.ts +0 -4
- package/build/src/plugins/assetcache/index.d.ts +0 -1
- package/build/src/plugins/assetconverter/index.d.ts +0 -1
- package/build/src/plugins/assetexporter/index.d.ts +0 -1
- package/build/src/plugins/assetloader/index.d.ts +0 -3
- package/build/src/plugins/mediacreator/index.d.ts +0 -2
- package/build/src/plugins/orbitcontroller/index.d.ts +0 -1
- package/build/src/plugins/orbitcontroller/src/OrbitController.d.ts +0 -45
- package/build/src/plugins/orientationdisplay/index.d.ts +0 -2
- package/build/src/plugins/state/index.d.ts +0 -4
- package/build/src/plugins/systeminfo/index.d.ts +0 -2
- package/build/src/plugins/toolbox/index.d.ts +0 -5
- /package/build/{src/components → components}/boundingbox/BoundingBox.d.ts +0 -0
- /package/build/{src/components → components}/floor/Floor.d.ts +0 -0
- /package/build/{src/components → components}/gizmo/Gizmo.d.ts +0 -0
- /package/build/{src/components → components}/gizmo/handles/AxisHandle.d.ts +0 -0
- /package/build/{src/components → components}/gizmo/handles/RadialHandle.d.ts +0 -0
- /package/build/{src/components → components}/gizmo/handles/ScaleHandle.d.ts +0 -0
- /package/build/{src/components → components}/gizmo/plane/GizmoPlane.d.ts +0 -0
- /package/build/{src/components → components}/gizmo/rotate/RotateGizmo.d.ts +0 -0
- /package/build/{src/components → components}/gizmo/scale/ScaleGizmo.d.ts +0 -0
- /package/build/{src/components → components}/gizmo/translate/TranslateGizmo.d.ts +0 -0
- /package/build/{src/components → components}/grid/Grid.d.ts +0 -0
- /package/build/{src/components → components}/group/Group.d.ts +0 -0
- /package/build/{src/components → components}/light/AmbientLight.d.ts +0 -0
- /package/build/{src/components → components}/light/PointLight.d.ts +0 -0
- /package/build/{src/components → components}/light/SceneLight.d.ts +0 -0
- /package/build/{src/components → components}/light/index.d.ts +0 -0
- /package/build/{src/components → components}/node/Node.d.ts +0 -0
- /package/build/{src/components → components}/primitive/Primitive.d.ts +0 -0
- /package/build/{src/components → components}/root/Root.d.ts +0 -0
- /package/build/{src/constants → constants}/AxisHelperColors.d.ts +0 -0
- /package/build/{src/constants → constants}/GridColors.d.ts +0 -0
- /package/build/{src/constants → constants}/VisibilityLayerMask.d.ts +0 -0
- /package/build/{src/constants → constants}/index.d.ts +0 -0
- /package/build/{src/error → error}/file-content/file-content-error.d.ts +0 -0
- /package/build/{src/error → error}/file-type/file-type-error.d.ts +0 -0
- /package/build/{src/error → error}/index.d.ts +0 -0
- /package/build/{src/error → error}/network/network-error.d.ts +0 -0
- /package/build/{src/error → error}/parse/parse-error.d.ts +0 -0
- /package/build/{src/events → events}/dispatcher/EventDispatcher.d.ts +0 -0
- /package/build/{src/events → events}/index.d.ts +0 -0
- /package/build/{src/helpers → helpers}/applyMixins/applyMixins.d.ts +0 -0
- /package/build/{src/helpers → helpers}/deepClone/deepClone.d.ts +0 -0
- /package/build/{src/helpers → helpers}/findInterface/findInterface.d.ts +0 -0
- /package/build/{src/helpers → helpers}/findSceneRecursive/findSceneRecursive.d.ts +0 -0
- /package/build/{src/helpers → helpers}/getFileTypeFromUri/getFileTypeFromUri.d.ts +0 -0
- /package/build/{src/helpers → helpers}/getObjectDelta/getObjectDelta.d.ts +0 -0
- /package/build/{src/helpers → helpers}/implementsInterface/implementsInterface.d.ts +0 -0
- /package/build/{src/helpers → helpers}/index.d.ts +0 -0
- /package/build/{src/helpers → helpers}/isFileTypeSupported/isFileTypeSupported.d.ts +0 -0
- /package/build/{src/helpers → helpers}/math/ceil/ceilExp.d.ts +0 -0
- /package/build/{src/helpers → helpers}/math/degToRad/degToRad.d.ts +0 -0
- /package/build/{src/helpers → helpers}/math/floor/floorExp.d.ts +0 -0
- /package/build/{src/helpers → helpers}/math/helper/shift.d.ts +0 -0
- /package/build/{src/helpers → helpers}/math/index.d.ts +0 -0
- /package/build/{src/helpers → helpers}/math/radToDeg/radToDeg.d.ts +0 -0
- /package/build/{src/helpers → helpers}/math/round/roundExp.d.ts +0 -0
- /package/build/{src/helpers → helpers}/math/signedAngleTo/signedAngleTo.d.ts +0 -0
- /package/build/{src/helpers → helpers}/math/toFixed/toFixedExp.d.ts +0 -0
- /package/build/{src/helpers → helpers}/math/truncate/truncateExp.d.ts +0 -0
- /package/build/{src/interfaces → interfaces}/Draggable.d.ts +0 -0
- /package/build/{src/interfaces → interfaces}/Hoverable.d.ts +0 -0
- /package/build/{src/interfaces → interfaces}/Movable.d.ts +0 -0
- /package/build/{src/interfaces → interfaces}/Rotatable.d.ts +0 -0
- /package/build/{src/interfaces → interfaces}/Scalable.d.ts +0 -0
- /package/build/{src/interfaces → interfaces}/Selectable.d.ts +0 -0
- /package/build/{src/interfaces → interfaces}/index.d.ts +0 -0
- /package/build/{src/plugins → plugins}/animation/src/animator/Animator.d.ts +0 -0
- /package/build/{src/plugins → plugins}/animation/src/index.d.ts +0 -0
- /package/build/{src/plugins → plugins}/animation/src/system/AnimationSystem.d.ts +0 -0
- /package/build/{src/plugins → plugins}/animation/src/types/AnimatorParameters.d.ts +0 -0
- /package/build/{src/plugins → plugins}/ar/src/ARSystem.d.ts +0 -0
- /package/build/{src/plugins → plugins}/ar/src/arquicklook/ARQuickLook.d.ts +0 -0
- /package/build/{src/plugins → plugins}/ar/src/error/ar-errors.d.ts +0 -0
- /package/build/{src/plugins → plugins}/ar/src/sceneviewer/SceneViewer.d.ts +0 -0
- /package/build/{src/plugins → plugins}/ar/src/webxr/crosshair/WebXRCrosshair.d.ts +0 -0
- /package/build/{src/plugins → plugins}/ar/src/webxr/overlay/Overlay.d.ts +0 -0
- /package/build/{src/plugins → plugins}/ar/src/webxr/touchscreencontrols/WebXRTouchscreenControls.d.ts +0 -0
- /package/build/{src/plugins → plugins}/assetcache/src/cache/AssetCache.d.ts +0 -0
- /package/build/{src/plugins → plugins}/assetcache/src/chunk/Chunk.d.ts +0 -0
- /package/build/{src/plugins → plugins}/assetcache/src/index.d.ts +0 -0
- /package/build/{src/plugins → plugins}/assetconverter/src/AssetConverter.d.ts +0 -0
- /package/build/{src/plugins → plugins}/assetexporter/src/AssetExporter.d.ts +0 -0
- /package/build/{src/plugins → plugins}/assetloader/src/draco/DracoLoader.d.ts +0 -0
- /package/build/{src/plugins → plugins}/assetloader/src/loader/AssetLoader.d.ts +0 -0
- /package/build/{src/plugins → plugins}/mediacreator/types/MediaGenerationById.d.ts +0 -0
- /package/build/{src/plugins → plugins}/mediacreator/types/MediaGenerationByPosition.d.ts +0 -0
- /package/build/{src/plugins → plugins}/mediacreator/types/MediaGenerationResolution.d.ts +0 -0
- /package/build/{src/plugins → plugins}/mediacreator/types/index.d.ts +0 -0
- /package/build/{src/plugins → plugins}/orientationdisplay/src/axes/Axes.d.ts +0 -0
- /package/build/{src/plugins → plugins}/state/src/ActionRegistry.d.ts +0 -0
- /package/build/{src/plugins → plugins}/state/src/actions/action.d.ts +0 -0
- /package/build/{src/plugins → plugins}/state/src/actions/ar/index.d.ts +0 -0
- /package/build/{src/plugins → plugins}/state/src/actions/ar/launchar.d.ts +0 -0
- /package/build/{src/plugins → plugins}/state/src/actions/camera/computeencompassingview.d.ts +0 -0
- /package/build/{src/plugins → plugins}/state/src/actions/camera/getcameratransform.d.ts +0 -0
- /package/build/{src/plugins → plugins}/state/src/actions/camera/index.d.ts +0 -0
- /package/build/{src/plugins → plugins}/state/src/actions/camera/lockcamera.d.ts +0 -0
- /package/build/{src/plugins → plugins}/state/src/actions/camera/movecamera.d.ts +0 -0
- /package/build/{src/plugins → plugins}/state/src/actions/camera/setcameralayer.d.ts +0 -0
- /package/build/{src/plugins → plugins}/state/src/actions/camera/setcameratransform.d.ts +0 -0
- /package/build/{src/plugins → plugins}/state/src/actions/camera/zoomcamera.d.ts +0 -0
- /package/build/{src/plugins → plugins}/state/src/actions/index.d.ts +0 -0
- /package/build/{src/plugins → plugins}/state/src/actions/media/index.d.ts +0 -0
- /package/build/{src/plugins → plugins}/state/src/actions/object/addobject.d.ts +0 -0
- /package/build/{src/plugins → plugins}/state/src/actions/object/deleteobject.d.ts +0 -0
- /package/build/{src/plugins → plugins}/state/src/actions/object/deselectobject.d.ts +0 -0
- /package/build/{src/plugins → plugins}/state/src/actions/object/dropit.d.ts +0 -0
- /package/build/{src/plugins → plugins}/state/src/actions/object/getallobjects.d.ts +0 -0
- /package/build/{src/plugins → plugins}/state/src/actions/object/getobjects.d.ts +0 -0
- /package/build/{src/plugins → plugins}/state/src/actions/object/index.d.ts +0 -0
- /package/build/{src/plugins → plugins}/state/src/actions/object/modelloaded.d.ts +0 -0
- /package/build/{src/plugins → plugins}/state/src/actions/object/placeonfloor.d.ts +0 -0
- /package/build/{src/plugins → plugins}/state/src/actions/object/selectobject.d.ts +0 -0
- /package/build/{src/plugins → plugins}/state/src/actions/object/setparent.d.ts +0 -0
- /package/build/{src/plugins → plugins}/state/src/actions/object/updateobject.d.ts +0 -0
- /package/build/{src/plugins → plugins}/state/src/actions/renderer/index.d.ts +0 -0
- /package/build/{src/plugins → plugins}/state/src/actions/renderer/startrender.d.ts +0 -0
- /package/build/{src/plugins → plugins}/state/src/actions/scene/exportscene.d.ts +0 -0
- /package/build/{src/plugins → plugins}/state/src/actions/scene/getallscenedata.d.ts +0 -0
- /package/build/{src/plugins → plugins}/state/src/actions/scene/index.d.ts +0 -0
- /package/build/{src/plugins → plugins}/state/src/actions/scene/setbackground.d.ts +0 -0
- /package/build/{src/plugins → plugins}/state/src/actions/scene/updatescene.d.ts +0 -0
- /package/build/{src/plugins → plugins}/state/src/actions/toolbox/index.d.ts +0 -0
- /package/build/{src/plugins → plugins}/state/src/actions/toolbox/setgizmomode.d.ts +0 -0
- /package/build/{src/plugins → plugins}/state/src/actions/toolbox/setgizmoscalelinked.d.ts +0 -0
- /package/build/{src/plugins → plugins}/state/src/actions/toolbox/setgizmovisible.d.ts +0 -0
- /package/build/{src/plugins → plugins}/state/src/actions/toolbox/usetool.d.ts +0 -0
- /package/build/{src/plugins → plugins}/state/types/StateExportFileType.d.ts +0 -0
- /package/build/{src/plugins → plugins}/state/types/StateSceneData.d.ts +0 -0
- /package/build/{src/plugins → plugins}/state/types/index.d.ts +0 -0
- /package/build/{src/plugins → plugins}/systeminfo/src/SystemInfo.d.ts +0 -0
- /package/build/{src/plugins → plugins}/systeminfo/types/index.d.ts +0 -0
- /package/build/{src/plugins → plugins}/toolbox/src/BaseTool.d.ts +0 -0
- /package/build/{src/plugins → plugins}/toolbox/src/Toolbox.d.ts +0 -0
- /package/build/{src/plugins → plugins}/toolbox/src/select/SelectTool.d.ts +0 -0
- /package/build/{src/plugins → plugins}/toolbox/src/transform/TransformTool.d.ts +0 -0
- /package/build/{src/plugins → plugins}/toolbox/types/ToolType.d.ts +0 -0
- /package/build/{src/plugins → plugins}/toolbox/types/index.d.ts +0 -0
- /package/build/{src/types → types}/components/DIVELight.d.ts +0 -0
- /package/build/{src/types → types}/components/DIVESceneObject.d.ts +0 -0
- /package/build/{src/types → types}/components/index.d.ts +0 -0
- /package/build/{src/types → types}/file/FileTypes.d.ts +0 -0
- /package/build/{src/types → types}/file/index.d.ts +0 -0
- /package/build/{src/types → types}/index.d.ts +0 -0
- /package/build/{src/types → types}/schema/BaseEntitySchema.d.ts +0 -0
- /package/build/{src/types → types}/schema/EntitySchema.d.ts +0 -0
- /package/build/{src/types → types}/schema/EntityTypeSchema.d.ts +0 -0
- /package/build/{src/types → types}/schema/GeometrySchema.d.ts +0 -0
- /package/build/{src/types → types}/schema/GeometryTypeSchema.d.ts +0 -0
- /package/build/{src/types → types}/schema/GroupSchema.d.ts +0 -0
- /package/build/{src/types → types}/schema/LightSchema.d.ts +0 -0
- /package/build/{src/types → types}/schema/MaterialSchema.d.ts +0 -0
- /package/build/{src/types → types}/schema/ModelSchema.d.ts +0 -0
- /package/build/{src/types → types}/schema/PovSchema.d.ts +0 -0
- /package/build/{src/types → types}/schema/PrimitiveSchema.d.ts +0 -0
- /package/build/{src/types → types}/schema/index.d.ts +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
export * from './Dive.ts';
|
|
1
2
|
export * from './camera/PerspectiveCamera.ts';
|
|
2
3
|
export * from './clock/Clock.ts';
|
|
3
4
|
export * from './renderer/Renderer.ts';
|
|
4
5
|
export * from './resize/ResizeManager.ts';
|
|
5
6
|
export * from './scene/Scene.ts';
|
|
6
|
-
export * from './
|
|
7
|
+
export * from './view/View.ts';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { WebGLRenderer } from 'three';
|
|
2
2
|
import { DIVEScene } from '../scene/Scene.ts';
|
|
3
3
|
import { DIVEPerspectiveCamera } from '../camera/PerspectiveCamera.ts';
|
|
4
|
-
export type
|
|
4
|
+
export type DIVERendererSettings = {
|
|
5
5
|
/**
|
|
6
6
|
* The canvas to render to. When undefined, the canvas will be created automatically and reachable via the `diveInstance.canvas` property.
|
|
7
7
|
*
|
|
@@ -59,7 +59,7 @@ export type DIVERenderPipelineSettings = {
|
|
|
59
59
|
*/
|
|
60
60
|
shadowQuality: 'high' | 'medium' | 'low';
|
|
61
61
|
};
|
|
62
|
-
export declare const
|
|
62
|
+
export declare const DIVERendererDefaultSettings: Required<DIVERendererSettings>;
|
|
63
63
|
/**
|
|
64
64
|
* A changed version of the WebGLRenderer.
|
|
65
65
|
*
|
|
@@ -67,15 +67,22 @@ export declare const DIVERenderPipelineDefaultSettings: Required<DIVERenderPipel
|
|
|
67
67
|
*
|
|
68
68
|
* @module
|
|
69
69
|
*/
|
|
70
|
-
export declare class
|
|
70
|
+
export declare class DIVERenderer {
|
|
71
71
|
private _scene;
|
|
72
72
|
private _camera;
|
|
73
|
+
readonly isDIVERenderer: true;
|
|
73
74
|
private _webglrenderer;
|
|
74
75
|
private _settings;
|
|
75
|
-
constructor(_scene: DIVEScene, _camera: DIVEPerspectiveCamera, settings?: Partial<
|
|
76
|
+
constructor(_scene: DIVEScene, _camera: DIVEPerspectiveCamera, settings?: Partial<DIVERendererSettings>);
|
|
76
77
|
get webglrenderer(): WebGLRenderer;
|
|
77
|
-
|
|
78
|
+
get canvas(): HTMLCanvasElement;
|
|
78
79
|
render(): void;
|
|
79
80
|
onResize(width: number, height: number): void;
|
|
80
81
|
dispose(): void;
|
|
82
|
+
setCanvas(canvas: HTMLCanvasElement): void;
|
|
83
|
+
private _createWebGLRenderer;
|
|
81
84
|
}
|
|
85
|
+
/**
|
|
86
|
+
* @deprecated Use `import { DIVERenderer } from '@shopware-ag/dive'` instead.
|
|
87
|
+
*/
|
|
88
|
+
export declare const DIVERenderPipeline: typeof DIVERenderer;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { DIVEPerspectiveCamera } from '../camera/PerspectiveCamera.ts';
|
|
2
|
-
import {
|
|
2
|
+
import { DIVERenderer } from '../renderer/Renderer.ts';
|
|
3
3
|
export declare class DIVEResizeManager {
|
|
4
|
+
private _renderer;
|
|
5
|
+
private _camera;
|
|
6
|
+
readonly isDIVEResizeManager: true;
|
|
4
7
|
private _resizeObserver;
|
|
5
8
|
private _width;
|
|
6
9
|
private _height;
|
|
7
|
-
constructor(
|
|
10
|
+
constructor(_renderer: DIVERenderer, _camera: DIVEPerspectiveCamera);
|
|
8
11
|
setCanvas(canvas: HTMLCanvasElement): void;
|
|
9
12
|
dispose(): void;
|
|
10
13
|
private _observeCanvas;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Scene, Box3, ColorRepresentation } from 'three';
|
|
2
|
+
import { DIVERoot } from '../../components/root/Root.ts';
|
|
3
|
+
import { DIVEGrid } from '../../components/grid/Grid.ts';
|
|
4
|
+
export type DIVESceneSettings = {
|
|
5
|
+
/**
|
|
6
|
+
* Whether to add a floor to the scene.
|
|
7
|
+
*
|
|
8
|
+
* @default false
|
|
9
|
+
*/
|
|
10
|
+
displayFloor: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Whether to add a grid to the scene.
|
|
13
|
+
*
|
|
14
|
+
* @default false
|
|
15
|
+
*/
|
|
16
|
+
displayGrid: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Whether to add a grid to the scene.
|
|
19
|
+
*
|
|
20
|
+
* @default #ffffff
|
|
21
|
+
*/
|
|
22
|
+
backgroundColor: ColorRepresentation;
|
|
23
|
+
};
|
|
24
|
+
export declare const DIVESceneDefaultSettings: Required<DIVESceneSettings>;
|
|
25
|
+
/**
|
|
26
|
+
* A basic scene class.
|
|
27
|
+
*
|
|
28
|
+
* Comes with a root object that contains all the scene objects.
|
|
29
|
+
*
|
|
30
|
+
* @module
|
|
31
|
+
*/
|
|
32
|
+
export declare class DIVEScene extends Scene {
|
|
33
|
+
readonly isDIVEScene: true;
|
|
34
|
+
private _root;
|
|
35
|
+
private _grid;
|
|
36
|
+
constructor(settings?: Partial<DIVESceneSettings>);
|
|
37
|
+
get root(): DIVERoot;
|
|
38
|
+
get grid(): DIVEGrid;
|
|
39
|
+
setBackground(color: ColorRepresentation): void;
|
|
40
|
+
computeSceneBB(): Box3;
|
|
41
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Object3D } from 'three';
|
|
2
2
|
import { DIVERoot } from '../../../components/root/Root.ts';
|
|
3
|
-
import {
|
|
3
|
+
import { DIVERenderer } from '../../renderer/Renderer.ts';
|
|
4
4
|
import { DIVEXRLightRoot } from './xrlightroot/XRLightRoot.ts';
|
|
5
5
|
import { DIVEScene } from '../Scene.ts';
|
|
6
6
|
export declare class DIVEXRRoot extends Object3D {
|
|
@@ -12,6 +12,6 @@ export declare class DIVEXRRoot extends Object3D {
|
|
|
12
12
|
get XRHandNode(): Object3D;
|
|
13
13
|
private _xrShadowPlane;
|
|
14
14
|
constructor(scene: DIVEScene);
|
|
15
|
-
initLightEstimation(renderer:
|
|
15
|
+
initLightEstimation(renderer: DIVERenderer): void;
|
|
16
16
|
disposeLightEstimation(): void;
|
|
17
17
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DIVERenderer } from '../../../renderer/Renderer.ts';
|
|
2
2
|
import { Object3D } from 'three';
|
|
3
3
|
import { DIVEScene } from '../../Scene.ts';
|
|
4
4
|
export declare class DIVEXRLightRoot extends Object3D {
|
|
@@ -6,7 +6,7 @@ export declare class DIVEXRLightRoot extends Object3D {
|
|
|
6
6
|
private _xrLight;
|
|
7
7
|
private _lightRoot;
|
|
8
8
|
constructor(scene: DIVEScene);
|
|
9
|
-
initLightEstimation(renderer:
|
|
9
|
+
initLightEstimation(renderer: DIVERenderer): void;
|
|
10
10
|
disposeLightEstimation(): void;
|
|
11
11
|
private onEstimationStart;
|
|
12
12
|
private onEstimationEnd;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { DIVETicker } from '../clock/Clock.ts';
|
|
2
|
+
import { DIVEPerspectiveCamera } from '../camera/PerspectiveCamera.ts';
|
|
3
|
+
import { DIVERenderer, DIVERendererSettings } from '../renderer/Renderer.ts';
|
|
4
|
+
import { DIVEScene } from '../scene/Scene.ts';
|
|
5
|
+
export declare class DIVEView implements DIVETicker {
|
|
6
|
+
private _scene;
|
|
7
|
+
private _camera;
|
|
8
|
+
private _settings;
|
|
9
|
+
readonly isDIVEView: true;
|
|
10
|
+
readonly uuid: string;
|
|
11
|
+
private _paused;
|
|
12
|
+
private _renderer;
|
|
13
|
+
private _resizeManager;
|
|
14
|
+
constructor(_scene: DIVEScene, _camera: DIVEPerspectiveCamera, _settings: Partial<DIVERendererSettings>);
|
|
15
|
+
get renderer(): DIVERenderer;
|
|
16
|
+
get camera(): DIVEPerspectiveCamera;
|
|
17
|
+
get canvas(): HTMLCanvasElement;
|
|
18
|
+
tick(): void;
|
|
19
|
+
dispose(): void;
|
|
20
|
+
onResize(width: number, height: number): void;
|
|
21
|
+
setCanvas(canvas: HTMLCanvasElement): void;
|
|
22
|
+
pause(): void;
|
|
23
|
+
resume(): void;
|
|
24
|
+
}
|
|
@@ -1 +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("
|
|
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("three");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;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from '
|
|
2
|
-
export
|
|
1
|
+
export * from './src/index.ts';
|
|
2
|
+
export * as TWEEN from '@tweenjs/tween.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var d = Object.defineProperty;
|
|
2
|
-
var h = (
|
|
3
|
-
var
|
|
2
|
+
var h = (a, e, t) => e in a ? d(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t;
|
|
3
|
+
var r = (a, e, t) => h(a, typeof e != "symbol" ? e + "" : e, t);
|
|
4
4
|
import * as c from "@tweenjs/tween.js";
|
|
5
|
-
import {
|
|
5
|
+
import { MathUtils as p } from "three";
|
|
6
6
|
class u {
|
|
7
7
|
addEventListener(e, t) {
|
|
8
8
|
this._listeners === void 0 && (this._listeners = {});
|
|
@@ -37,10 +37,10 @@ class u {
|
|
|
37
37
|
class _ extends u {
|
|
38
38
|
constructor(t, i, n, s) {
|
|
39
39
|
super();
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
r(this, "_uuid", p.generateUUID());
|
|
41
|
+
r(this, "_playing", !1);
|
|
42
|
+
r(this, "_stopped", !1);
|
|
43
|
+
r(this, "_completed", !1);
|
|
44
44
|
this.object = t, this.to = i, this.duration = n, this.options = s;
|
|
45
45
|
}
|
|
46
46
|
get uuid() {
|
|
@@ -67,10 +67,10 @@ class _ extends u {
|
|
|
67
67
|
}
|
|
68
68
|
class E {
|
|
69
69
|
constructor() {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
70
|
+
r(this, "uuid", p.generateUUID());
|
|
71
|
+
r(this, "TWEEN", c);
|
|
72
|
+
r(this, "_callbackMap", /* @__PURE__ */ new Map());
|
|
73
|
+
r(this, "_tweens", /* @__PURE__ */ new Map());
|
|
74
74
|
}
|
|
75
75
|
/**
|
|
76
76
|
* Creates a new animator and registers it.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var f=Object.defineProperty;var h=(o,e,r)=>e in o?f(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r;var l=(o,e,r)=>h(o,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-CoPAaRfM.cjs"),w=require("../../chunks/AssetExporter-DsbC2rqv.cjs");var m=(o=>(o.AR_DESKTOP_PLATFORM_ERROR="ar-desktop-platform-error",o.AR_QUICK_LOOK_NOT_SAFARI_ERROR="ar-quicklook-not-safari-error",o.AR_QUICK_LOOK_VERSION_MISMATCH_ERROR="ar-quicklook-version-mismatch-error",o.AR_QUICK_LOOK_UNKNOWN_ERROR="ar-quicklook-unknown-error",o))(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 p extends a{constructor(){super("ARQuickLook on iOS is only available in Safari.","ar-quicklook-not-safari-error")}}class d 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 S{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 p);const t=c.SystemInfo.getIOSVersion();if(t&&t.major<k)return Promise.reject(new d(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:"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 _{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 L{async launch(e,r){const t=c.SystemInfo.getSystem();return t===c.ESystem.IOS?new S().launch(e,r):t===c.ESystem.ANDROID?new _().launch(e,r):Promise.reject(new R)}}exports.ARDesktopPlatformError=R;exports.ARError=a;exports.ARQuickLook=S;exports.ARQuickLookNotSafariError=p;exports.ARQuickLookUnknownError=u;exports.ARQuickLookVersionMismatchError=d;exports.ARSystem=L;exports.EARErrorType=m;exports.SceneViewer=_;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var l = (
|
|
4
|
-
import { SystemInfo as c, EBrowser as
|
|
1
|
+
var p = Object.defineProperty;
|
|
2
|
+
var R = (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) => R(o, typeof e != "symbol" ? e + "" : e, r);
|
|
4
|
+
import { SystemInfo as c, EBrowser as d, ESystem as u } from "../systeminfo/index.mjs";
|
|
5
5
|
import { AssetConverter as h } from "../assetconverter/index.mjs";
|
|
6
|
-
import { A as _ } from "../../chunks/AssetLoader-
|
|
6
|
+
import { A as _ } from "../../chunks/AssetLoader-Da8hFXRL.mjs";
|
|
7
7
|
import { A as f } from "../../chunks/AssetExporter-brT7ogoM.mjs";
|
|
8
|
-
var S = /* @__PURE__ */ ((
|
|
9
|
-
class
|
|
8
|
+
var S = /* @__PURE__ */ ((o) => (o.AR_DESKTOP_PLATFORM_ERROR = "ar-desktop-platform-error", o.AR_QUICK_LOOK_NOT_SAFARI_ERROR = "ar-quicklook-not-safari-error", o.AR_QUICK_LOOK_VERSION_MISMATCH_ERROR = "ar-quicklook-version-mismatch-error", o.AR_QUICK_LOOK_UNKNOWN_ERROR = "ar-quicklook-unknown-error", o))(S || {});
|
|
9
|
+
class a extends Error {
|
|
10
10
|
constructor(r, t) {
|
|
11
11
|
super(r);
|
|
12
12
|
l(this, "type");
|
|
13
13
|
this.name = this.constructor.name, this.type = t, Object.setPrototypeOf(this, new.target.prototype);
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
-
class O extends
|
|
16
|
+
class O extends a {
|
|
17
17
|
constructor() {
|
|
18
18
|
super(
|
|
19
19
|
"AR features are not supported on desktop platforms.",
|
|
@@ -22,7 +22,7 @@ class O extends s {
|
|
|
22
22
|
);
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
class w extends
|
|
25
|
+
class w extends a {
|
|
26
26
|
constructor() {
|
|
27
27
|
super(
|
|
28
28
|
"ARQuickLook on iOS is only available in Safari.",
|
|
@@ -31,7 +31,7 @@ class w extends s {
|
|
|
31
31
|
);
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
class A extends
|
|
34
|
+
class A extends a {
|
|
35
35
|
constructor(e, r) {
|
|
36
36
|
super(
|
|
37
37
|
`ARQuickLook requires iOS version ${r} or later. Current version: ${e}.`,
|
|
@@ -40,7 +40,7 @@ class A extends s {
|
|
|
40
40
|
), this.currentVersion = e, this.requiredVersion = r;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
class k extends
|
|
43
|
+
class k extends a {
|
|
44
44
|
constructor() {
|
|
45
45
|
super(
|
|
46
46
|
"An unknown ARQuickLook compatibility error occurred.",
|
|
@@ -66,7 +66,7 @@ class L {
|
|
|
66
66
|
* @throws Error if ARQuickLook is not supported on the device
|
|
67
67
|
*/
|
|
68
68
|
async launch(e, r) {
|
|
69
|
-
if (c.getBrowser() !==
|
|
69
|
+
if (c.getBrowser() !== d.SAFARI)
|
|
70
70
|
return Promise.reject(new w());
|
|
71
71
|
const t = c.getIOSVersion();
|
|
72
72
|
if (t && t.major < m)
|
|
@@ -80,8 +80,8 @@ class L {
|
|
|
80
80
|
return Promise.reject(new k());
|
|
81
81
|
if (!c.getSupportsARQuickLook())
|
|
82
82
|
return Promise.reject(new k());
|
|
83
|
-
const
|
|
84
|
-
return this.launchARQuickLook(
|
|
83
|
+
const n = await this.convertToUSDZ(e, r);
|
|
84
|
+
return this.launchARQuickLook(n, r);
|
|
85
85
|
}
|
|
86
86
|
async convertToUSDZ(e, r) {
|
|
87
87
|
const t = await this.converter.convert(e).to("usdz", {
|
|
@@ -89,17 +89,17 @@ class L {
|
|
|
89
89
|
ar: {
|
|
90
90
|
anchoring: { type: "plane" },
|
|
91
91
|
planeAnchoring: {
|
|
92
|
-
alignment:
|
|
92
|
+
alignment: "horizontal"
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
|
-
}),
|
|
96
|
-
return URL.createObjectURL(
|
|
95
|
+
}), n = new Blob([t], { type: "model/vnd.usdz+zip" });
|
|
96
|
+
return URL.createObjectURL(n);
|
|
97
97
|
}
|
|
98
98
|
launchARQuickLook(e, r) {
|
|
99
99
|
return new Promise((t) => {
|
|
100
100
|
(r == null ? void 0 : r.arScale) === "fixed" && (e = e.concat("#allowsContentScaling=0"));
|
|
101
|
-
const
|
|
102
|
-
|
|
101
|
+
const n = document.createElement("a");
|
|
102
|
+
n.innerHTML = "<picture></picture>", n.rel = "ar", n.href = e, n.download = "scene.usdz", t(), n.click();
|
|
103
103
|
});
|
|
104
104
|
}
|
|
105
105
|
}
|
|
@@ -115,8 +115,8 @@ class g {
|
|
|
115
115
|
* @throws Error if there's an issue launching SceneViewer
|
|
116
116
|
*/
|
|
117
117
|
launch(e, r) {
|
|
118
|
-
const t = self.location.toString(),
|
|
119
|
-
|
|
118
|
+
const t = self.location.toString(), n = document.createElement("a"), s = this._createParams(t, e, r), i = this._createIntent(t, e, s);
|
|
119
|
+
n.setAttribute("href", i), n.click();
|
|
120
120
|
}
|
|
121
121
|
/**
|
|
122
122
|
* Creates the base URL parameters for SceneViewer
|
|
@@ -124,8 +124,8 @@ class g {
|
|
|
124
124
|
* @returns URLSearchParams with base configuration
|
|
125
125
|
*/
|
|
126
126
|
_createParams(e, r, t) {
|
|
127
|
-
const
|
|
128
|
-
return
|
|
127
|
+
const n = new URL(r, e), s = new URLSearchParams(n.search);
|
|
128
|
+
return s.set("mode", "ar_preferred"), this._applyScaleOption(s, t), this._applyPlacementOption(s, t), this._applySoundOption(s, e), this._applyLinkOption(s, e), s;
|
|
129
129
|
}
|
|
130
130
|
/**
|
|
131
131
|
* Applies the scale option to the parameters
|
|
@@ -174,9 +174,9 @@ class g {
|
|
|
174
174
|
* @returns The complete Intent URL
|
|
175
175
|
*/
|
|
176
176
|
_createIntent(e, r, t) {
|
|
177
|
-
const
|
|
178
|
-
return
|
|
179
|
-
|
|
177
|
+
const n = new URL(e), s = new URL(r, e), i = "#model-viewer-no-ar-fallback";
|
|
178
|
+
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(
|
|
179
|
+
n.toString()
|
|
180
180
|
)};end;`;
|
|
181
181
|
}
|
|
182
182
|
}
|
|
@@ -196,7 +196,7 @@ class b {
|
|
|
196
196
|
}
|
|
197
197
|
export {
|
|
198
198
|
O as ARDesktopPlatformError,
|
|
199
|
-
|
|
199
|
+
a as ARError,
|
|
200
200
|
L as ARQuickLook,
|
|
201
201
|
w as ARQuickLookNotSafariError,
|
|
202
202
|
k as ARQuickLookUnknownError,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OrbitController } from '../../../orbitcontroller/index.ts';
|
|
2
|
-
import {
|
|
2
|
+
import { DIVE } from '../../../../index.ts';
|
|
3
3
|
export declare class DIVEWebXR {
|
|
4
4
|
private static _renderer;
|
|
5
5
|
private static _scene;
|
|
@@ -12,7 +12,7 @@ export declare class DIVEWebXR {
|
|
|
12
12
|
private static _overlay;
|
|
13
13
|
private static _options;
|
|
14
14
|
private static _xrController;
|
|
15
|
-
static Launch(engine:
|
|
15
|
+
static Launch(engine: DIVE, controller: OrbitController): Promise<void>;
|
|
16
16
|
static update(_time: DOMHighResTimeStamp, frame: XRFrame): void;
|
|
17
17
|
static end(): void;
|
|
18
18
|
private static _onSessionStarted;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Object3D } from 'three';
|
|
2
|
-
import {
|
|
2
|
+
import { DIVERenderer } from '../../../../../engine/renderer/Renderer.ts';
|
|
3
3
|
import { DIVEScene } from '../../../../../engine/scene/Scene.ts';
|
|
4
4
|
export declare class DIVEWebXRController extends Object3D {
|
|
5
5
|
private _renderer;
|
|
@@ -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: DIVERenderer, 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 { DIVERenderer } 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: DIVERenderer, entityTypes?: XRHitTestTrackableType[]);
|
|
26
26
|
init(): Promise<this>;
|
|
27
27
|
dispose(): void;
|
|
28
28
|
update(frame: XRFrame): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Matrix4, Mesh, Vector3 } from 'three';
|
|
2
|
-
import {
|
|
2
|
+
import { DIVERenderer } from '../../../../../engine/renderer/Renderer.ts';
|
|
3
3
|
import { DIVEScene } from '../../../../../engine/scene/Scene.ts';
|
|
4
4
|
import { EventDispatcher } from '../../../../../events/index.ts';
|
|
5
5
|
/**
|
|
@@ -28,7 +28,7 @@ export declare class DIVEWebXRRaycaster extends EventDispatcher<DIVEWebXRRaycast
|
|
|
28
28
|
private _arHitResultBuffer;
|
|
29
29
|
private _sceneHitResultBuffer;
|
|
30
30
|
private _hasHit;
|
|
31
|
-
constructor(session: XRSession, renderer:
|
|
31
|
+
constructor(session: XRSession, renderer: DIVERenderer, scene: DIVEScene);
|
|
32
32
|
dispose(): void;
|
|
33
33
|
init(): Promise<this>;
|
|
34
34
|
getARIntersections(frame: XRFrame): DIVEHitResult[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DIVERenderer } from '../../../../../../engine/renderer/Renderer.ts';
|
|
2
2
|
import { DIVEHitResult } from '../WebXRRaycaster.ts';
|
|
3
3
|
export declare class DIVEWebXRRaycasterAR {
|
|
4
4
|
private _session;
|
|
@@ -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: DIVERenderer);
|
|
12
12
|
dispose(): void;
|
|
13
13
|
init(): Promise<this>;
|
|
14
14
|
getIntersections(frame: XRFrame): DIVEHitResult[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DIVERenderer } from '../../../../../../engine/renderer/Renderer.ts';
|
|
2
2
|
import { DIVEScene } from '../../../../../../engine/scene/Scene.ts';
|
|
3
3
|
import { DIVEHitResult } from '../WebXRRaycaster.ts';
|
|
4
4
|
export declare class DIVEWebXRRaycasterTHREE {
|
|
@@ -6,7 +6,7 @@ export declare class DIVEWebXRRaycasterTHREE {
|
|
|
6
6
|
private _scene;
|
|
7
7
|
private _controller;
|
|
8
8
|
private _raycaster;
|
|
9
|
-
constructor(renderer:
|
|
9
|
+
constructor(renderer: DIVERenderer, scene: DIVEScene);
|
|
10
10
|
init(): Promise<this>;
|
|
11
11
|
getIntersections(): DIVEHitResult[];
|
|
12
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../chunks/AssetCache-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../chunks/AssetCache-BQRROeKj.cjs");exports.AssetCache=e.AssetCache;exports.Chunk=e.Chunk;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export * from '
|
|
2
|
-
export {}
|
|
1
|
+
export * from './src/index.ts';
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export * from '
|
|
2
|
-
export {}
|
|
1
|
+
export * from './src/AssetConverter.ts';
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export * from '
|
|
2
|
-
export {}
|
|
1
|
+
export * from './src/AssetExporter.ts';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../chunks/AssetLoader-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../chunks/AssetLoader-CoPAaRfM.cjs");exports.AssetLoader=e.AssetLoader;exports.DRACOWorker=e.DRACOWorker;exports.DracoLoader=e.DracoLoader;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export * from '
|
|
2
|
-
export
|
|
1
|
+
export * from './src/loader/AssetLoader.ts';
|
|
2
|
+
export * from './src/draco/DracoLoader.ts';
|
|
3
|
+
export * from './src/draco/worker/DracoWorker.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var h=Object.defineProperty;var b=(t,e,r)=>e in t?h(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var n=(t,e,r)=>b(t,typeof e!="symbol"?e+"":e,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../../chunks/PerspectiveCamera-
|
|
1
|
+
"use strict";var h=Object.defineProperty;var b=(t,e,r)=>e in t?h(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var n=(t,e,r)=>b(t,typeof e!="symbol"?e+"":e,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../../chunks/PerspectiveCamera-Dp8ElZGj.cjs");class p{constructor(e,r,o){n(this,"_renderer");n(this,"_scene");n(this,"_controller");this._renderer=e,this._scene=r,this._controller=o}generateMedia(e){const{position:r,target:o,resolution:l}=e,{width:s,height:i}=l,a=this._controller.object.position.clone(),_=this._controller.object.quaternion.clone();this._renderer.onResize(s,i),"onResize"in this._controller.object&&this._controller.object.onResize(s,i),this._controller.object.position.copy(r),this._controller.target.copy(o),this._controller.update();const d=this.drawCanvas().toDataURL();return this._controller.object.position.copy(a),this._controller.object.quaternion.copy(_),d}drawCanvas(e){const r=this._renderer.webglrenderer.domElement;e&&(this._renderer.webglrenderer.domElement=e),this._controller.object.layers.mask=c.DIVEPerspectiveCamera.LIVE_VIEW_LAYER_MASK,this._renderer.webglrenderer.render(this._scene,this._controller.object),this._controller.object.layers.mask=c.DIVEPerspectiveCamera.EDITOR_VIEW_LAYER_MASK;const o=this._renderer.webglrenderer.domElement;return e&&(this._renderer.webglrenderer.domElement=r),o}}exports.MediaCreator=p;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export { MediaCreator } from './src/MediaCreator.ts';
|
|
2
|
+
export * from './types/index.ts';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
var
|
|
2
|
-
var b = (t, e, r) => e in t ?
|
|
1
|
+
var d = Object.defineProperty;
|
|
2
|
+
var b = (t, e, r) => e in t ? d(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
3
|
var n = (t, e, r) => b(t, typeof e != "symbol" ? e + "" : e, r);
|
|
4
|
-
import { D as c } from "../../chunks/PerspectiveCamera-
|
|
5
|
-
class
|
|
4
|
+
import { D as c } from "../../chunks/PerspectiveCamera-8tnOn5YS.mjs";
|
|
5
|
+
class j {
|
|
6
6
|
constructor(e, r, o) {
|
|
7
7
|
n(this, "_renderer");
|
|
8
8
|
n(this, "_scene");
|
|
@@ -11,9 +11,9 @@ class g {
|
|
|
11
11
|
}
|
|
12
12
|
generateMedia(e) {
|
|
13
13
|
const { position: r, target: o, resolution: l } = e, { width: s, height: i } = l, _ = this._controller.object.position.clone(), a = this._controller.object.quaternion.clone();
|
|
14
|
-
this._renderer.onResize(s, i), this._controller.object.onResize(s, i), this._controller.object.position.copy(r), this._controller.target.copy(o), this._controller.update();
|
|
15
|
-
const
|
|
16
|
-
return this._controller.object.position.copy(_), this._controller.object.quaternion.copy(a),
|
|
14
|
+
this._renderer.onResize(s, i), "onResize" in this._controller.object && this._controller.object.onResize(s, i), this._controller.object.position.copy(r), this._controller.target.copy(o), this._controller.update();
|
|
15
|
+
const h = this.drawCanvas().toDataURL();
|
|
16
|
+
return this._controller.object.position.copy(_), this._controller.object.quaternion.copy(a), h;
|
|
17
17
|
}
|
|
18
18
|
drawCanvas(e) {
|
|
19
19
|
const r = this._renderer.webglrenderer.domElement;
|
|
@@ -26,5 +26,5 @@ class g {
|
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
export {
|
|
29
|
-
|
|
29
|
+
j as MediaCreator
|
|
30
30
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DIVEScene } from '../../../engine/scene/Scene.ts';
|
|
2
|
-
import {
|
|
2
|
+
import { DIVERenderer } from '../../../engine/renderer/Renderer.ts';
|
|
3
3
|
import { OrbitController } from '../../orbitcontroller/index.ts';
|
|
4
4
|
import { MediaGenerationByPosition } from '../types/index.ts';
|
|
5
5
|
/**
|
|
@@ -9,7 +9,7 @@ export declare class MediaCreator {
|
|
|
9
9
|
private _renderer;
|
|
10
10
|
private _scene;
|
|
11
11
|
private _controller;
|
|
12
|
-
constructor(renderer:
|
|
12
|
+
constructor(renderer: DIVERenderer, scene: DIVEScene, controller: OrbitController);
|
|
13
13
|
generateMedia(options: MediaGenerationByPosition): string;
|
|
14
14
|
drawCanvas(canvasElement?: HTMLCanvasElement): HTMLCanvasElement;
|
|
15
15
|
}
|