Fix rendering of objects without morph target influences with morph materials
@@ -727,7 +727,7 @@ function WebGLRenderer( parameters ) {
}
- if ( object.morphTargetInfluences ) {
+ if ( material.morphTargets || material.morphNormals ) {
morphtargets.update( object, geometry, material, program );
@@ -17,7 +17,10 @@ function WebGLMorphtargets( gl ) {
var objectInfluences = object.morphTargetInfluences;
- var length = objectInfluences.length;
+ // When object doesn't have morph target influences defined, we treat it as a 0-length array
+ // This is important to make sure we set up morphTargetBaseInfluence / morphTargetInfluences
+
+ var length = objectInfluences === undefined ? 0 : objectInfluences.length;
var influences = influencesList[ geometry.id ];