@cognite/reveal 4.10.7 → 4.11.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 +1 -1
- package/dist/index.js +75 -71
- package/dist/index.js.map +1 -1
- package/dist/packages/360-images/src/collection/DefaultImage360Collection.d.ts +5 -1
- package/dist/packages/360-images/src/collection/Image360Collection.d.ts +10 -0
- package/dist/packages/360-images/src/collection/Image360CollectionFactory.d.ts +2 -1
- package/dist/packages/360-images/src/entity/Image360Entity.d.ts +4 -2
- package/dist/packages/360-images/src/entity/Image360VisualizationBox.d.ts +2 -0
- package/dist/packages/360-images/src/icons/IconCollection.d.ts +3 -1
- package/dist/packages/3d-overlays/src/Overlay3DIcon.d.ts +10 -8
- package/dist/packages/3d-overlays/src/OverlayPointsObject.d.ts +5 -1
- package/dist/packages/api/src/api-helpers/Image360ApiHelper.d.ts +2 -6
- package/dist/packages/api/src/public/migration/Cognite3DViewer.d.ts +1 -1
- package/dist/packages/camera-manager/index.d.ts +1 -0
- package/dist/packages/camera-manager/src/Flexible/FlexibleCameraManager.d.ts +2 -2
- package/dist/packages/camera-manager/src/Flexible/FlexibleControls.d.ts +11 -3
- package/dist/packages/camera-manager/src/Flexible/FlexibleControlsOptions.d.ts +4 -0
- package/dist/packages/camera-manager/src/Flexible/IFlexibleCameraManager.d.ts +1 -0
- package/dist/packages/camera-manager/src/Flexible/moveCamera.d.ts +1 -1
- package/dist/packages/camera-manager/src/utils/getWheelDelta.d.ts +4 -0
- package/dist/packages/utilities/src/customObject/CustomObjectIntersection.d.ts +1 -1
- package/package.json +3 -3
|
@@ -10,6 +10,7 @@ import { Image360AnnotationAppearance } from '../annotation/types';
|
|
|
10
10
|
import { IdEither } from '@cognite/sdk';
|
|
11
11
|
import { Image360DataProvider } from '../../../data-providers';
|
|
12
12
|
import { Image360AnnotationFilter } from '../annotation/Image360AnnotationFilter';
|
|
13
|
+
import { Matrix4 } from 'three';
|
|
13
14
|
/**
|
|
14
15
|
* Default implementation of {@link Image360Collection}. Used for events when entering
|
|
15
16
|
* and exiting 360 image mode
|
|
@@ -33,6 +34,7 @@ export declare class DefaultImage360Collection implements Image360Collection {
|
|
|
33
34
|
private _isCollectionVisible;
|
|
34
35
|
private readonly _collectionId;
|
|
35
36
|
private readonly _collectionLabel;
|
|
37
|
+
private readonly _setNeedsRedraw;
|
|
36
38
|
get id(): string;
|
|
37
39
|
get label(): string | undefined;
|
|
38
40
|
get targetRevisionDate(): Date | undefined;
|
|
@@ -45,7 +47,9 @@ export declare class DefaultImage360Collection implements Image360Collection {
|
|
|
45
47
|
image360Exited: EventTrigger<Image360ExitedDelegate>;
|
|
46
48
|
};
|
|
47
49
|
get isCollectionVisible(): boolean;
|
|
48
|
-
constructor(collectionId: string, collectionLabel: string | undefined, entities: Image360Entity[], icons: IconCollection, annotationFilter: Image360AnnotationFilter, image360DataProvider: Image360DataProvider);
|
|
50
|
+
constructor(collectionId: string, collectionLabel: string | undefined, entities: Image360Entity[], icons: IconCollection, annotationFilter: Image360AnnotationFilter, image360DataProvider: Image360DataProvider, setNeedsRedraw: () => void);
|
|
51
|
+
getModelTransformation(out?: Matrix4): Matrix4;
|
|
52
|
+
setModelTransformation(matrix: THREE.Matrix4): void;
|
|
49
53
|
/**
|
|
50
54
|
* Subscribes to events on 360 Image datasets. There are several event types:
|
|
51
55
|
* 'image360Entered' - Subscribes to a event for entering 360 image mode.
|
|
@@ -8,6 +8,7 @@ import { Image360Revision } from '../entity/Image360Revision';
|
|
|
8
8
|
import { IdEither } from '@cognite/sdk';
|
|
9
9
|
import { Image360Annotation } from '../annotation/Image360Annotation';
|
|
10
10
|
import { ImageAssetLinkAnnotationInfo } from '../../../data-providers';
|
|
11
|
+
import { Matrix4 } from 'three';
|
|
11
12
|
/**
|
|
12
13
|
* Filter for finding annotations related to an asset
|
|
13
14
|
*/
|
|
@@ -74,6 +75,15 @@ export interface Image360Collection {
|
|
|
74
75
|
* If undefined, the most recent revision will be loaded.
|
|
75
76
|
*/
|
|
76
77
|
targetRevisionDate: Date | undefined;
|
|
78
|
+
/**
|
|
79
|
+
* Sets the transformation matrix to be applied to the collection.
|
|
80
|
+
* @param matrix The transformation matrix to be applied to the collection.
|
|
81
|
+
*/
|
|
82
|
+
setModelTransformation(matrix: Matrix4): void;
|
|
83
|
+
/**
|
|
84
|
+
* Gets the transformation matrix of the collection
|
|
85
|
+
*/
|
|
86
|
+
getModelTransformation(out?: Matrix4): Matrix4;
|
|
77
87
|
/**
|
|
78
88
|
* Specify parameters used to determine the number of icons that are visible when entering 360 Images.
|
|
79
89
|
* @param radius Only icons within the given radius will be made visible.
|
|
@@ -12,6 +12,7 @@ export declare class Image360CollectionFactory<T> {
|
|
|
12
12
|
private readonly _onBeforeSceneRendered;
|
|
13
13
|
private readonly _iconsOptions;
|
|
14
14
|
private readonly _device;
|
|
15
|
-
|
|
15
|
+
private readonly _setNeedsRedraw;
|
|
16
|
+
constructor(image360DataProvider: Image360Provider<T>, sceneHandler: SceneHandler, onBeforeSceneRendered: EventTrigger<BeforeSceneRenderedDelegate>, setNeedsRedraw: () => void, device: DeviceDescriptor, iconsOptions?: IconsOptions);
|
|
16
17
|
create(dataProviderFilter: T, postTransform: THREE.Matrix4, preMultipliedRotation: boolean, annotationFilter: Image360AnnotationFilterOptions): Promise<DefaultImage360Collection>;
|
|
17
18
|
}
|
|
@@ -10,11 +10,12 @@ import { Image360VisualizationBox } from './Image360VisualizationBox';
|
|
|
10
10
|
import { ImageAnnotationObject } from '../annotation/ImageAnnotationObject';
|
|
11
11
|
import { Overlay3DIcon } from '../../../3d-overlays';
|
|
12
12
|
import { Image360AnnotationFilter } from '../annotation/Image360AnnotationFilter';
|
|
13
|
-
import { Color } from 'three';
|
|
13
|
+
import { Color, Matrix4 } from 'three';
|
|
14
14
|
export declare class Image360Entity implements Image360 {
|
|
15
15
|
private readonly _revisions;
|
|
16
16
|
private readonly _imageMetadata;
|
|
17
|
-
private readonly
|
|
17
|
+
private readonly _modelTransform;
|
|
18
|
+
private readonly _worldTransform;
|
|
18
19
|
private readonly _image360Icon;
|
|
19
20
|
private readonly _image360VisualizationBox;
|
|
20
21
|
private _activeRevision;
|
|
@@ -47,6 +48,7 @@ export declare class Image360Entity implements Image360 {
|
|
|
47
48
|
* */
|
|
48
49
|
get label(): string | undefined;
|
|
49
50
|
constructor(image360Metadata: Historical360ImageSet, sceneHandler: SceneHandler, imageProvider: Image360DataProvider, annotationFilterer: Image360AnnotationFilter, transform: THREE.Matrix4, icon: Overlay3DIcon, device: DeviceDescriptor);
|
|
51
|
+
setWorldTransform(matrix: Matrix4): void;
|
|
50
52
|
/**
|
|
51
53
|
* List all historical images for this entity.
|
|
52
54
|
* @returns A list of available revisions.
|
|
@@ -17,6 +17,7 @@ export declare class Image360VisualizationBox implements Image360Visualization {
|
|
|
17
17
|
private readonly _textureLoader;
|
|
18
18
|
private readonly _faceMaterialOrder;
|
|
19
19
|
private readonly _annotationsGroup;
|
|
20
|
+
private readonly _localTransform;
|
|
20
21
|
get opacity(): number;
|
|
21
22
|
set opacity(alpha: number);
|
|
22
23
|
get visible(): boolean;
|
|
@@ -25,6 +26,7 @@ export declare class Image360VisualizationBox implements Image360Visualization {
|
|
|
25
26
|
set renderOrder(newRenderOrder: number);
|
|
26
27
|
setAnnotations(annotations: ImageAnnotationObject[]): void;
|
|
27
28
|
constructor(worldTransform: THREE.Matrix4, sceneHandler: SceneHandler, device: DeviceDescriptor);
|
|
29
|
+
setWorldTransform(matrix: THREE.Matrix4): void;
|
|
28
30
|
loadImages(textures: Image360Texture[]): void;
|
|
29
31
|
loadFaceTextures(faces: Image360Face[]): Promise<Image360Texture[]>;
|
|
30
32
|
unloadImages(): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright 2023 Cognite AS
|
|
3
3
|
*/
|
|
4
|
-
import { Vector3 } from 'three';
|
|
4
|
+
import { Matrix4, Vector3 } from 'three';
|
|
5
5
|
import { BeforeSceneRenderedDelegate, EventTrigger, SceneHandler } from '../../../utilities';
|
|
6
6
|
import { Overlay3DIcon } from '../../../3d-overlays';
|
|
7
7
|
export type IconCullingScheme = 'clustered' | 'proximity';
|
|
@@ -30,6 +30,8 @@ export declare class IconCollection {
|
|
|
30
30
|
setCullingScheme(scheme: IconCullingScheme): void;
|
|
31
31
|
set360IconCullingRestrictions(radius: number, pointLimit: number): void;
|
|
32
32
|
constructor(points: Vector3[], sceneHandler: SceneHandler, onBeforeSceneRendered: EventTrigger<BeforeSceneRenderedDelegate>, iconOptions?: IconsOptions);
|
|
33
|
+
setTransform(transform: Matrix4): void;
|
|
34
|
+
getTransform(out?: Matrix4): Matrix4;
|
|
33
35
|
private setIconClustersByLOD;
|
|
34
36
|
private computeProximityPoints;
|
|
35
37
|
private initializeImage360Icons;
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright 2022 Cognite AS
|
|
3
3
|
*/
|
|
4
|
-
import { PerspectiveCamera, Ray, Vector3, Color } from 'three';
|
|
4
|
+
import { PerspectiveCamera, Ray, Vector3, Color, Matrix4, Sprite, Camera, Vector2 } from 'three';
|
|
5
5
|
import { Overlay3D } from './Overlay3D';
|
|
6
6
|
import { DefaultOverlay3DContentType } from './OverlayCollection';
|
|
7
7
|
export type IconParameters = {
|
|
8
|
-
position:
|
|
9
|
-
color?:
|
|
8
|
+
position: Vector3;
|
|
9
|
+
color?: Color;
|
|
10
10
|
minPixelSize: number;
|
|
11
11
|
maxPixelSize: number;
|
|
12
12
|
iconRadius: number;
|
|
13
|
-
hoverSprite?:
|
|
13
|
+
hoverSprite?: Sprite;
|
|
14
14
|
};
|
|
15
15
|
export type SetAdaptiveScaleDelegate = (args: {
|
|
16
|
-
camera:
|
|
17
|
-
renderSize:
|
|
16
|
+
camera: Camera;
|
|
17
|
+
renderSize: Vector2;
|
|
18
18
|
domElement: HTMLElement;
|
|
19
19
|
}) => void;
|
|
20
20
|
export type ParametersChangeDelegate = (event: {
|
|
21
|
-
color:
|
|
21
|
+
color: Color;
|
|
22
22
|
visble: boolean;
|
|
23
23
|
}) => void;
|
|
24
24
|
export type SelectedDelegate = (event: {
|
|
@@ -40,6 +40,7 @@ export declare class Overlay3DIcon<ContentType = DefaultOverlay3DContentType> im
|
|
|
40
40
|
private _culled;
|
|
41
41
|
private _selected;
|
|
42
42
|
private _color;
|
|
43
|
+
private readonly _worldTransform;
|
|
43
44
|
private readonly _ndcPosition;
|
|
44
45
|
private readonly _events;
|
|
45
46
|
constructor(iconParameters: IconParameters, content: ContentType);
|
|
@@ -51,7 +52,7 @@ export declare class Overlay3DIcon<ContentType = DefaultOverlay3DContentType> im
|
|
|
51
52
|
get selected(): boolean;
|
|
52
53
|
updateHoverSpriteScale(): void;
|
|
53
54
|
updateAdaptiveScale(delegateArguments: {
|
|
54
|
-
renderSize:
|
|
55
|
+
renderSize: Vector2;
|
|
55
56
|
camera: PerspectiveCamera;
|
|
56
57
|
domElement: HTMLElement;
|
|
57
58
|
}): void;
|
|
@@ -64,6 +65,7 @@ export declare class Overlay3DIcon<ContentType = DefaultOverlay3DContentType> im
|
|
|
64
65
|
setVisible(visible: boolean): void;
|
|
65
66
|
getVisible(): boolean;
|
|
66
67
|
getPosition(): Vector3;
|
|
68
|
+
setWorldTransform(matrix: Matrix4): void;
|
|
67
69
|
intersect(ray: Ray): Vector3 | null;
|
|
68
70
|
dispose(): void;
|
|
69
71
|
private setupAdaptiveScaling;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright 2023 Cognite AS
|
|
3
3
|
*/
|
|
4
|
-
import { Color, DepthModes, Group, Texture, Vector3 } from 'three';
|
|
4
|
+
import { Color, DepthModes, Group, Matrix4, Texture, Vector3 } from 'three';
|
|
5
5
|
export type OverlayPointsParameters = {
|
|
6
6
|
spriteTexture: Texture;
|
|
7
7
|
maskTexture?: Texture;
|
|
@@ -19,8 +19,12 @@ export declare class OverlayPointsObject extends Group {
|
|
|
19
19
|
private readonly _positionAttribute;
|
|
20
20
|
private readonly _colorBuffer;
|
|
21
21
|
private readonly _colorAttribute;
|
|
22
|
+
private readonly _points;
|
|
23
|
+
private _modelTransform;
|
|
22
24
|
constructor(maxNumberOfPoints: number, materialParameters: OverlayPointsParameters);
|
|
23
25
|
setPoints(points: Vector3[], colors?: Color[]): void;
|
|
26
|
+
setTransform(transform: Matrix4): void;
|
|
27
|
+
getTransform(out?: Matrix4): Matrix4;
|
|
24
28
|
dispose(): void;
|
|
25
29
|
private initializePoints;
|
|
26
30
|
private createIconsMaterial;
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2022 Cognite AS
|
|
3
|
-
*/
|
|
4
|
-
import * as THREE from 'three';
|
|
5
1
|
import { CogniteClient, Metadata } from '@cognite/sdk';
|
|
6
2
|
import { Image360Collection, Image360Entity, Image360, IconsOptions, Image360RevisionEntity, Image360AnnotationIntersection, Image360AnnotationFilterOptions } from '../../../360-images';
|
|
7
3
|
import { Image360DataModelIdentifier } from '../../../data-providers';
|
|
@@ -17,7 +13,7 @@ export declare class Image360ApiHelper {
|
|
|
17
13
|
private readonly _eventHandlers;
|
|
18
14
|
private readonly _debouncePreLoad;
|
|
19
15
|
private readonly _activeCameraManager;
|
|
20
|
-
private readonly
|
|
16
|
+
private readonly _stationaryCameraManager;
|
|
21
17
|
private readonly _onBeforeSceneRenderedEvent;
|
|
22
18
|
private _cachedCameraManager;
|
|
23
19
|
constructor(cogniteClient: CogniteClient, sceneHandler: SceneHandler, domElement: HTMLElement, activeCameraManager: ProxyCameraManager, inputHandler: InputHandler, onBeforeSceneRendered: EventTrigger<BeforeSceneRenderedDelegate>, iconsOptions?: IconsOptions);
|
|
@@ -32,7 +28,7 @@ export declare class Image360ApiHelper {
|
|
|
32
28
|
private transition;
|
|
33
29
|
private tweenVisualizationAlpha;
|
|
34
30
|
private tweenVisualizationZoom;
|
|
35
|
-
private
|
|
31
|
+
private setStationaryCameraManager;
|
|
36
32
|
exit360Image(): void;
|
|
37
33
|
dispose(): void;
|
|
38
34
|
private findRevisionIdToEnter;
|
|
@@ -280,7 +280,7 @@ export declare class Cognite3DViewer {
|
|
|
280
280
|
* @param datasource The data data source which holds the references to the 360 image sets.
|
|
281
281
|
* @param dataModelIdentifier The search parameters to apply when querying Cognite Datamodels that contains the 360 images.
|
|
282
282
|
*/
|
|
283
|
-
add360ImageSet(datasource: 'datamodels', dataModelIdentifier: Image360DataModelIdentifier
|
|
283
|
+
add360ImageSet(datasource: 'datamodels', dataModelIdentifier: Image360DataModelIdentifier): Promise<Image360Collection>;
|
|
284
284
|
/**
|
|
285
285
|
* Adds a set of 360 images to the scene from the /events API in Cognite Data Fusion.
|
|
286
286
|
* @param datasource The CDF data source which holds the references to the 360 image sets.
|
|
@@ -17,4 +17,5 @@ export { FlexibleControlsOptions } from './src/Flexible/FlexibleControlsOptions'
|
|
|
17
17
|
export { FlexibleWheelZoomType } from './src/Flexible/FlexibleWheelZoomType';
|
|
18
18
|
export { FlexibleControlsType } from './src/Flexible/FlexibleControlsType';
|
|
19
19
|
export { FlexibleMouseActionType } from './src/Flexible/FlexibleMouseActionType';
|
|
20
|
+
export { asFlexibleCameraManager } from './src/Flexible/IFlexibleCameraManager';
|
|
20
21
|
export * from './src/types';
|
|
@@ -19,8 +19,6 @@ export declare class FlexibleCameraManager implements IFlexibleCameraManager {
|
|
|
19
19
|
private readonly _triggers;
|
|
20
20
|
private readonly _stopEventTrigger;
|
|
21
21
|
private readonly _controls;
|
|
22
|
-
private readonly _camera;
|
|
23
|
-
private readonly _domElement;
|
|
24
22
|
private readonly _inputHandler;
|
|
25
23
|
private readonly _markers?;
|
|
26
24
|
private readonly _currentBoundingBox;
|
|
@@ -65,6 +63,7 @@ export declare class FlexibleCameraManager implements IFlexibleCameraManager {
|
|
|
65
63
|
private getPosition;
|
|
66
64
|
private getTarget;
|
|
67
65
|
setPositionAndTarget(position: Vector3, target: Vector3): void;
|
|
66
|
+
setPosition(position: Vector3): void;
|
|
68
67
|
private readonly getPickedPointByPixelCoordinates;
|
|
69
68
|
private getTargetByBoundingBox;
|
|
70
69
|
private addEventListeners;
|
|
@@ -79,5 +78,6 @@ export declare class FlexibleCameraManager implements IFlexibleCameraManager {
|
|
|
79
78
|
private setTargetAndCameraPosition;
|
|
80
79
|
private updateCameraNearAndFar;
|
|
81
80
|
private updateControlsSensitivity;
|
|
81
|
+
static as(manager: CameraManager): FlexibleCameraManager | undefined;
|
|
82
82
|
}
|
|
83
83
|
export {};
|
|
@@ -14,6 +14,7 @@ import { GetPickedPointByPixelCoordinates } from './GetPickedPointByPixelCoordin
|
|
|
14
14
|
export declare class FlexibleControls extends EventDispatcher<FlexibleControlsEvent> {
|
|
15
15
|
private _isEnabled;
|
|
16
16
|
private _isInitialized;
|
|
17
|
+
private _isStationary;
|
|
17
18
|
temporarlyDisableKeyboard: boolean;
|
|
18
19
|
private readonly _options;
|
|
19
20
|
private readonly _domElement;
|
|
@@ -31,10 +32,11 @@ export declare class FlexibleControls extends EventDispatcher<FlexibleControlsEv
|
|
|
31
32
|
private readonly _reusableVector3s;
|
|
32
33
|
private readonly _rotationHelper;
|
|
33
34
|
private _mouseDragInfo;
|
|
34
|
-
constructor(camera: PerspectiveCamera |
|
|
35
|
+
constructor(camera: PerspectiveCamera | undefined, domElement: HTMLElement, options: FlexibleControlsOptions);
|
|
35
36
|
dispose(): void;
|
|
36
37
|
get options(): FlexibleControlsOptions;
|
|
37
38
|
get camera(): PerspectiveCamera | OrthographicCamera;
|
|
39
|
+
get domElement(): HTMLElement;
|
|
38
40
|
get target(): DampedVector3;
|
|
39
41
|
get cameraVector(): DampedSpherical;
|
|
40
42
|
get cameraPosition(): DampedVector3;
|
|
@@ -43,6 +45,9 @@ export declare class FlexibleControls extends EventDispatcher<FlexibleControlsEv
|
|
|
43
45
|
get isInitialized(): boolean;
|
|
44
46
|
set isInitialized(value: boolean);
|
|
45
47
|
get controlsType(): FlexibleControlsType;
|
|
48
|
+
get isStationary(): boolean;
|
|
49
|
+
set isStationary(value: boolean);
|
|
50
|
+
get fov(): number;
|
|
46
51
|
set getPickedPointByPixelCoordinates(getPickedPointByPixelCoordinates: GetPickedPointByPixelCoordinates | undefined);
|
|
47
52
|
get getPickedPointByPixelCoordinates(): GetPickedPointByPixelCoordinates | undefined;
|
|
48
53
|
getTarget(): Vector3;
|
|
@@ -56,7 +61,9 @@ export declare class FlexibleControls extends EventDispatcher<FlexibleControlsEv
|
|
|
56
61
|
getNormalizedPixelCoordinates(event: PointerEvent): Vector2;
|
|
57
62
|
setScrollCursor(value: Vector3 | undefined): void;
|
|
58
63
|
setTempTarget(value: Vector3 | undefined): void;
|
|
64
|
+
setFov(value: number, triggerCameraChangeEvent?: boolean): boolean;
|
|
59
65
|
setPositionAndTarget(position: Vector3, target: Vector3): void;
|
|
66
|
+
setPosition(position: Vector3): void;
|
|
60
67
|
setPositionAndDirection(position: Vector3, direction: Vector3): void;
|
|
61
68
|
setPositionAndRotation(position: Vector3, rotation: Quaternion): void;
|
|
62
69
|
setControlsType(controlsType: FlexibleControlsType): boolean;
|
|
@@ -69,11 +76,11 @@ export declare class FlexibleControls extends EventDispatcher<FlexibleControlsEv
|
|
|
69
76
|
triggerControlsTypeChangeEvent(): void;
|
|
70
77
|
rotateCameraTo(startDirection: Spherical, endDirection: Spherical, factor: number): void;
|
|
71
78
|
private readonly onPointerDown;
|
|
72
|
-
private
|
|
79
|
+
private onMouseDown;
|
|
73
80
|
private readonly onPointerMove;
|
|
74
81
|
private readonly onPointerUp;
|
|
75
82
|
private readonly onMouseWheel;
|
|
76
|
-
private
|
|
83
|
+
private onTouchStart;
|
|
77
84
|
private readonly onFocusChanged;
|
|
78
85
|
private readonly onContextMenu;
|
|
79
86
|
addEventListeners(): void;
|
|
@@ -95,6 +102,7 @@ export declare class FlexibleControls extends EventDispatcher<FlexibleControlsEv
|
|
|
95
102
|
private getTranslationByDirection;
|
|
96
103
|
private getTranslationByScrollCursor;
|
|
97
104
|
private getStep;
|
|
105
|
+
private zoomCameraByFov;
|
|
98
106
|
private handleKeyboard;
|
|
99
107
|
private handleRotationFromKeyboard;
|
|
100
108
|
private handleMoveFromKeyboard;
|
|
@@ -46,12 +46,16 @@ export declare class FlexibleControlsOptions {
|
|
|
46
46
|
pinchEpsilon: number;
|
|
47
47
|
pinchPanSpeed: number;
|
|
48
48
|
orthographicCameraDollyFactor: number;
|
|
49
|
+
minimumFov: number;
|
|
50
|
+
maximumFov: number;
|
|
51
|
+
defaultFov: number;
|
|
49
52
|
showTarget: boolean;
|
|
50
53
|
relativeMarkerSize: number;
|
|
51
54
|
outerMarkerColor: string;
|
|
52
55
|
innerMarkerColor: string;
|
|
53
56
|
get realMouseWheelAction(): FlexibleWheelZoomType;
|
|
54
57
|
get shouldPick(): boolean;
|
|
58
|
+
getLegalFov(fov: number): number;
|
|
55
59
|
getLegalAzimuthAngle(azimuthAngle: number): number;
|
|
56
60
|
getLegalPolarAngle(polarAngle: number): number;
|
|
57
61
|
getLegalSensitivity(controlsSensitivity: number): number;
|
|
@@ -42,3 +42,4 @@ export interface IFlexibleCameraManager extends CameraManager {
|
|
|
42
42
|
*/
|
|
43
43
|
removeControlsTypeChangeListener(callback: FlexibleControlsTypeChangeDelegate): void;
|
|
44
44
|
}
|
|
45
|
+
export declare function asFlexibleCameraManager(manager: CameraManager): IFlexibleCameraManager | undefined;
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { Vector3 } from 'three';
|
|
5
5
|
import { FlexibleCameraManager } from './FlexibleCameraManager';
|
|
6
|
-
export declare function
|
|
6
|
+
export declare function moveCameraPositionAndTargetTo(manager: FlexibleCameraManager, position: Vector3, target: Vector3, duration?: number): void;
|
|
7
7
|
export declare function moveCameraTargetTo(manager: FlexibleCameraManager, target: Vector3, duration?: number): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cognite/reveal",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.11.0",
|
|
4
4
|
"description": "WebGL based 3D viewer for CAD and point clouds processed in Cognite Data Fusion.",
|
|
5
5
|
"homepage": "https://github.com/cognitedata/reveal/tree/master/viewer",
|
|
6
6
|
"repository": {
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
"ts-jest": "29.1.2",
|
|
137
137
|
"ts-loader": "9.5.1",
|
|
138
138
|
"tsc-alias": "1.8.8",
|
|
139
|
-
"typescript": "5.
|
|
139
|
+
"typescript": "5.4.2",
|
|
140
140
|
"wasm-pack": "0.12.1",
|
|
141
141
|
"webpack": "5.90.3",
|
|
142
142
|
"webpack-cli": "5.1.4",
|
|
@@ -157,5 +157,5 @@
|
|
|
157
157
|
"files": [
|
|
158
158
|
"dist"
|
|
159
159
|
],
|
|
160
|
-
"packageManager": "yarn@4.1.
|
|
160
|
+
"packageManager": "yarn@4.1.1"
|
|
161
161
|
}
|