@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 d=Object.defineProperty;var p=(t,e,r)=>e in t?d(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var o=(t,e,r)=>p(t,typeof e!="symbol"?e+"":e,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var i=(t=>(t.IOS="iOS",t.ANDROID="Android",t.WINDOWS="Windows",t.MACOS="MacOS",t.LINUX="Linux",t.UNKNOWN="Unknown",t))(i||{}),n=(t=>(t.NO_WEBXR_API="NO_WEBXR_API",t.NO_HTTPS="NO_HTTPS",t.IMMERSIVE_AR_NOT_SUPPORTED_BY_DEVICE="IMMERSIVE_AR_NOT_SUPPORTED_BY_DEVICE",t.AR_PERMISSION_DENIED="AR_PERMISSION_DENIED",t.UNKNOWN_ERROR="UNKNOWN_ERROR",t))(n||{}),c=(t=>(t.CHROMIUM="Chromium",t.SAFARI="Safari",t.WEBKIT="WebKit",t.FIREFOX="Firefox",t.EDGE_LEGACY="EdgeLegacy",t.UNKNOWN="Unknown",t))(c||{});class u{static getSystem(){if(typeof window>"u"||!window.navigator)return i.UNKNOWN;const e=window.navigator.userAgent.toLowerCase();return e.includes("iphone")||e.includes("ipad")?i.IOS:e.includes("android")?i.ANDROID:e.includes("windows")?i.WINDOWS:e.includes("macintosh")?i.MACOS:e.includes("linux")?i.LINUX:i.UNKNOWN}static async getSupportsWebXR(){if(this._supportsWebXR!==!1)return this._supportsWebXR;if(!window.isSecureContext)return this._supportsWebXR=!1,this._webXRUnsupportedReason=n.NO_HTTPS,this._supportsWebXR;if(!navigator.xr)return this._supportsWebXR=!1,this._webXRUnsupportedReason=n.NO_WEBXR_API,this._supportsWebXR;try{const e=await navigator.xr.isSessionSupported("immersive-ar");this._supportsWebXR=e,this._supportsWebXR||(this._webXRUnsupportedReason=n.IMMERSIVE_AR_NOT_SUPPORTED_BY_DEVICE)}catch{this._supportsWebXR=!1,this._webXRUnsupportedReason=n.AR_PERMISSION_DENIED}return this._supportsWebXR}static getWebXRUnsupportedReason(){return this._supportsWebXR?(console.log("WebXR is supported."),null):this._webXRUnsupportedReason}static getSupportsARQuickLook(){return!!document.createElement("a").relList.supports("ar")}static getSupportsSceneViewer(){if(typeof window>"u"||!window.navigator)return!1;const e=window.navigator.userAgent.toLowerCase();if(!e.includes("android")||!e.includes("chrome"))return!1;const r=e.match(/chrome\/(\d+)/);return!(!r||parseInt(r[1])<89)}static get isMobile(){return this.getSystem()===i.ANDROID||this.getSystem()===i.IOS}static get isDesktop(){return!this.isMobile}static getSupportsAR(){return this.getSupportsARQuickLook()||this.getSupportsSceneViewer()}static getBrowser(){var s;if(typeof window>"u"||!window.navigator)return"Unknown";const e=window.navigator.userAgent.toLowerCase(),r=(s=window.navigator.vendor)==null?void 0:s.toLowerCase();return e.includes("fxios/")?"Firefox":e.includes("crios/")?"Chromium":e.includes("firefox/")?"Firefox":e.includes("safari/")&&e.includes("version/")&&!e.includes("chrome/")&&!e.includes("edg/")&&!e.includes("opr/")?"Safari":e.includes("edg/")?"Chromium":e.includes("edge/")?"EdgeLegacy":e.includes("chrome/")||r!=null&&r.includes("google inc.")?"Chromium":e.includes("applewebkit")?"WebKit":"Unknown"}static getIOSVersion(){if(this.getSystem()!==i.IOS||typeof window>"u"||!window.navigator)return null;const r=window.navigator.userAgent.match(/(?:iPhone OS|iPad OS|OS) (\d+[._\d]*)/i);if(r&&r[1]){const s=r[1].replace(/_/g,"."),a=parseInt(s.split(".")[0],10);if(!isNaN(a))return{major:a,full:s}}return null}}o(u,"_supportsWebXR",!1),o(u,"_webXRUnsupportedReason",null);exports.EBrowser=c;exports.ESystem=i;exports.EWebXRUnsupportedReason=n;exports.SystemInfo=u;
|
|
@@ -1,41 +1,17 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
class
|
|
6
|
-
constructor(s, o, u, p) {
|
|
7
|
-
var S;
|
|
8
|
-
const n = o.match(
|
|
9
|
-
/(Chrome|Safari|Firefox|Edge)\/(\d+\.\d+)/
|
|
10
|
-
), c = n ? n[1] : "Unknown", l = n ? n[2] : "Unknown", f = o.match(/\((.*?)\)/), h = f ? f[1] : "Unknown", d = ((S = h.match(/OS (\d+_\d+)/)) == null ? void 0 : S[1]) || "Unknown", w = X(h);
|
|
11
|
-
let R = s;
|
|
12
|
-
(w === "iOS" || w === "iPadOS") && (c !== "Safari" ? R += ` ARQuickLook is only supported in Safari browser. Current browser: ${c} ${l}` : parseFloat(d.replace("_", ".")) < 13 && (R += ` ARQuickLook requires iOS/iPadOS 13.0 or later. Current version: ${d}`));
|
|
13
|
-
super(R);
|
|
14
|
-
i(this, "browserInfo");
|
|
15
|
-
this.name = "ARCompatibilityError", this.browserInfo = {
|
|
16
|
-
userAgent: o,
|
|
17
|
-
platform: u,
|
|
18
|
-
vendor: p,
|
|
19
|
-
browser: c,
|
|
20
|
-
version: l,
|
|
21
|
-
os: w,
|
|
22
|
-
osVersion: d
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
function X(t) {
|
|
27
|
-
return t.includes("iPhone") ? "iOS" : t.includes("iPad") ? "iPadOS" : t.includes("Macintosh") ? "macOS" : "Unknown";
|
|
28
|
-
}
|
|
29
|
-
class b {
|
|
1
|
+
var c = Object.defineProperty;
|
|
2
|
+
var d = (t, e, r) => e in t ? c(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
|
+
var o = (t, e, r) => d(t, typeof e != "symbol" ? e + "" : e, r);
|
|
4
|
+
var i = /* @__PURE__ */ ((t) => (t.IOS = "iOS", t.ANDROID = "Android", t.WINDOWS = "Windows", t.MACOS = "MacOS", t.LINUX = "Linux", t.UNKNOWN = "Unknown", t))(i || {}), s = /* @__PURE__ */ ((t) => (t.NO_WEBXR_API = "NO_WEBXR_API", t.NO_HTTPS = "NO_HTTPS", t.IMMERSIVE_AR_NOT_SUPPORTED_BY_DEVICE = "IMMERSIVE_AR_NOT_SUPPORTED_BY_DEVICE", t.AR_PERMISSION_DENIED = "AR_PERMISSION_DENIED", t.UNKNOWN_ERROR = "UNKNOWN_ERROR", t))(s || {}), p = /* @__PURE__ */ ((t) => (t.CHROMIUM = "Chromium", t.SAFARI = "Safari", t.WEBKIT = "WebKit", t.FIREFOX = "Firefox", t.EDGE_LEGACY = "EdgeLegacy", t.UNKNOWN = "Unknown", t))(p || {});
|
|
5
|
+
class a {
|
|
30
6
|
/**
|
|
31
7
|
* Gets the current system (iOS, Android, Windows, etc.)
|
|
32
8
|
* @returns DIVESystem The current system
|
|
33
9
|
*/
|
|
34
10
|
static getSystem() {
|
|
35
11
|
if (typeof window > "u" || !window.navigator)
|
|
36
|
-
return
|
|
12
|
+
return i.UNKNOWN;
|
|
37
13
|
const e = window.navigator.userAgent.toLowerCase();
|
|
38
|
-
return e.includes("iphone") || e.includes("ipad") ?
|
|
14
|
+
return e.includes("iphone") || e.includes("ipad") ? i.IOS : e.includes("android") ? i.ANDROID : e.includes("windows") ? i.WINDOWS : e.includes("macintosh") ? i.MACOS : e.includes("linux") ? i.LINUX : i.UNKNOWN;
|
|
39
15
|
}
|
|
40
16
|
/**
|
|
41
17
|
* @returns A promise that resolves to a boolean indicating whether the user's device supports WebXR.
|
|
@@ -44,14 +20,14 @@ class b {
|
|
|
44
20
|
if (this._supportsWebXR !== !1)
|
|
45
21
|
return this._supportsWebXR;
|
|
46
22
|
if (!window.isSecureContext)
|
|
47
|
-
return this._supportsWebXR = !1, this._webXRUnsupportedReason =
|
|
23
|
+
return this._supportsWebXR = !1, this._webXRUnsupportedReason = s.NO_HTTPS, this._supportsWebXR;
|
|
48
24
|
if (!navigator.xr)
|
|
49
|
-
return this._supportsWebXR = !1, this._webXRUnsupportedReason =
|
|
25
|
+
return this._supportsWebXR = !1, this._webXRUnsupportedReason = s.NO_WEBXR_API, this._supportsWebXR;
|
|
50
26
|
try {
|
|
51
27
|
const e = await navigator.xr.isSessionSupported("immersive-ar");
|
|
52
|
-
this._supportsWebXR = e, this._supportsWebXR || (this._webXRUnsupportedReason =
|
|
28
|
+
this._supportsWebXR = e, this._supportsWebXR || (this._webXRUnsupportedReason = s.IMMERSIVE_AR_NOT_SUPPORTED_BY_DEVICE);
|
|
53
29
|
} catch {
|
|
54
|
-
this._supportsWebXR = !1, this._webXRUnsupportedReason =
|
|
30
|
+
this._supportsWebXR = !1, this._webXRUnsupportedReason = s.AR_PERMISSION_DENIED;
|
|
55
31
|
}
|
|
56
32
|
return this._supportsWebXR;
|
|
57
33
|
}
|
|
@@ -67,7 +43,7 @@ class b {
|
|
|
67
43
|
* 1. AR support via relList
|
|
68
44
|
*
|
|
69
45
|
* Requirements:
|
|
70
|
-
* - iOS
|
|
46
|
+
* - iOS 12.0 or later
|
|
71
47
|
* - Safari browser (ARQuickLook is only supported in Safari)
|
|
72
48
|
* - Device with AR capabilities (iPhone/iPad with LiDAR scanner or ARKit support)
|
|
73
49
|
*
|
|
@@ -78,15 +54,7 @@ class b {
|
|
|
78
54
|
* @throws ARCompatibilityError if ARQuickLook is not supported, with detailed browser information
|
|
79
55
|
*/
|
|
80
56
|
static getSupportsARQuickLook() {
|
|
81
|
-
|
|
82
|
-
return !0;
|
|
83
|
-
const s = window.navigator.userAgent, o = window.navigator.platform, u = window.navigator.vendor, p = "ARQuickLook is not supported";
|
|
84
|
-
throw new m(
|
|
85
|
-
p,
|
|
86
|
-
s,
|
|
87
|
-
o,
|
|
88
|
-
u
|
|
89
|
-
);
|
|
57
|
+
return !!document.createElement("a").relList.supports("ar");
|
|
90
58
|
}
|
|
91
59
|
/**
|
|
92
60
|
* Checks if SceneViewer is supported on the current device
|
|
@@ -110,14 +78,14 @@ class b {
|
|
|
110
78
|
const e = window.navigator.userAgent.toLowerCase();
|
|
111
79
|
if (!e.includes("android") || !e.includes("chrome"))
|
|
112
80
|
return !1;
|
|
113
|
-
const
|
|
114
|
-
return !(!
|
|
81
|
+
const r = e.match(/chrome\/(\d+)/);
|
|
82
|
+
return !(!r || parseInt(r[1]) < 89);
|
|
115
83
|
}
|
|
116
84
|
/**
|
|
117
85
|
* @returns A boolean indicating whether the user's device is a mobile device.
|
|
118
86
|
*/
|
|
119
87
|
static get isMobile() {
|
|
120
|
-
return this.getSystem() ===
|
|
88
|
+
return this.getSystem() === i.ANDROID || this.getSystem() === i.IOS;
|
|
121
89
|
}
|
|
122
90
|
/**
|
|
123
91
|
* @returns A boolean indicating whether the user's device is a desktop device.
|
|
@@ -131,9 +99,38 @@ class b {
|
|
|
131
99
|
static getSupportsAR() {
|
|
132
100
|
return this.getSupportsARQuickLook() || this.getSupportsSceneViewer();
|
|
133
101
|
}
|
|
102
|
+
/**
|
|
103
|
+
* Gets the current browser engine.
|
|
104
|
+
* @returns EBrowser The current browser engine.
|
|
105
|
+
*/
|
|
106
|
+
static getBrowser() {
|
|
107
|
+
var n;
|
|
108
|
+
if (typeof window > "u" || !window.navigator)
|
|
109
|
+
return "Unknown";
|
|
110
|
+
const e = window.navigator.userAgent.toLowerCase(), r = (n = window.navigator.vendor) == null ? void 0 : n.toLowerCase();
|
|
111
|
+
return e.includes("fxios/") ? "Firefox" : e.includes("crios/") ? "Chromium" : e.includes("firefox/") ? "Firefox" : e.includes("safari/") && e.includes("version/") && !e.includes("chrome/") && // Excludes desktop Chrome, Edge Chromium
|
|
112
|
+
!e.includes("edg/") && !e.includes("opr/") ? "Safari" : e.includes("edg/") ? "Chromium" : e.includes("edge/") ? "EdgeLegacy" : e.includes("chrome/") || r != null && r.includes("google inc.") ? "Chromium" : e.includes("applewebkit") ? "WebKit" : "Unknown";
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Gets the iOS version if the current system is iOS.
|
|
116
|
+
* @returns An object with { major: number, full: string } or null if not iOS or version not parsable.
|
|
117
|
+
*/
|
|
118
|
+
static getIOSVersion() {
|
|
119
|
+
if (this.getSystem() !== i.IOS || typeof window > "u" || !window.navigator)
|
|
120
|
+
return null;
|
|
121
|
+
const r = window.navigator.userAgent.match(/(?:iPhone OS|iPad OS|OS) (\d+[._\d]*)/i);
|
|
122
|
+
if (r && r[1]) {
|
|
123
|
+
const n = r[1].replace(/_/g, "."), u = parseInt(n.split(".")[0], 10);
|
|
124
|
+
if (!isNaN(u))
|
|
125
|
+
return { major: u, full: n };
|
|
126
|
+
}
|
|
127
|
+
return null;
|
|
128
|
+
}
|
|
134
129
|
}
|
|
135
|
-
|
|
130
|
+
o(a, "_supportsWebXR", !1), o(a, "_webXRUnsupportedReason", null);
|
|
136
131
|
export {
|
|
137
|
-
|
|
138
|
-
|
|
132
|
+
p as EBrowser,
|
|
133
|
+
i as ESystem,
|
|
134
|
+
s as EWebXRUnsupportedReason,
|
|
135
|
+
a as SystemInfo
|
|
139
136
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var s=Object.defineProperty;var r=(t,e,o)=>e in t?s(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o;var i=(t,e,o)=>r(t,typeof e!="symbol"?e+"":e,o);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("../../chunks/SelectTool-BVxDEcnM.cjs");class n{constructor(e,o){i(this,"_scene");i(this,"_controller");i(this,"_activeTool");i(this,"_selectTool");this._scene=e,this._controller=o,this._selectTool=null,this._activeTool=null}get selectTool(){return this._selectTool||(this._selectTool=new l.DIVESelectTool(this._scene,this._controller)),this._selectTool}dispose(){this.removeEventListeners()}getActiveTool(){return this._activeTool}useTool(e){var o;switch((o=this._activeTool)==null||o.deactivate(),e){case"select":{this.addEventListeners(),this.selectTool.activate(),this._activeTool=this.selectTool;break}case"none":{this.removeEventListeners(),this._activeTool=null;break}default:console.warn(`DIVEToolBox.useTool: Unknown tool: ${e}`)}}setGizmoMode(e){this.selectTool.setGizmoMode(e)}setGizmoVisibility(e){this.selectTool.setGizmoVisibility(e)}setGizmoScaleLinked(e){this.selectTool.setGizmoScaleLinked(e)}onPointerMove(e){var o;(o=this._activeTool)==null||o.onPointerMove(e)}onPointerDown(e){var o;(o=this._activeTool)==null||o.onPointerDown(e)}onPointerUp(e){var o;(o=this._activeTool)==null||o.onPointerUp(e)}onWheel(e){var o;(o=this._activeTool)==null||o.onWheel(e)}addEventListeners(){this._controller.domElement.addEventListener("pointermove",e=>this.onPointerMove(e)),this._controller.domElement.addEventListener("pointerdown",e=>this.onPointerDown(e)),this._controller.domElement.addEventListener("pointerup",e=>this.onPointerUp(e)),this._controller.domElement.addEventListener("wheel",e=>this.onWheel(e))}removeEventListeners(){this._controller.domElement.removeEventListener("pointermove",e=>this.onPointerMove(e)),this._controller.domElement.removeEventListener("pointerdown",e=>this.onPointerDown(e)),this._controller.domElement.removeEventListener("pointerup",e=>this.onPointerUp(e)),this._controller.domElement.removeEventListener("wheel",e=>this.onWheel(e))}}i(n,"DefaultTool","select");exports.DIVEBaseTool=l.DIVEBaseTool;exports.DIVESelectTool=l.DIVESelectTool;exports.DIVETransformTool=l.DIVETransformTool;exports.isSelectTool=l.isSelectTool;exports.isTransformTool=l.isTransformTool;exports.Toolbox=n;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
var n = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var i = (t, e, o) =>
|
|
4
|
-
import { D as
|
|
2
|
+
var s = (t, e, o) => e in t ? n(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o;
|
|
3
|
+
var i = (t, e, o) => s(t, typeof e != "symbol" ? e + "" : e, o);
|
|
4
|
+
import { D as l } from "../../chunks/SelectTool-D5QfT5rr.mjs";
|
|
5
|
+
import { a as m, c as T, i as d, b as _ } from "../../chunks/SelectTool-D5QfT5rr.mjs";
|
|
5
6
|
class r {
|
|
6
7
|
constructor(e, o) {
|
|
7
8
|
i(this, "_scene");
|
|
@@ -11,22 +12,22 @@ class r {
|
|
|
11
12
|
this._scene = e, this._controller = o, this._selectTool = null, this._activeTool = null;
|
|
12
13
|
}
|
|
13
14
|
get selectTool() {
|
|
14
|
-
return this._selectTool || (this._selectTool = new
|
|
15
|
+
return this._selectTool || (this._selectTool = new l(
|
|
15
16
|
this._scene,
|
|
16
17
|
this._controller
|
|
17
18
|
)), this._selectTool;
|
|
18
19
|
}
|
|
19
|
-
|
|
20
|
+
dispose() {
|
|
20
21
|
this.removeEventListeners();
|
|
21
22
|
}
|
|
22
|
-
|
|
23
|
+
getActiveTool() {
|
|
23
24
|
return this._activeTool;
|
|
24
25
|
}
|
|
25
|
-
|
|
26
|
+
useTool(e) {
|
|
26
27
|
var o;
|
|
27
|
-
switch ((o = this._activeTool) == null || o.
|
|
28
|
+
switch ((o = this._activeTool) == null || o.deactivate(), e) {
|
|
28
29
|
case "select": {
|
|
29
|
-
this.addEventListeners(), this.selectTool.
|
|
30
|
+
this.addEventListeners(), this.selectTool.activate(), this._activeTool = this.selectTool;
|
|
30
31
|
break;
|
|
31
32
|
}
|
|
32
33
|
case "none": {
|
|
@@ -34,17 +35,17 @@ class r {
|
|
|
34
35
|
break;
|
|
35
36
|
}
|
|
36
37
|
default:
|
|
37
|
-
console.warn(`DIVEToolBox.
|
|
38
|
+
console.warn(`DIVEToolBox.useTool: Unknown tool: ${e}`);
|
|
38
39
|
}
|
|
39
40
|
}
|
|
40
|
-
|
|
41
|
-
this.selectTool.
|
|
41
|
+
setGizmoMode(e) {
|
|
42
|
+
this.selectTool.setGizmoMode(e);
|
|
42
43
|
}
|
|
43
|
-
|
|
44
|
-
this.selectTool.
|
|
44
|
+
setGizmoVisibility(e) {
|
|
45
|
+
this.selectTool.setGizmoVisibility(e);
|
|
45
46
|
}
|
|
46
|
-
|
|
47
|
-
this.selectTool.
|
|
47
|
+
setGizmoScaleLinked(e) {
|
|
48
|
+
this.selectTool.setGizmoScaleLinked(e);
|
|
48
49
|
}
|
|
49
50
|
onPointerMove(e) {
|
|
50
51
|
var o;
|
|
@@ -95,5 +96,10 @@ class r {
|
|
|
95
96
|
}
|
|
96
97
|
i(r, "DefaultTool", "select");
|
|
97
98
|
export {
|
|
98
|
-
|
|
99
|
+
m as DIVEBaseTool,
|
|
100
|
+
l as DIVESelectTool,
|
|
101
|
+
T as DIVETransformTool,
|
|
102
|
+
r as Toolbox,
|
|
103
|
+
d as isSelectTool,
|
|
104
|
+
_ as isTransformTool
|
|
99
105
|
};
|
|
@@ -9,6 +9,6 @@ import { ColorRepresentation, Mesh } from 'three';
|
|
|
9
9
|
export declare class DIVEFloor extends Mesh {
|
|
10
10
|
readonly isDIVEFloor: true;
|
|
11
11
|
constructor();
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
setVisibility(visible: boolean): void;
|
|
13
|
+
setColor(color: ColorRepresentation): void;
|
|
14
14
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Euler, Object3D, Vector3 } from 'three';
|
|
2
|
-
import { OrbitController } from '../../
|
|
2
|
+
import { OrbitController } from '../../plugins/orbitcontroller/index.ts';
|
|
3
3
|
import { DIVEGizmoPlane as DIVEGizmoPlane } from './plane/GizmoPlane.ts';
|
|
4
4
|
import { DIVESelectable } from '../../interfaces/Selectable.ts';
|
|
5
5
|
export type DIVEGizmoMode = 'translate' | 'rotate' | 'scale';
|
|
@@ -2,7 +2,7 @@ import { ColorRepresentation, Object3D, Vector3 } from 'three';
|
|
|
2
2
|
import { DIVEHoverable } from '../../../interfaces/Hoverable.ts';
|
|
3
3
|
import { DIVETranslateGizmo } from '../translate/TranslateGizmo.ts';
|
|
4
4
|
import { DIVEDraggable } from '../../../interfaces/Draggable.ts';
|
|
5
|
-
import { DraggableEvent } from '../../../
|
|
5
|
+
import { DraggableEvent } from '../../../plugins/toolbox/index.ts';
|
|
6
6
|
export declare class DIVEAxisHandle extends Object3D implements DIVEHoverable, DIVEDraggable {
|
|
7
7
|
readonly isHoverable: true;
|
|
8
8
|
readonly isDraggable: true;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ColorRepresentation, Object3D, Vector3 } from 'three';
|
|
2
2
|
import { DIVEHoverable } from '../../../interfaces/Hoverable.ts';
|
|
3
|
-
import { DraggableEvent } from '../../../
|
|
3
|
+
import { DraggableEvent } from '../../../plugins/toolbox/index.ts';
|
|
4
4
|
import { DIVERotateGizmo } from '../rotate/RotateGizmo.ts';
|
|
5
5
|
import { DIVEDraggable } from '../../../interfaces/Draggable.ts';
|
|
6
6
|
export declare class DIVERadialHandle extends Object3D implements DIVEHoverable, DIVEDraggable {
|
|
@@ -2,7 +2,7 @@ import { ColorRepresentation, Object3D, Vector3 } from 'three';
|
|
|
2
2
|
import { DIVEHoverable } from '../../../interfaces/Hoverable.ts';
|
|
3
3
|
import { DIVEScaleGizmo } from '../scale/ScaleGizmo.ts';
|
|
4
4
|
import { DIVEDraggable } from '../../../interfaces/Draggable.ts';
|
|
5
|
-
import { DraggableEvent } from '../../../
|
|
5
|
+
import { DraggableEvent } from '../../../plugins/toolbox/index.ts';
|
|
6
6
|
export declare class DIVEScaleHandle extends Object3D implements DIVEHoverable, DIVEDraggable {
|
|
7
7
|
readonly isHoverable: true;
|
|
8
8
|
readonly isDraggable: true;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Object3D } from 'three';
|
|
2
|
-
import { OrbitController } from '../../../
|
|
2
|
+
import { OrbitController } from '../../../plugins/orbitcontroller/index.ts';
|
|
3
3
|
import { DIVERadialHandle } from '../handles/RadialHandle.ts';
|
|
4
|
-
import { DraggableEvent } from '../../../
|
|
4
|
+
import { DraggableEvent } from '../../../plugins/toolbox/index.ts';
|
|
5
5
|
export declare class DIVERotateGizmo extends Object3D {
|
|
6
6
|
children: DIVERadialHandle[];
|
|
7
7
|
private _controller;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Object3D, Vector3 } from 'three';
|
|
2
2
|
import { DIVEHoverable } from '../../../interfaces/Hoverable.ts';
|
|
3
|
-
import { OrbitController } from '../../../
|
|
3
|
+
import { OrbitController } from '../../../plugins/orbitcontroller/index.ts';
|
|
4
4
|
import { DIVEScaleHandle } from '../handles/ScaleHandle.ts';
|
|
5
|
-
import { DraggableEvent } from '../../../
|
|
5
|
+
import { DraggableEvent } from '../../../plugins/toolbox/index.ts';
|
|
6
6
|
export declare class DIVEScaleGizmo extends Object3D implements DIVEHoverable {
|
|
7
7
|
readonly isHoverable: true;
|
|
8
8
|
children: DIVEScaleHandle[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Object3D } from 'three';
|
|
2
|
-
import { OrbitController } from '../../../
|
|
2
|
+
import { OrbitController } from '../../../plugins/orbitcontroller/index.ts';
|
|
3
3
|
import { DIVEAxisHandle } from '../handles/AxisHandle.ts';
|
|
4
|
-
import { DraggableEvent } from '../../../
|
|
4
|
+
import { DraggableEvent } from '../../../plugins/toolbox/index.ts';
|
|
5
5
|
export declare class DIVETranslateGizmo extends Object3D {
|
|
6
6
|
private _controller;
|
|
7
7
|
set debug(value: boolean);
|
|
@@ -7,8 +7,8 @@ export declare class DIVEGroup extends DIVENode {
|
|
|
7
7
|
get members(): Object3D[];
|
|
8
8
|
private _lines;
|
|
9
9
|
constructor();
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
setPosition(position: Vector3Like): void;
|
|
11
|
+
setLinesVisibility(visible: boolean, object?: Object3D): void;
|
|
12
12
|
attach(object: DIVESceneObject): this;
|
|
13
13
|
/**
|
|
14
14
|
* Removes an object from the group.
|
|
@@ -16,7 +16,7 @@ export declare class DIVEGroup extends DIVENode {
|
|
|
16
16
|
* @returns The group instance.
|
|
17
17
|
*/
|
|
18
18
|
remove(object: DIVESceneObject): this;
|
|
19
|
-
|
|
19
|
+
updateLineTo(object: Object3D): void;
|
|
20
20
|
/**
|
|
21
21
|
* Creates a line for visualization.
|
|
22
22
|
*/
|
|
@@ -24,5 +24,5 @@ export declare class DIVEGroup extends DIVENode {
|
|
|
24
24
|
/**
|
|
25
25
|
* Updates a line to the object.
|
|
26
26
|
*/
|
|
27
|
-
private
|
|
27
|
+
private _updateLineTo;
|
|
28
28
|
}
|
|
@@ -11,7 +11,7 @@ export declare class DIVEAmbientLight extends Object3D {
|
|
|
11
11
|
readonly isDIVEAmbientLight: true;
|
|
12
12
|
private _light;
|
|
13
13
|
constructor();
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
setColor(color: Color): void;
|
|
15
|
+
setIntensity(intensity: number): void;
|
|
16
|
+
setEnabled(enabled: boolean): void;
|
|
17
17
|
}
|
|
@@ -20,9 +20,9 @@ export declare class DIVEPointLight extends Object3D implements DIVESelectable,
|
|
|
20
20
|
private light;
|
|
21
21
|
private mesh;
|
|
22
22
|
constructor();
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
setColor(color: Color): void;
|
|
24
|
+
setIntensity(intensity: number): void;
|
|
25
|
+
setEnabled(enabled: boolean): void;
|
|
26
26
|
onMove(): void;
|
|
27
27
|
onSelect(): void;
|
|
28
28
|
onDeselect(): void;
|
|
@@ -12,7 +12,7 @@ export declare class DIVESceneLight extends Object3D {
|
|
|
12
12
|
private _hemiLight;
|
|
13
13
|
private _dirLight;
|
|
14
14
|
constructor();
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
setColor(color: Color): void;
|
|
16
|
+
setIntensity(intensity: number): void;
|
|
17
|
+
setEnabled(enabled: boolean): void;
|
|
18
18
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Object3D } from 'three';
|
|
2
|
-
import {
|
|
2
|
+
import { MaterialSchema } from '../../index.ts';
|
|
3
3
|
import { DIVENode } from '../node/Node.ts';
|
|
4
4
|
/**
|
|
5
5
|
* A basic model class.
|
|
@@ -14,8 +14,11 @@ export declare class DIVEModel extends DIVENode {
|
|
|
14
14
|
readonly isDIVEModel: true;
|
|
15
15
|
private _mesh;
|
|
16
16
|
private _material;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
private _assetLoader;
|
|
18
|
+
private _getAssetLoader;
|
|
19
|
+
setFromURL(url: string): Promise<void>;
|
|
20
|
+
setFromGLTF(gltf: Object3D): void;
|
|
21
|
+
setMaterial(material: Partial<MaterialSchema>): void;
|
|
22
|
+
placeOnFloor(): void;
|
|
23
|
+
dropIt(): void;
|
|
21
24
|
}
|
|
@@ -2,18 +2,19 @@ import { Box3, Object3D, Vector3, Vector3Like } from 'three';
|
|
|
2
2
|
import { DIVEMovable } from '../../interfaces/Movable.ts';
|
|
3
3
|
import { DIVESelectable } from '../../interfaces/Selectable.ts';
|
|
4
4
|
import { TransformControls } from 'three/examples/jsm/controls/TransformControls.ts';
|
|
5
|
-
declare
|
|
6
|
-
|
|
5
|
+
export declare class DIVENode extends Object3D implements DIVESelectable, DIVEMovable {
|
|
6
|
+
readonly isSelectable: true;
|
|
7
|
+
readonly isMovable: true;
|
|
7
8
|
readonly isDIVENode: true;
|
|
8
9
|
gizmo: TransformControls | null;
|
|
9
10
|
protected _positionWorldBuffer: Vector3;
|
|
10
11
|
protected _boundingBox: Box3;
|
|
11
12
|
constructor();
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
setPosition(position: Vector3Like): void;
|
|
14
|
+
setRotation(rotation: Vector3Like): void;
|
|
15
|
+
setScale(scale: Vector3Like): void;
|
|
16
|
+
setVisibility(visible: boolean): void;
|
|
17
|
+
setToWorldOrigin(): void;
|
|
17
18
|
/**
|
|
18
19
|
* Can be called when the object is moved from a foreign object (gizmo, parent, etc.) to update the object's position.
|
|
19
20
|
*/
|
|
@@ -21,4 +22,3 @@ export declare class DIVENode extends DIVENode_base {
|
|
|
21
22
|
onSelect(): void;
|
|
22
23
|
onDeselect(): void;
|
|
23
24
|
}
|
|
24
|
-
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DIVENode } from '../node/Node.ts';
|
|
2
|
-
import {
|
|
2
|
+
import { GeometrySchema, MaterialSchema } from '../../index.ts';
|
|
3
3
|
/**
|
|
4
4
|
* A basic model class.
|
|
5
5
|
*
|
|
@@ -13,10 +13,10 @@ export declare class DIVEPrimitive extends DIVENode {
|
|
|
13
13
|
readonly isDIVEPrimitive: true;
|
|
14
14
|
private _mesh;
|
|
15
15
|
constructor();
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
setGeometry(geometry: GeometrySchema): void;
|
|
17
|
+
setMaterial(material: Partial<MaterialSchema>): void;
|
|
18
|
+
placeOnFloor(): void;
|
|
19
|
+
dropIt(): void;
|
|
20
20
|
private assembleGeometry;
|
|
21
21
|
private createCylinderGeometry;
|
|
22
22
|
private createSphereGeometry;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Box3, Object3D } from 'three';
|
|
2
|
-
import {
|
|
2
|
+
import { EntitySchema, EntityTypeSchema, MinimalSchema, PartialSchema } from '../../index.ts';
|
|
3
3
|
import { DIVESceneObject } from '../../types/index.ts';
|
|
4
4
|
import { DIVEFloor } from '../floor/Floor.ts';
|
|
5
5
|
/**
|
|
@@ -11,36 +11,24 @@ export declare class DIVERoot extends Object3D {
|
|
|
11
11
|
readonly isDIVERoot: true;
|
|
12
12
|
get floor(): DIVEFloor;
|
|
13
13
|
private _floor;
|
|
14
|
-
private _assetLoader;
|
|
15
|
-
private _getAssetLoader;
|
|
16
14
|
constructor();
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
computeSceneBB(): Box3;
|
|
16
|
+
getSceneObject<E extends EntityTypeSchema>(object: Partial<EntitySchema> & {
|
|
19
17
|
id: string;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
private
|
|
35
|
-
private
|
|
36
|
-
private updatePrimitive;
|
|
37
|
-
private updateGroup;
|
|
38
|
-
private deleteLight;
|
|
39
|
-
private deleteModel;
|
|
40
|
-
private deletePrimitive;
|
|
41
|
-
private deleteGroup;
|
|
42
|
-
private placeOnFloor;
|
|
43
|
-
private setParent;
|
|
44
|
-
private detachTransformControls;
|
|
45
|
-
private findScene;
|
|
18
|
+
entityType: E;
|
|
19
|
+
}): DIVESceneObject<E> | undefined;
|
|
20
|
+
addSceneObject(object: EntitySchema): DIVESceneObject | undefined;
|
|
21
|
+
updateSceneObject(object: PartialSchema): void;
|
|
22
|
+
deleteSceneObject(object: MinimalSchema<EntitySchema>): void;
|
|
23
|
+
private _updateLight;
|
|
24
|
+
private _updateModel;
|
|
25
|
+
private _updatePrimitive;
|
|
26
|
+
private _updateGroup;
|
|
27
|
+
private _deleteLight;
|
|
28
|
+
private _deleteModel;
|
|
29
|
+
private _deletePrimitive;
|
|
30
|
+
private _deleteGroup;
|
|
31
|
+
private _setParent;
|
|
32
|
+
private _detachTransformControls;
|
|
33
|
+
private _findScene;
|
|
46
34
|
}
|
package/build/src/core/Dive.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OrbitControllerSettings } from '../
|
|
1
|
+
import { OrbitControllerSettings } from '../plugins/orbitcontroller/index.ts';
|
|
2
2
|
import { DIVEEngine, EngineSettings } from '../engine/Engine.ts';
|
|
3
3
|
declare global {
|
|
4
4
|
interface Window {
|
|
@@ -15,10 +15,10 @@ declare global {
|
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
export type DIVESettings = EngineSettings & {
|
|
18
|
-
/** Settings for
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
export declare const DIVEDefaultSettings:
|
|
18
|
+
/** Settings for modules */
|
|
19
|
+
useLocalDRACOLoader?: boolean;
|
|
20
|
+
} & Partial<OrbitControllerSettings>;
|
|
21
|
+
export declare const DIVEDefaultSettings: DIVESettings;
|
|
22
22
|
/**
|
|
23
23
|
* #### DIVE
|
|
24
24
|
* is the main class of the DIVE framework.
|
|
@@ -33,7 +33,7 @@ export declare const DIVEDefaultSettings: Required<DIVESettings>;
|
|
|
33
33
|
*
|
|
34
34
|
* myWrapper.appendChild(dive.Canvas);
|
|
35
35
|
*
|
|
36
|
-
* dive.Communication.
|
|
36
|
+
* dive.Communication.subscribe('GET_ALL_SCENE_DATA', () => {
|
|
37
37
|
* // do something
|
|
38
38
|
* }));
|
|
39
39
|
*
|
|
@@ -45,6 +45,7 @@ export declare class DIVE {
|
|
|
45
45
|
static QuickView(uri: string, settings?: Partial<DIVESettings & {
|
|
46
46
|
lightIntensity?: number;
|
|
47
47
|
}>): Promise<DIVE>;
|
|
48
|
+
private _instanceId;
|
|
48
49
|
private _settings;
|
|
49
50
|
get engine(): DIVEEngine;
|
|
50
51
|
private _engine;
|
|
@@ -53,5 +54,5 @@ export declare class DIVE {
|
|
|
53
54
|
get canvas(): HTMLCanvasElement;
|
|
54
55
|
setCanvas(canvas: HTMLCanvasElement): void;
|
|
55
56
|
constructor(settings?: Partial<DIVESettings>);
|
|
56
|
-
|
|
57
|
+
dispose(): Promise<void>;
|
|
57
58
|
}
|
|
@@ -7,12 +7,8 @@ export type EngineSettings = {
|
|
|
7
7
|
autoStart: boolean;
|
|
8
8
|
/** Whether to display coordinate axes in the scene */
|
|
9
9
|
displayAxes: boolean;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
/** Settings for the render pipeline */
|
|
13
|
-
renderer: Partial<DIVERenderPipelineSettings>;
|
|
14
|
-
};
|
|
15
|
-
export declare const EngineDefaultSettings: Required<EngineSettings>;
|
|
10
|
+
} & Partial<DIVEPerspectiveCameraSettings> & Partial<DIVERenderPipelineSettings>;
|
|
11
|
+
export declare const EngineDefaultSettings: EngineSettings;
|
|
16
12
|
export declare class DIVEEngine {
|
|
17
13
|
private _renderer;
|
|
18
14
|
private _scene;
|
|
@@ -13,6 +13,7 @@ export declare class DIVEClock {
|
|
|
13
13
|
stop(): void;
|
|
14
14
|
setRenderer(renderer: DIVERenderPipeline): void;
|
|
15
15
|
addTicker(ticker: DIVETicker): void;
|
|
16
|
+
hasTicker(ticker: DIVETicker): boolean;
|
|
16
17
|
removeTicker(ticker: DIVETicker): void;
|
|
17
18
|
dispose(): void;
|
|
18
19
|
private _tick;
|