three-stdlib 2.23.15 → 2.24.0
Sign up to get free protection for your applications and to get access to all the features.
@@ -81,6 +81,7 @@ class OrbitControls extends THREE.EventDispatcher {
|
|
81
81
|
__publicField(this, "setAzimuthalAngle");
|
82
82
|
__publicField(this, "getDistance");
|
83
83
|
__publicField(this, "listenToKeyEvents");
|
84
|
+
__publicField(this, "stopListenToKeyEvents");
|
84
85
|
__publicField(this, "saveState");
|
85
86
|
__publicField(this, "reset");
|
86
87
|
__publicField(this, "update");
|
@@ -134,6 +135,10 @@ class OrbitControls extends THREE.EventDispatcher {
|
|
134
135
|
domElement2.addEventListener("keydown", onKeyDown);
|
135
136
|
this._domElementKeyEvents = domElement2;
|
136
137
|
};
|
138
|
+
this.stopListenToKeyEvents = () => {
|
139
|
+
this._domElementKeyEvents.removeEventListener("keydown", onKeyDown);
|
140
|
+
this._domElementKeyEvents = null;
|
141
|
+
};
|
137
142
|
this.saveState = () => {
|
138
143
|
scope.target0.copy(scope.target);
|
139
144
|
scope.position0.copy(scope.object.position);
|
@@ -50,6 +50,7 @@ declare class OrbitControls extends EventDispatcher {
|
|
50
50
|
setAzimuthalAngle: (x: number) => void;
|
51
51
|
getDistance: () => number;
|
52
52
|
listenToKeyEvents: (domElement: HTMLElement) => void;
|
53
|
+
stopListenToKeyEvents: () => void;
|
53
54
|
saveState: () => void;
|
54
55
|
reset: () => void;
|
55
56
|
update: () => void;
|
@@ -79,6 +79,7 @@ class OrbitControls extends EventDispatcher {
|
|
79
79
|
__publicField(this, "setAzimuthalAngle");
|
80
80
|
__publicField(this, "getDistance");
|
81
81
|
__publicField(this, "listenToKeyEvents");
|
82
|
+
__publicField(this, "stopListenToKeyEvents");
|
82
83
|
__publicField(this, "saveState");
|
83
84
|
__publicField(this, "reset");
|
84
85
|
__publicField(this, "update");
|
@@ -132,6 +133,10 @@ class OrbitControls extends EventDispatcher {
|
|
132
133
|
domElement2.addEventListener("keydown", onKeyDown);
|
133
134
|
this._domElementKeyEvents = domElement2;
|
134
135
|
};
|
136
|
+
this.stopListenToKeyEvents = () => {
|
137
|
+
this._domElementKeyEvents.removeEventListener("keydown", onKeyDown);
|
138
|
+
this._domElementKeyEvents = null;
|
139
|
+
};
|
135
140
|
this.saveState = () => {
|
136
141
|
scope.target0.copy(scope.target);
|
137
142
|
scope.position0.copy(scope.object.position);
|