@needle-tools/three 0.162.5 → 0.162.7
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.
- package/build/three.cjs +1220 -1214
- package/build/three.module.js +804 -798
- package/build/three.module.min.js +6 -6
- package/package.json +1 -1
- package/src/renderers/webxr/WebXRManager.js +15 -9
package/package.json
CHANGED
|
@@ -74,6 +74,8 @@ class WebXRManager extends EventDispatcher {
|
|
|
74
74
|
|
|
75
75
|
this.isPresenting = false;
|
|
76
76
|
|
|
77
|
+
this.controllerAutoUpdate = true;
|
|
78
|
+
|
|
77
79
|
this.getController = function ( index ) {
|
|
78
80
|
|
|
79
81
|
let controller = controllers[ index ];
|
|
@@ -161,7 +163,7 @@ class WebXRManager extends EventDispatcher {
|
|
|
161
163
|
|
|
162
164
|
controllerInputSources[ i ] = null;
|
|
163
165
|
|
|
164
|
-
controllers[ i ]
|
|
166
|
+
controllers[ i ]?.disconnect( inputSource );
|
|
165
167
|
|
|
166
168
|
}
|
|
167
169
|
|
|
@@ -393,7 +395,7 @@ class WebXRManager extends EventDispatcher {
|
|
|
393
395
|
if ( index >= 0 ) {
|
|
394
396
|
|
|
395
397
|
controllerInputSources[ index ] = null;
|
|
396
|
-
controllers[ index ]
|
|
398
|
+
controllers[ index ]?.disconnect( inputSource );
|
|
397
399
|
|
|
398
400
|
}
|
|
399
401
|
|
|
@@ -778,15 +780,19 @@ class WebXRManager extends EventDispatcher {
|
|
|
778
780
|
|
|
779
781
|
//
|
|
780
782
|
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
const inputSource = controllerInputSources[ i ];
|
|
784
|
-
const controller = controllers[ i ];
|
|
785
|
-
|
|
786
|
-
if ( inputSource !== null && controller !== undefined ) {
|
|
783
|
+
if ( scope.controllerAutoUpdate ) {
|
|
787
784
|
|
|
788
|
-
|
|
785
|
+
for ( let i = 0; i < controllers.length; i ++ ) {
|
|
789
786
|
|
|
787
|
+
const inputSource = controllerInputSources[ i ];
|
|
788
|
+
const controller = controllers[ i ];
|
|
789
|
+
|
|
790
|
+
if ( inputSource !== null && controller !== undefined ) {
|
|
791
|
+
|
|
792
|
+
controller.update( inputSource, frame, customReferenceSpace || referenceSpace );
|
|
793
|
+
|
|
794
|
+
}
|
|
795
|
+
|
|
790
796
|
}
|
|
791
797
|
|
|
792
798
|
}
|