@cognite/reveal 4.4.2 → 4.4.3
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.
|
@@ -27,14 +27,14 @@ export declare class TreeIndexToSectorsMap {
|
|
|
27
27
|
* Mark a sector as completed for a given geometry type. This will make subsequent calls to isCompleted
|
|
28
28
|
* for this geometry type return true
|
|
29
29
|
* @param sectorId The sector id
|
|
30
|
-
* @param
|
|
30
|
+
* @param geometryType The geometry type
|
|
31
31
|
*/
|
|
32
|
-
markCompleted(sectorId: number,
|
|
32
|
+
markCompleted(sectorId: number, geometryType: RevealGeometryCollectionType): void;
|
|
33
33
|
/**
|
|
34
34
|
* Check whether or not a sector is completely processed, for a given geometry type
|
|
35
35
|
* @param sectorId The sector id
|
|
36
|
-
* @param
|
|
36
|
+
* @param geometryType The geometry type
|
|
37
37
|
* @returns True if completed, false otherwise
|
|
38
38
|
*/
|
|
39
|
-
isCompleted(sectorId: number,
|
|
39
|
+
isCompleted(sectorId: number, geometryType: RevealGeometryCollectionType): boolean;
|
|
40
40
|
}
|
|
@@ -108,7 +108,7 @@ export declare class ComboControls extends EventDispatcher {
|
|
|
108
108
|
*/
|
|
109
109
|
set enabled(newEnabledValue: boolean);
|
|
110
110
|
constructor(camera: PerspectiveCamera | OrthographicCamera, domElement: HTMLElement);
|
|
111
|
-
update: (
|
|
111
|
+
update: (deltaTimeS: number, forceUpdate?: boolean) => boolean;
|
|
112
112
|
getState: () => {
|
|
113
113
|
target: Vector3;
|
|
114
114
|
position: Vector3;
|
|
@@ -140,6 +140,16 @@ export declare class ComboControls extends EventDispatcher {
|
|
|
140
140
|
private readonly startMousePan;
|
|
141
141
|
private readonly startTouchRotation;
|
|
142
142
|
private readonly startTouchPinch;
|
|
143
|
+
/**
|
|
144
|
+
* Converts deltaTimeS to a time scale based on the target frames per second (FPS).
|
|
145
|
+
*
|
|
146
|
+
* @param deltaTimeS - The elapsed time since the last frame in seconds.
|
|
147
|
+
* @returns The time scale, which is a factor representing the relationship of deltaTimeS to the target FPS.
|
|
148
|
+
*/
|
|
149
|
+
private getTimeScale;
|
|
150
|
+
private handleRotationFromKeyboard;
|
|
151
|
+
private handleDollyFromKeyboard;
|
|
152
|
+
private handlePanFromKeyboard;
|
|
143
153
|
private readonly handleKeyboard;
|
|
144
154
|
private readonly rotateSpherical;
|
|
145
155
|
private readonly rotateFirstPersonMode;
|
|
@@ -1,18 +1,34 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Copyright 2021 Cognite AS
|
|
2
|
+
* Copyright 2021-2023 Cognite AS
|
|
3
3
|
*/
|
|
4
|
+
declare const EVENT_CODES: readonly ["MetaLeft", "MetaRight", "ShiftLeft", "ShiftRight", "ControlLeft", "ControlRight", "AltLeft", "AltRight", "Escape", "Space", "ArrowLeft", "ArrowUp", "ArrowRight", "ArrowDown", "KeyA", "KeyB", "KeyC", "KeyD", "KeyE", "KeyF", "KeyQ", "KeyS", "KeyW"];
|
|
5
|
+
type EventCode = (typeof EVENT_CODES)[number];
|
|
4
6
|
export default class Keyboard {
|
|
5
|
-
private
|
|
7
|
+
private readonly _keys;
|
|
6
8
|
private _disabled;
|
|
7
9
|
private readonly _domElement;
|
|
8
10
|
get disabled(): boolean;
|
|
9
11
|
set disabled(isDisabled: boolean);
|
|
10
12
|
constructor(domElement: HTMLElement);
|
|
11
|
-
isPressed(key:
|
|
13
|
+
isPressed(key: EventCode): boolean;
|
|
14
|
+
isShiftPressed(): boolean;
|
|
15
|
+
isCtrlPressed(): boolean;
|
|
16
|
+
isAltPressed(): boolean;
|
|
17
|
+
isMetaPressed(): boolean;
|
|
12
18
|
dispose(): void;
|
|
19
|
+
/**
|
|
20
|
+
* Given two keys representing positive and negative directions (e.g., left and right, or up and down),
|
|
21
|
+
* this method returns 1 for the positive key, -1 for the negative key, or 0 if neither or both is pressed.
|
|
22
|
+
*
|
|
23
|
+
* @param positiveKey - Key representing the positive movement direction.
|
|
24
|
+
* @param negativeKey - Key representing the negative movement direction.
|
|
25
|
+
* @returns A value indicating the direction of movement: 1 (positive), -1 (negative), or 0 (none).
|
|
26
|
+
*/
|
|
27
|
+
getKeyboardMovementValue(positiveKey: EventCode, negativeKey: EventCode): number;
|
|
13
28
|
private readonly addEventListeners;
|
|
14
29
|
private readonly removeEventListeners;
|
|
15
|
-
private readonly
|
|
16
|
-
private readonly
|
|
30
|
+
private readonly onKeyDown;
|
|
31
|
+
private readonly onKeyUp;
|
|
17
32
|
private readonly clearPressedKeys;
|
|
18
33
|
}
|
|
34
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cognite/reveal",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.3",
|
|
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": {
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
65
|
"@tweenjs/tween.js": "19.0.0",
|
|
66
|
-
"assert": "2.
|
|
66
|
+
"assert": "2.1.0",
|
|
67
67
|
"async-mutex": "0.4.0",
|
|
68
68
|
"glslify": "7.1.1",
|
|
69
69
|
"glslify-import": "3.1.0",
|
|
@@ -84,47 +84,47 @@
|
|
|
84
84
|
"@types/dat.gui": "0.7.10",
|
|
85
85
|
"@types/gl": "^6.0.2",
|
|
86
86
|
"@types/glob": "8.1.0",
|
|
87
|
-
"@types/jest": "29.5.
|
|
88
|
-
"@types/jest-environment-puppeteer": "5.0.
|
|
89
|
-
"@types/jest-image-snapshot": "6.2.
|
|
90
|
-
"@types/jsdom": "21.1.
|
|
91
|
-
"@types/lodash": "4.14.
|
|
87
|
+
"@types/jest": "29.5.5",
|
|
88
|
+
"@types/jest-environment-puppeteer": "5.0.4",
|
|
89
|
+
"@types/jest-image-snapshot": "6.2.1",
|
|
90
|
+
"@types/jsdom": "21.1.3",
|
|
91
|
+
"@types/lodash": "4.14.198",
|
|
92
92
|
"@types/mixpanel-browser": "2.47.1",
|
|
93
|
-
"@types/node": "18.17.
|
|
93
|
+
"@types/node": "18.17.18",
|
|
94
94
|
"@types/random-seed": "0.3.3",
|
|
95
95
|
"@types/skmeans": "0.11.4",
|
|
96
96
|
"@types/stats": "0.16.30",
|
|
97
97
|
"@types/three": "0.155.1",
|
|
98
98
|
"@types/tween.js": "18.5.1",
|
|
99
|
-
"@typescript-eslint/eslint-plugin": "
|
|
100
|
-
"@typescript-eslint/parser": "
|
|
99
|
+
"@typescript-eslint/eslint-plugin": "6.7.0",
|
|
100
|
+
"@typescript-eslint/parser": "6.7.0",
|
|
101
101
|
"concurrently": "8.2.1",
|
|
102
102
|
"cross-env": "7.0.3",
|
|
103
103
|
"dat.gui": "0.7.9",
|
|
104
|
-
"eslint": "8.
|
|
104
|
+
"eslint": "8.49.0",
|
|
105
105
|
"eslint-config-prettier": "9.0.0",
|
|
106
106
|
"eslint-plugin-header": "3.1.1",
|
|
107
|
-
"eslint-plugin-jsdoc": "46.
|
|
107
|
+
"eslint-plugin-jsdoc": "46.8.2",
|
|
108
108
|
"eslint-plugin-lodash": "7.4.0",
|
|
109
109
|
"eslint-plugin-prettier": "5.0.0",
|
|
110
110
|
"eslint-plugin-unused-imports": "3.0.0",
|
|
111
111
|
"file-loader": "6.2.0",
|
|
112
112
|
"gl": "6.0.2",
|
|
113
|
-
"glob": "10.3.
|
|
113
|
+
"glob": "10.3.4",
|
|
114
114
|
"glslify-loader": "2.0.0",
|
|
115
115
|
"html-webpack-plugin": "5.5.3",
|
|
116
|
-
"jest": "29.
|
|
116
|
+
"jest": "29.7.0",
|
|
117
117
|
"jest-canvas-mock": "2.5.2",
|
|
118
|
-
"jest-environment-jsdom": "29.
|
|
118
|
+
"jest-environment-jsdom": "29.7.0",
|
|
119
119
|
"jest-extended": "4.0.1",
|
|
120
120
|
"jest-image-snapshot": "6.2.0",
|
|
121
121
|
"jest-puppeteer": "9.0.0",
|
|
122
122
|
"jsdom": "22.1.0",
|
|
123
|
-
"moq.ts": "10.0.
|
|
123
|
+
"moq.ts": "10.0.8",
|
|
124
124
|
"nock": "13.3.3",
|
|
125
|
-
"prettier": "3.0.
|
|
125
|
+
"prettier": "3.0.3",
|
|
126
126
|
"process": "0.11.10",
|
|
127
|
-
"puppeteer": "21.1
|
|
127
|
+
"puppeteer": "21.2.1",
|
|
128
128
|
"random-seed": "0.3.0",
|
|
129
129
|
"raw-loader": "4.0.2",
|
|
130
130
|
"remove-files-webpack-plugin": "1.5.0",
|
|
@@ -135,13 +135,13 @@
|
|
|
135
135
|
"ts-jest": "29.1.1",
|
|
136
136
|
"ts-loader": "9.4.4",
|
|
137
137
|
"tsc-alias": "1.8.7",
|
|
138
|
-
"typescript": "5.
|
|
138
|
+
"typescript": "5.2.2",
|
|
139
139
|
"wasm-pack": "0.12.1",
|
|
140
140
|
"webpack": "5.88.2",
|
|
141
141
|
"webpack-cli": "5.1.4",
|
|
142
142
|
"webpack-dev-server": "4.15.1",
|
|
143
143
|
"webpack-node-externals": "3.0.0",
|
|
144
|
-
"whatwg-fetch": "3.6.
|
|
144
|
+
"whatwg-fetch": "3.6.19",
|
|
145
145
|
"workerize-loader": "2.0.2"
|
|
146
146
|
},
|
|
147
147
|
"peerDependencies": {
|