浏览代码

GLTFLoader: Honor morph targets when using lines. (#22771)

* Allow morph animations to be applied to line geometries

* Check for undefined

* Correct evaluation

* Updated jsm

* Obsolete comment removed
Manuel Fernández Baños 3 年之前
父节点
当前提交
feeac1b1e2
共有 2 个文件被更改,包括 2 次插入3 次删除
  1. 1 1
      examples/js/loaders/GLTFLoader.js
  2. 1 2
      examples/jsm/loaders/GLTFLoader.js

+ 1 - 1
examples/js/loaders/GLTFLoader.js

@@ -3311,7 +3311,7 @@
 						// Node may be a THREE.Group (glTF mesh with several primitives) or a THREE.Mesh.
 						node.traverse( function ( object ) {
 
-							if ( object.isMesh === true && object.morphTargetInfluences ) {
+							if ( object.morphTargetInfluences ) {
 
 								targetNames.push( object.name ? object.name : object.uuid );
 

+ 1 - 2
examples/jsm/loaders/GLTFLoader.js

@@ -3655,10 +3655,9 @@ class GLTFParser {
 
 				if ( PATH_PROPERTIES[ target.path ] === PATH_PROPERTIES.weights ) {
 
-					// Node may be a Group (glTF mesh with several primitives) or a Mesh.
 					node.traverse( function ( object ) {
 
-						if ( object.isMesh === true && object.morphTargetInfluences ) {
+						if ( object.morphTargetInfluences ) {
 
 							targetNames.push( object.name ? object.name : object.uuid );