@cognite/reveal 4.4.2-dev.20230904 → 4.4.2-dev.20230905

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.
@@ -140,6 +140,9 @@ export declare class ComboControls extends EventDispatcher {
140
140
  private readonly startMousePan;
141
141
  private readonly startTouchRotation;
142
142
  private readonly startTouchPinch;
143
+ private handleRotation;
144
+ private handleDolly;
145
+ private handlePan;
143
146
  private readonly handleKeyboard;
144
147
  private readonly rotateSpherical;
145
148
  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 keys;
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: string): boolean;
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 onKeydown;
16
- private readonly onKeyup;
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.2-dev.20230904",
3
+ "version": "4.4.2-dev.20230905",
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": {
@@ -104,13 +104,13 @@
104
104
  "eslint": "8.48.0",
105
105
  "eslint-config-prettier": "9.0.0",
106
106
  "eslint-plugin-header": "3.1.1",
107
- "eslint-plugin-jsdoc": "46.5.0",
107
+ "eslint-plugin-jsdoc": "46.5.1",
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.3",
113
+ "glob": "10.3.4",
114
114
  "glslify-loader": "2.0.0",
115
115
  "html-webpack-plugin": "5.5.3",
116
116
  "jest": "29.6.4",
@@ -122,9 +122,9 @@
122
122
  "jsdom": "22.1.0",
123
123
  "moq.ts": "10.0.6",
124
124
  "nock": "13.3.3",
125
- "prettier": "3.0.2",
125
+ "prettier": "3.0.3",
126
126
  "process": "0.11.10",
127
- "puppeteer": "21.1.0",
127
+ "puppeteer": "21.1.1",
128
128
  "random-seed": "0.3.0",
129
129
  "raw-loader": "4.0.2",
130
130
  "remove-files-webpack-plugin": "1.5.0",
@@ -141,7 +141,7 @@
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.17",
144
+ "whatwg-fetch": "3.6.18",
145
145
  "workerize-loader": "2.0.2"
146
146
  },
147
147
  "peerDependencies": {