From d4bac1314ff503119509e0555f5d46d0622105c4 Mon Sep 17 00:00:00 2001 From: Will Stott Date: Wed, 27 Apr 2022 18:26:03 +0100 Subject: [PATCH] BufferGeometryUtils: Remove use of old Material.morphTargets property --- examples/jsm/utils/BufferGeometryUtils.js | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/examples/jsm/utils/BufferGeometryUtils.js b/examples/jsm/utils/BufferGeometryUtils.js index 2f82c44f9e3fd6..16024e1d241ef0 100644 --- a/examples/jsm/utils/BufferGeometryUtils.js +++ b/examples/jsm/utils/BufferGeometryUtils.js @@ -839,7 +839,6 @@ function computeMorphedAttributes( object ) { function _calculateMorphedAttributeData( object, - material, attribute, morphAttribute, morphTargetsRelative, @@ -855,7 +854,7 @@ function computeMorphedAttributes( object ) { const morphInfluences = object.morphTargetInfluences; - if ( material.morphTargets && morphAttribute && morphInfluences ) { + if ( morphAttribute && morphInfluences ) { _morphA.set( 0, 0, 0 ); _morphB.set( 0, 0, 0 ); @@ -928,7 +927,7 @@ function computeMorphedAttributes( object ) { const groups = geometry.groups; const drawRange = geometry.drawRange; let i, j, il, jl; - let group, groupMaterial; + let group; let start, end; const modifiedPosition = new Float32Array( positionAttribute.count * positionAttribute.itemSize ); @@ -943,7 +942,6 @@ function computeMorphedAttributes( object ) { for ( i = 0, il = groups.length; i < il; i ++ ) { group = groups[ i ]; - groupMaterial = material[ group.materialIndex ]; start = Math.max( group.start, drawRange.start ); end = Math.min( ( group.start + group.count ), ( drawRange.start + drawRange.count ) ); @@ -956,7 +954,6 @@ function computeMorphedAttributes( object ) { _calculateMorphedAttributeData( object, - groupMaterial, positionAttribute, morphPosition, morphTargetsRelative, @@ -966,7 +963,6 @@ function computeMorphedAttributes( object ) { _calculateMorphedAttributeData( object, - groupMaterial, normalAttribute, morphNormal, morphTargetsRelative, @@ -991,7 +987,6 @@ function computeMorphedAttributes( object ) { _calculateMorphedAttributeData( object, - material, positionAttribute, morphPosition, morphTargetsRelative, @@ -1001,7 +996,6 @@ function computeMorphedAttributes( object ) { _calculateMorphedAttributeData( object, - material, normalAttribute, morphNormal, morphTargetsRelative, @@ -1022,7 +1016,6 @@ function computeMorphedAttributes( object ) { for ( i = 0, il = groups.length; i < il; i ++ ) { group = groups[ i ]; - groupMaterial = material[ group.materialIndex ]; start = Math.max( group.start, drawRange.start ); end = Math.min( ( group.start + group.count ), ( drawRange.start + drawRange.count ) ); @@ -1035,7 +1028,6 @@ function computeMorphedAttributes( object ) { _calculateMorphedAttributeData( object, - groupMaterial, positionAttribute, morphPosition, morphTargetsRelative, @@ -1045,7 +1037,6 @@ function computeMorphedAttributes( object ) { _calculateMorphedAttributeData( object, - groupMaterial, normalAttribute, morphNormal, morphTargetsRelative, @@ -1070,7 +1061,6 @@ function computeMorphedAttributes( object ) { _calculateMorphedAttributeData( object, - material, positionAttribute, morphPosition, morphTargetsRelative, @@ -1080,7 +1070,6 @@ function computeMorphedAttributes( object ) { _calculateMorphedAttributeData( object, - material, normalAttribute, morphNormal, morphTargetsRelative,