gl-draw 0.14.4 → 0.14.6

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.
@@ -12,7 +12,7 @@ import {
12
12
  CameraControlsEventMap,
13
13
  } from './types';
14
14
  import {EventDispatcher} from './EventDispatcher';
15
- export default class CameraControls extends EventDispatcher {
15
+ export declare class CameraControls extends EventDispatcher {
16
16
  /**
17
17
  * Injects THREE as the dependency. You can then proceed to use CameraControls.
18
18
  *
@@ -184,11 +184,6 @@ export default class CameraControls extends EventDispatcher {
184
184
  * @category Properties
185
185
  */
186
186
  dragToOffset: boolean;
187
- /**
188
- * The same as `.screenSpacePanning` in three.js's OrbitControls.
189
- * @category Properties
190
- */
191
- verticalDragToForward: boolean;
192
187
  /**
193
188
  * Friction ratio of the boundary.
194
189
  * @category Properties
@@ -836,6 +831,10 @@ export default class CameraControls extends EventDispatcher {
836
831
  * @category Methods
837
832
  */
838
833
  normalizeRotations(): void;
834
+ /**
835
+ * stop all transitions.
836
+ */
837
+ stop(): void;
839
838
  /**
840
839
  * Reset all rotation and position to defaults.
841
840
  * @param enableTransition
@@ -909,7 +908,8 @@ export default class CameraControls extends EventDispatcher {
909
908
  protected _truckInternal: (
910
909
  deltaX: number,
911
910
  deltaY: number,
912
- dragToOffset: boolean
911
+ dragToOffset: boolean,
912
+ screenSpacePanning: boolean
913
913
  ) => void;
914
914
  protected _rotateInternal: (deltaX: number, deltaY: number) => void;
915
915
  protected _dollyInternal: (delta: number, x: number, y: number) => void;
@@ -38,6 +38,10 @@ export declare const ACTION: Readonly<{
38
38
  readonly TOUCH_ZOOM_TRUCK: 8192;
39
39
  readonly TOUCH_ZOOM_OFFSET: 16384;
40
40
  readonly TOUCH_ZOOM_ROTATE: 32768;
41
+ readonly SCREEN_PAN: 65536;
42
+ readonly TOUCH_SCREEN_PAN: 131072;
43
+ readonly TOUCH_DOLLY_SCREEN_PAN: 262144;
44
+ readonly TOUCH_ZOOM_SCREEN_PAN: 524288;
41
45
  }>;
42
46
  export type ACTION = number;
43
47
  export interface PointerInput {
@@ -51,6 +55,7 @@ export interface PointerInput {
51
55
  type mouseButtonAction =
52
56
  | typeof ACTION.ROTATE
53
57
  | typeof ACTION.TRUCK
58
+ | typeof ACTION.SCREEN_PAN
54
59
  | typeof ACTION.OFFSET
55
60
  | typeof ACTION.DOLLY
56
61
  | typeof ACTION.ZOOM
@@ -58,6 +63,7 @@ type mouseButtonAction =
58
63
  type mouseWheelAction =
59
64
  | typeof ACTION.ROTATE
60
65
  | typeof ACTION.TRUCK
66
+ | typeof ACTION.SCREEN_PAN
61
67
  | typeof ACTION.OFFSET
62
68
  | typeof ACTION.DOLLY
63
69
  | typeof ACTION.ZOOM
@@ -65,6 +71,7 @@ type mouseWheelAction =
65
71
  type singleTouchAction =
66
72
  | typeof ACTION.TOUCH_ROTATE
67
73
  | typeof ACTION.TOUCH_TRUCK
74
+ | typeof ACTION.TOUCH_SCREEN_PAN
68
75
  | typeof ACTION.TOUCH_OFFSET
69
76
  | typeof ACTION.DOLLY
70
77
  | typeof ACTION.ZOOM
@@ -80,6 +87,7 @@ type multiTouchAction =
80
87
  | typeof ACTION.TOUCH_ZOOM
81
88
  | typeof ACTION.TOUCH_ROTATE
82
89
  | typeof ACTION.TOUCH_TRUCK
90
+ | typeof ACTION.TOUCH_SCREEN_PAN
83
91
  | typeof ACTION.TOUCH_OFFSET
84
92
  | typeof ACTION.NONE;
85
93
  export interface MouseButtons {
@@ -1,5 +1,4 @@
1
1
  import * as THREE from 'three';
2
- import CameraControls from './CameraControls';
3
2
  import Pages from "./Pages";
4
3
  export interface ControlsParams {
5
4
  domElement: HTMLElement;
@@ -63,11 +63,11 @@ export default class Pencil {
63
63
  getPlugin(name: 'worker'): Wk;
64
64
  get renderer(): THREE.WebGLRenderer;
65
65
  get maxAnisotropy(): number;
66
- get controls(): import("./CameraControls").default;
66
+ get controls(): CameraControls;
67
67
  private _cameraPositon;
68
68
  private _cameraTarget;
69
- get cameraPositon(): THREE.Vector3;
70
- get cameraTarget(): THREE.Vector3;
69
+ get cameraPositon(): any;
70
+ get cameraTarget(): any;
71
71
  get camera(): THREE.PerspectiveCamera;
72
72
  get scene(): THREE.Scene;
73
73
  get loader(): import("./Loader/Loader").default;
package/dist/index.d.ts CHANGED
@@ -2,22 +2,4 @@ export { default, default as Pencil } from "./core/Pencil";
2
2
  export { default as BaseObject } from "./core/BaseObject";
3
3
  export { default as ResourceTracker } from "./core/ResourceTracker";
4
4
  export type { default as Lead } from "./core/Lead/Lead";
5
- export declare const cameraControlsAction: Readonly<{
6
- readonly NONE: 0;
7
- readonly ROTATE: 1;
8
- readonly TRUCK: 2;
9
- readonly OFFSET: 4;
10
- readonly DOLLY: 8;
11
- readonly ZOOM: 16;
12
- readonly TOUCH_ROTATE: 32;
13
- readonly TOUCH_TRUCK: 64;
14
- readonly TOUCH_OFFSET: 128;
15
- readonly TOUCH_DOLLY: 256;
16
- readonly TOUCH_ZOOM: 512;
17
- readonly TOUCH_DOLLY_TRUCK: 1024;
18
- readonly TOUCH_DOLLY_OFFSET: 2048;
19
- readonly TOUCH_DOLLY_ROTATE: 4096;
20
- readonly TOUCH_ZOOM_TRUCK: 8192;
21
- readonly TOUCH_ZOOM_OFFSET: 16384;
22
- readonly TOUCH_ZOOM_ROTATE: 32768;
23
- }>;
5
+ export declare const cameraControlsAction: any;