@needle-tools/three 0.146.2 → 0.146.4

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.
@@ -44961,7 +44961,7 @@ class PropertyBinding {
44961
44961
  this.path = path;
44962
44962
  this.parsedPath = parsedPath || PropertyBinding.parseTrackName( path );
44963
44963
 
44964
- this.node = PropertyBinding.findNode( rootNode, this.parsedPath.nodeName ) || rootNode;
44964
+ this.node = PropertyBinding.findNode( rootNode, this.parsedPath.nodeName );
44965
44965
 
44966
44966
  this.rootNode = rootNode;
44967
44967
 
@@ -45277,7 +45277,7 @@ class PropertyBinding {
45277
45277
 
45278
45278
  if ( ! targetObject ) {
45279
45279
 
45280
- targetObject = PropertyBinding.findNode( this.rootNode, parsedPath.nodeName ) || this.rootNode;
45280
+ targetObject = PropertyBinding.findNode( this.rootNode, parsedPath.nodeName );
45281
45281
 
45282
45282
  this.node = targetObject;
45283
45283
 
@@ -836,7 +836,8 @@ class OrbitControls extends EventDispatcher {
836
836
 
837
837
  if ( pointers.length === 0 ) {
838
838
 
839
- scope.domElement.setPointerCapture( event.pointerId );
839
+ // this causes pointer events to be captured
840
+ // scope.domElement.setPointerCapture( event.pointerId );
840
841
 
841
842
  scope.domElement.addEventListener( 'pointermove', onPointerMove );
842
843
  scope.domElement.addEventListener( 'pointerup', onPointerUp );
@@ -881,7 +882,7 @@ class OrbitControls extends EventDispatcher {
881
882
 
882
883
  if ( pointers.length === 0 ) {
883
884
 
884
- scope.domElement.releasePointerCapture( event.pointerId );
885
+ // scope.domElement.releasePointerCapture( event.pointerId );
885
886
 
886
887
  scope.domElement.removeEventListener( 'pointermove', onPointerMove );
887
888
  scope.domElement.removeEventListener( 'pointerup', onPointerUp );
@@ -154,7 +154,7 @@ class GLTFLoader extends Loader {
154
154
  return new GLTFMeshGpuInstancing( parser );
155
155
 
156
156
  } );
157
-
157
+
158
158
  this.register( function ( parser ) {
159
159
 
160
160
  return new GLTFAnimationPointerExtension( parser );
@@ -601,7 +601,7 @@ class GLTFLightsExtension {
601
601
 
602
602
  }
603
603
 
604
- getDependency( type, index ) {
604
+ getDependency( type, index ) {
605
605
 
606
606
  if ( type !== 'light' ) return;
607
607
 
@@ -904,16 +904,17 @@ class GLTFAnimationPointerExtension {
904
904
  const foundNode = node.getObjectByName( val );
905
905
  if ( foundNode )
906
906
  currentTarget = foundNode;
907
+
907
908
  }
908
909
 
909
910
  }
910
911
 
911
912
  if ( ! currentTarget ) {
912
913
 
913
- const originalFindResult = find ( node, sections[ 2 ] );
914
+ const originalFindResult = find( node, sections[ 2 ] );
914
915
 
915
916
  if ( ! originalFindResult )
916
- console.error("not found", path, node, node.name, sections);
917
+ console.warn( EXTENSIONS.KHR_ANIMATION_POINTER + ': Property binding not found', path, node, node.name, sections );
917
918
 
918
919
  return originalFindResult;
919
920
 
@@ -1268,7 +1269,7 @@ class GLTFAnimationPointerExtension {
1268
1269
 
1269
1270
  // convert fov values from radians to degrees
1270
1271
  if ( animationPointerPropertyPath.endsWith( '.fov' ) ) {
1271
-
1272
+
1272
1273
  outputArray = outputArray.map( value => value / Math.PI * 180 );
1273
1274
 
1274
1275
  }
@@ -2869,7 +2870,7 @@ class GLTFParser {
2869
2870
 
2870
2871
  // Use an ImageBitmapLoader if imageBitmaps are supported. Moves much of the
2871
2872
  // expensive work of uploading a texture to the GPU off the main thread.
2872
-
2873
+
2873
2874
  let isSafari = false;
2874
2875
  let isFirefox = false;
2875
2876
  let firefoxVersion = - 1;
@@ -4248,8 +4249,9 @@ class GLTFParser {
4248
4249
  const pendingOutputAccessors = [];
4249
4250
  const pendingSamplers = [];
4250
4251
  const pendingTargets = [];
4251
-
4252
- for ( let i = 0, il = animationDef.channels.length; i < il; i ++ ) {
4252
+ let i = 0;
4253
+ let il = animationDef.channels.length;
4254
+ for ( i = 0, il = animationDef.channels.length; i < il; i ++ ) {
4253
4255
 
4254
4256
  const channel = animationDef.channels[ i ];
4255
4257
  const sampler = animationDef.samplers[ channel.sampler ];
@@ -4289,7 +4291,7 @@ class GLTFParser {
4289
4291
 
4290
4292
  const tracks = [];
4291
4293
 
4292
- for ( let i = 0, il = nodes.length; i < il; i ++ ) {
4294
+ for ( i = 0, il = nodes.length; i < il; i ++ ) {
4293
4295
 
4294
4296
  const node = nodes[ i ];
4295
4297
  const inputAccessor = inputAccessors[ i ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@needle-tools/three",
3
- "version": "0.146.2",
3
+ "version": "0.146.4",
4
4
  "description": "JavaScript 3D library",
5
5
  "type": "module",
6
6
  "main": "./build/three.js",
@@ -107,7 +107,7 @@ class PropertyBinding {
107
107
  this.path = path;
108
108
  this.parsedPath = parsedPath || PropertyBinding.parseTrackName( path );
109
109
 
110
- this.node = PropertyBinding.findNode( rootNode, this.parsedPath.nodeName ) || rootNode;
110
+ this.node = PropertyBinding.findNode( rootNode, this.parsedPath.nodeName );
111
111
 
112
112
  this.rootNode = rootNode;
113
113
 
@@ -423,7 +423,7 @@ class PropertyBinding {
423
423
 
424
424
  if ( ! targetObject ) {
425
425
 
426
- targetObject = PropertyBinding.findNode( this.rootNode, parsedPath.nodeName ) || this.rootNode;
426
+ targetObject = PropertyBinding.findNode( this.rootNode, parsedPath.nodeName );
427
427
 
428
428
  this.node = targetObject;
429
429