|
|
@@ -109,6 +109,7 @@ class WebXRController {
|
|
|
this._grip.linearVelocity = new Vector3();
|
|
|
this._grip.hasAngularVelocity = false;
|
|
|
this._grip.angularVelocity = new Vector3();
|
|
|
+ this._grip.eventsEnabled = false;
|
|
|
|
|
|
}
|
|
|
|
|
|
@@ -321,6 +322,17 @@ class WebXRController {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ // grip update event if enabled
|
|
|
+ if ( grip.eventsEnabled ) {
|
|
|
+
|
|
|
+ grip.dispatchEvent( {
|
|
|
+ type: 'gripUpdated',
|
|
|
+ data: inputSource,
|
|
|
+ target: this
|
|
|
+ } );
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
}
|