@needle-tools/three 0.162.5 → 0.162.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@needle-tools/three",
3
- "version": "0.162.5",
3
+ "version": "0.162.6",
4
4
  "description": "JavaScript 3D library",
5
5
  "type": "module",
6
6
  "main": "./build/three.cjs",
@@ -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 ];
@@ -778,15 +780,19 @@ class WebXRManager extends EventDispatcher {
778
780
 
779
781
  //
780
782
 
781
- for ( let i = 0; i < controllers.length; i ++ ) {
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
- controller.update( inputSource, frame, customReferenceSpace || referenceSpace );
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
  }