@shopware-ag/dive 2.0.3 → 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-DNwNkGms.cjs → AssetCache-BQRROeKj.cjs} +1 -1
- package/build/chunks/{AssetCache-BpdA1GQf.mjs → AssetCache-D-tIG2cD.mjs} +1 -1
- package/build/chunks/{AssetLoader-Ct1Lh-P1.cjs → AssetLoader-CoPAaRfM.cjs} +1 -1
- package/build/chunks/{AssetLoader-DJKZltSW.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-DxVRSIoF.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 +1 -1
- 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-BawiSSTm.mjs +0 -1059
- package/build/chunks/FileTypes-DYdmsV-9.cjs +0 -30
- 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-bi-2zWyT.cjs +0 -1
- package/build/chunks/VisibilityLayerMask-BI7jPKdx.cjs +0 -1
- package/build/chunks/VisibilityLayerMask-CXgt1fJc.mjs +0 -8
- package/build/chunks/package-Cfclzhv-.cjs +0 -1
- package/build/chunks/package-YeeRzGDk.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
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import { EventDispatcher, MOUSE, Object3D, OrthographicCamera, TOUCH, Vector3, Vector3Like } from 'three';
|
|
2
|
+
import { DIVEPerspectiveCamera, DIVETicker, BoundingBox } from '../../../index.ts';
|
|
3
|
+
import { OrbitControllerState } from '../types/index.ts';
|
|
4
|
+
export type OrbitControllerSettings = {
|
|
5
|
+
enableDamping?: boolean;
|
|
6
|
+
dampingFactor?: number;
|
|
7
|
+
enabled?: boolean;
|
|
8
|
+
target?: Vector3;
|
|
9
|
+
minDistance?: number;
|
|
10
|
+
maxDistance?: number;
|
|
11
|
+
minZoom?: number;
|
|
12
|
+
maxZoom?: number;
|
|
13
|
+
minPolarAngle?: number;
|
|
14
|
+
maxPolarAngle?: number;
|
|
15
|
+
minAzimuthAngle?: number;
|
|
16
|
+
maxAzimuthAngle?: number;
|
|
17
|
+
enableZoom?: boolean;
|
|
18
|
+
zoomSpeed?: number;
|
|
19
|
+
enableRotate?: boolean;
|
|
20
|
+
rotateSpeed?: number;
|
|
21
|
+
enablePan?: boolean;
|
|
22
|
+
panSpeed?: number;
|
|
23
|
+
screenSpacePanning?: boolean;
|
|
24
|
+
keyPanSpeed?: number;
|
|
25
|
+
autoRotate?: boolean;
|
|
26
|
+
autoRotateSpeed?: number;
|
|
27
|
+
keys?: {
|
|
28
|
+
LEFT: string;
|
|
29
|
+
UP: string;
|
|
30
|
+
RIGHT: string;
|
|
31
|
+
BOTTOM: string;
|
|
32
|
+
};
|
|
33
|
+
mouseButtons?: {
|
|
34
|
+
LEFT: MOUSE;
|
|
35
|
+
MIDDLE: MOUSE;
|
|
36
|
+
RIGHT: MOUSE;
|
|
37
|
+
};
|
|
38
|
+
touches?: {
|
|
39
|
+
ONE: TOUCH;
|
|
40
|
+
TWO: TOUCH;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
export declare const OrbitControllerDefaultSettings: Required<OrbitControllerSettings>;
|
|
44
|
+
type EventMap = {
|
|
45
|
+
dispose: {
|
|
46
|
+
type: 'dispose';
|
|
47
|
+
};
|
|
48
|
+
change: {
|
|
49
|
+
type: 'change';
|
|
50
|
+
};
|
|
51
|
+
start: {
|
|
52
|
+
type: 'start';
|
|
53
|
+
};
|
|
54
|
+
end: {
|
|
55
|
+
type: 'end';
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
export declare class OrbitController extends EventDispatcher<EventMap> implements DIVETicker {
|
|
59
|
+
static readonly DEFAULT_ZOOM_FACTOR = 1;
|
|
60
|
+
object: DIVEPerspectiveCamera | OrthographicCamera;
|
|
61
|
+
get domElement(): HTMLCanvasElement;
|
|
62
|
+
domElements: HTMLCanvasElement[];
|
|
63
|
+
enabled: boolean;
|
|
64
|
+
target: Vector3;
|
|
65
|
+
minDistance: number;
|
|
66
|
+
maxDistance: number;
|
|
67
|
+
minZoom: number;
|
|
68
|
+
maxZoom: number;
|
|
69
|
+
minPolarAngle: number;
|
|
70
|
+
maxPolarAngle: number;
|
|
71
|
+
minAzimuthAngle: number;
|
|
72
|
+
maxAzimuthAngle: number;
|
|
73
|
+
enableDamping: boolean;
|
|
74
|
+
dampingFactor: number;
|
|
75
|
+
enableZoom: boolean;
|
|
76
|
+
zoomSpeed: number;
|
|
77
|
+
enableRotate: boolean;
|
|
78
|
+
rotateSpeed: number;
|
|
79
|
+
enablePan: boolean;
|
|
80
|
+
panSpeed: number;
|
|
81
|
+
screenSpacePanning: boolean;
|
|
82
|
+
keyPanSpeed: number;
|
|
83
|
+
autoRotate: boolean;
|
|
84
|
+
autoRotateSpeed: number;
|
|
85
|
+
keys: {
|
|
86
|
+
LEFT: string;
|
|
87
|
+
UP: string;
|
|
88
|
+
RIGHT: string;
|
|
89
|
+
BOTTOM: string;
|
|
90
|
+
};
|
|
91
|
+
mouseButtons: {
|
|
92
|
+
LEFT: MOUSE;
|
|
93
|
+
MIDDLE: MOUSE;
|
|
94
|
+
RIGHT: MOUSE;
|
|
95
|
+
};
|
|
96
|
+
touches: {
|
|
97
|
+
ONE: TOUCH;
|
|
98
|
+
TWO: TOUCH;
|
|
99
|
+
};
|
|
100
|
+
target0: Vector3;
|
|
101
|
+
position0: Vector3;
|
|
102
|
+
zoom0: number;
|
|
103
|
+
uuid: string;
|
|
104
|
+
private state;
|
|
105
|
+
private readonly EPS;
|
|
106
|
+
private readonly spherical;
|
|
107
|
+
private readonly sphericalDelta;
|
|
108
|
+
private scale;
|
|
109
|
+
private readonly panOffset;
|
|
110
|
+
private zoomChanged;
|
|
111
|
+
private readonly rotateStart;
|
|
112
|
+
private readonly rotateEnd;
|
|
113
|
+
private readonly rotateDelta;
|
|
114
|
+
private readonly panStart;
|
|
115
|
+
private readonly panEnd;
|
|
116
|
+
private readonly panDelta;
|
|
117
|
+
private readonly dollyStart;
|
|
118
|
+
private readonly dollyEnd;
|
|
119
|
+
private readonly dollyDelta;
|
|
120
|
+
private readonly pointers;
|
|
121
|
+
private readonly pointerPositions;
|
|
122
|
+
private readonly offset;
|
|
123
|
+
private readonly quat;
|
|
124
|
+
private readonly quatInverse;
|
|
125
|
+
private readonly lastPosition;
|
|
126
|
+
private readonly lastQuaternion;
|
|
127
|
+
private readonly lastTarget;
|
|
128
|
+
constructor(camera: DIVEPerspectiveCamera | OrthographicCamera, domElements: HTMLCanvasElement | HTMLCanvasElement[], settings?: OrbitControllerSettings);
|
|
129
|
+
tick(): void;
|
|
130
|
+
getPolarAngle(): number;
|
|
131
|
+
getAzimuthalAngle(): number;
|
|
132
|
+
getDistance(): number;
|
|
133
|
+
saveState(): void;
|
|
134
|
+
reset(): void;
|
|
135
|
+
update(): boolean;
|
|
136
|
+
dispose(): void;
|
|
137
|
+
addDomElements(...domElements: HTMLCanvasElement[]): void;
|
|
138
|
+
removeDomElements(...domElements: HTMLCanvasElement[]): void;
|
|
139
|
+
setDomElements(...domElements: HTMLCanvasElement[]): void;
|
|
140
|
+
computeEncompassingView(bb: BoundingBox, padding?: number): {
|
|
141
|
+
position: Vector3Like;
|
|
142
|
+
target: Vector3Like;
|
|
143
|
+
};
|
|
144
|
+
focusObject(object: Object3D, padding?: number): void;
|
|
145
|
+
zoomIn(by?: number): void;
|
|
146
|
+
zoomOut(by?: number): void;
|
|
147
|
+
getState(): OrbitControllerState;
|
|
148
|
+
setState(state: OrbitControllerState): void;
|
|
149
|
+
private addEventListeners;
|
|
150
|
+
private removeEventListeners;
|
|
151
|
+
private getAutoRotationAngle;
|
|
152
|
+
private getZoomScale;
|
|
153
|
+
private rotateLeft;
|
|
154
|
+
private rotateUp;
|
|
155
|
+
private panLeft;
|
|
156
|
+
private panUp;
|
|
157
|
+
private pan;
|
|
158
|
+
private dollyIn;
|
|
159
|
+
private dollyOut;
|
|
160
|
+
private handleMouseDownRotate;
|
|
161
|
+
private handleMouseDownDolly;
|
|
162
|
+
private handleMouseDownPan;
|
|
163
|
+
private handleMouseMoveRotate;
|
|
164
|
+
private handleMouseMoveDolly;
|
|
165
|
+
private handleMouseMovePan;
|
|
166
|
+
private handleMouseWheel;
|
|
167
|
+
private handleKeyDown;
|
|
168
|
+
private handleTouchStartRotate;
|
|
169
|
+
private handleTouchStartPan;
|
|
170
|
+
private handleTouchStartDolly;
|
|
171
|
+
private handleTouchStartDollyPan;
|
|
172
|
+
private handleTouchStartDollyRotate;
|
|
173
|
+
private handleTouchMoveRotate;
|
|
174
|
+
private handleTouchMovePan;
|
|
175
|
+
private handleTouchMoveDolly;
|
|
176
|
+
private handleTouchMoveDollyPan;
|
|
177
|
+
private handleTouchMoveDollyRotate;
|
|
178
|
+
private onMouseDown;
|
|
179
|
+
private onMouseMove;
|
|
180
|
+
private onMouseWheel;
|
|
181
|
+
private onKeyDown;
|
|
182
|
+
private onTouchStart;
|
|
183
|
+
private onTouchMove;
|
|
184
|
+
private onPointerDown;
|
|
185
|
+
private onPointerMove;
|
|
186
|
+
private onPointerUp;
|
|
187
|
+
private onPointerCancel;
|
|
188
|
+
private onContextMenu;
|
|
189
|
+
private addPointer;
|
|
190
|
+
private removePointer;
|
|
191
|
+
private trackPointer;
|
|
192
|
+
private getSecondPointer;
|
|
193
|
+
private isTrackingPointer;
|
|
194
|
+
}
|
|
195
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './OrbitControllerState.types.ts';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../chunks/FileTypes-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../chunks/FileTypes-B2n185uW.cjs");exports.OrientationDisplay=e.OrientationDisplay;exports.OrientationDisplayAxes=e.OrientationDisplayAxes;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from '
|
|
2
|
-
export
|
|
1
|
+
export * from './src/OrientationDisplay.ts';
|
|
2
|
+
export * from './src/axes/Axes.ts';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DIVERenderer, DIVETicker, DIVEScene, DIVEPerspectiveCamera } from '../../../index.ts';
|
|
2
2
|
/**
|
|
3
3
|
* Shows the scene axes in the bottom left corner of the screen.
|
|
4
4
|
*
|
|
@@ -12,7 +12,7 @@ export declare class OrientationDisplay implements DIVETicker {
|
|
|
12
12
|
private _axes;
|
|
13
13
|
private _orthographicCamera;
|
|
14
14
|
private _restoreViewport;
|
|
15
|
-
constructor(_renderer:
|
|
15
|
+
constructor(_renderer: DIVERenderer, _scene: DIVEScene, _camera: DIVEPerspectiveCamera);
|
|
16
16
|
tick(): void;
|
|
17
17
|
dispose(): void;
|
|
18
18
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../chunks/FileTypes-B2n185uW.cjs");require("three");const i={...r.DIVEDefaultSettings,lightIntensity:1},n=async(d,e)=>{const o=new r.DIVE(e);o.mainView.camera.position.set(0,1,2),o.scene.setBackground((e==null?void 0:e.backgroundColor)??i.backgroundColor),o.scene.grid.setVisibility((e==null?void 0:e.displayGrid)??i.displayGrid),o.scene.root.floor.setVisibility((e==null?void 0:e.displayFloor)??i.displayFloor);const a=new r.DIVESceneLight;a.setIntensity((e==null?void 0:e.lightIntensity)??1),o.scene.root.add(a);const l=await new r.DIVEModel().setFromURL(d);o.scene.root.add(l);const c=new r.OrbitController(o.mainView.camera,o.mainView.canvas);return c.focusObject(l),o.clock.addTicker(c),Object.assign(o,{orbitController:c})};exports.QuickView=n;exports.QuickViewDefaultSettings=i;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { D as d, d as n, e as V, f as m, a as w } from "../../chunks/FileTypes-CTHWb2IV.mjs";
|
|
2
|
+
import "three";
|
|
3
|
+
const c = {
|
|
4
|
+
...d,
|
|
5
|
+
lightIntensity: 1
|
|
6
|
+
}, b = async (l, o) => {
|
|
7
|
+
const a = new n(o);
|
|
8
|
+
a.mainView.camera.position.set(0, 1, 2), a.scene.setBackground(
|
|
9
|
+
(o == null ? void 0 : o.backgroundColor) ?? c.backgroundColor
|
|
10
|
+
), a.scene.grid.setVisibility(
|
|
11
|
+
(o == null ? void 0 : o.displayGrid) ?? c.displayGrid
|
|
12
|
+
), a.scene.root.floor.setVisibility(
|
|
13
|
+
(o == null ? void 0 : o.displayFloor) ?? c.displayFloor
|
|
14
|
+
);
|
|
15
|
+
const e = new V();
|
|
16
|
+
e.setIntensity((o == null ? void 0 : o.lightIntensity) ?? 1), a.scene.root.add(e);
|
|
17
|
+
const i = await new m().setFromURL(l);
|
|
18
|
+
a.scene.root.add(i);
|
|
19
|
+
const r = new w(
|
|
20
|
+
a.mainView.camera,
|
|
21
|
+
a.mainView.canvas
|
|
22
|
+
);
|
|
23
|
+
return r.focusObject(i), a.clock.addTicker(r), Object.assign(a, { orbitController: r });
|
|
24
|
+
};
|
|
25
|
+
export {
|
|
26
|
+
b as QuickView,
|
|
27
|
+
c as QuickViewDefaultSettings
|
|
28
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DIVE } from '../../../index.ts';
|
|
2
|
+
import { OrbitController } from '../../orbitcontroller/index.ts';
|
|
3
|
+
import { QuickViewSettings } from '../types/index.ts';
|
|
4
|
+
export declare const QuickViewDefaultSettings: Required<QuickViewSettings>;
|
|
5
|
+
export type QuickView = DIVE & {
|
|
6
|
+
orbitController: OrbitController;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
* @param uri - The URI of the 3D model to display in QuickView
|
|
11
|
+
* @param settings - The settings for the QuickView
|
|
12
|
+
* @returns The DIVE instance with the orbit controller - { ...DIVE, orbitController: OrbitController }
|
|
13
|
+
*/
|
|
14
|
+
export declare const QuickView: (uri: string, settings?: Partial<QuickViewSettings>) => Promise<QuickView>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './QuickViewSettings.ts';
|