Skip to content

Commit 66d3ccb

Browse files
authored
BufferGeometryUtils: Remove use of old Material.morphTargets property (#23955)
1 parent f42aad6 commit 66d3ccb

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

examples/jsm/utils/BufferGeometryUtils.js

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,6 @@ function computeMorphedAttributes( object ) {
839839

840840
function _calculateMorphedAttributeData(
841841
object,
842-
material,
843842
attribute,
844843
morphAttribute,
845844
morphTargetsRelative,
@@ -855,7 +854,7 @@ function computeMorphedAttributes( object ) {
855854

856855
const morphInfluences = object.morphTargetInfluences;
857856

858-
if ( material.morphTargets && morphAttribute && morphInfluences ) {
857+
if ( morphAttribute && morphInfluences ) {
859858

860859
_morphA.set( 0, 0, 0 );
861860
_morphB.set( 0, 0, 0 );
@@ -928,7 +927,7 @@ function computeMorphedAttributes( object ) {
928927
const groups = geometry.groups;
929928
const drawRange = geometry.drawRange;
930929
let i, j, il, jl;
931-
let group, groupMaterial;
930+
let group;
932931
let start, end;
933932

934933
const modifiedPosition = new Float32Array( positionAttribute.count * positionAttribute.itemSize );
@@ -943,7 +942,6 @@ function computeMorphedAttributes( object ) {
943942
for ( i = 0, il = groups.length; i < il; i ++ ) {
944943

945944
group = groups[ i ];
946-
groupMaterial = material[ group.materialIndex ];
947945

948946
start = Math.max( group.start, drawRange.start );
949947
end = Math.min( ( group.start + group.count ), ( drawRange.start + drawRange.count ) );
@@ -956,7 +954,6 @@ function computeMorphedAttributes( object ) {
956954

957955
_calculateMorphedAttributeData(
958956
object,
959-
groupMaterial,
960957
positionAttribute,
961958
morphPosition,
962959
morphTargetsRelative,
@@ -966,7 +963,6 @@ function computeMorphedAttributes( object ) {
966963

967964
_calculateMorphedAttributeData(
968965
object,
969-
groupMaterial,
970966
normalAttribute,
971967
morphNormal,
972968
morphTargetsRelative,
@@ -991,7 +987,6 @@ function computeMorphedAttributes( object ) {
991987

992988
_calculateMorphedAttributeData(
993989
object,
994-
material,
995990
positionAttribute,
996991
morphPosition,
997992
morphTargetsRelative,
@@ -1001,7 +996,6 @@ function computeMorphedAttributes( object ) {
1001996

1002997
_calculateMorphedAttributeData(
1003998
object,
1004-
material,
1005999
normalAttribute,
10061000
morphNormal,
10071001
morphTargetsRelative,
@@ -1022,7 +1016,6 @@ function computeMorphedAttributes( object ) {
10221016
for ( i = 0, il = groups.length; i < il; i ++ ) {
10231017

10241018
group = groups[ i ];
1025-
groupMaterial = material[ group.materialIndex ];
10261019

10271020
start = Math.max( group.start, drawRange.start );
10281021
end = Math.min( ( group.start + group.count ), ( drawRange.start + drawRange.count ) );
@@ -1035,7 +1028,6 @@ function computeMorphedAttributes( object ) {
10351028

10361029
_calculateMorphedAttributeData(
10371030
object,
1038-
groupMaterial,
10391031
positionAttribute,
10401032
morphPosition,
10411033
morphTargetsRelative,
@@ -1045,7 +1037,6 @@ function computeMorphedAttributes( object ) {
10451037

10461038
_calculateMorphedAttributeData(
10471039
object,
1048-
groupMaterial,
10491040
normalAttribute,
10501041
morphNormal,
10511042
morphTargetsRelative,
@@ -1070,7 +1061,6 @@ function computeMorphedAttributes( object ) {
10701061

10711062
_calculateMorphedAttributeData(
10721063
object,
1073-
material,
10741064
positionAttribute,
10751065
morphPosition,
10761066
morphTargetsRelative,
@@ -1080,7 +1070,6 @@ function computeMorphedAttributes( object ) {
10801070

10811071
_calculateMorphedAttributeData(
10821072
object,
1083-
material,
10841073
normalAttribute,
10851074
morphNormal,
10861075
morphTargetsRelative,

0 commit comments

Comments
 (0)