Skip to content

Commit

Permalink
BufferGeometryUtils: Remove use of old Material.morphTargets property (
Browse files Browse the repository at this point in the history
  • Loading branch information
willstott101 authored and abernier committed Sep 16, 2022
1 parent f2ff148 commit 4d27be1
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions examples/jsm/utils/BufferGeometryUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,6 @@ function computeMorphedAttributes( object ) {

function _calculateMorphedAttributeData(
object,
material,
attribute,
morphAttribute,
morphTargetsRelative,
Expand All @@ -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 );
Expand Down Expand Up @@ -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 );
Expand All @@ -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 ) );
Expand All @@ -956,7 +954,6 @@ function computeMorphedAttributes( object ) {

_calculateMorphedAttributeData(
object,
groupMaterial,
positionAttribute,
morphPosition,
morphTargetsRelative,
Expand All @@ -966,7 +963,6 @@ function computeMorphedAttributes( object ) {

_calculateMorphedAttributeData(
object,
groupMaterial,
normalAttribute,
morphNormal,
morphTargetsRelative,
Expand All @@ -991,7 +987,6 @@ function computeMorphedAttributes( object ) {

_calculateMorphedAttributeData(
object,
material,
positionAttribute,
morphPosition,
morphTargetsRelative,
Expand All @@ -1001,7 +996,6 @@ function computeMorphedAttributes( object ) {

_calculateMorphedAttributeData(
object,
material,
normalAttribute,
morphNormal,
morphTargetsRelative,
Expand All @@ -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 ) );
Expand All @@ -1035,7 +1028,6 @@ function computeMorphedAttributes( object ) {

_calculateMorphedAttributeData(
object,
groupMaterial,
positionAttribute,
morphPosition,
morphTargetsRelative,
Expand All @@ -1045,7 +1037,6 @@ function computeMorphedAttributes( object ) {

_calculateMorphedAttributeData(
object,
groupMaterial,
normalAttribute,
morphNormal,
morphTargetsRelative,
Expand All @@ -1070,7 +1061,6 @@ function computeMorphedAttributes( object ) {

_calculateMorphedAttributeData(
object,
material,
positionAttribute,
morphPosition,
morphTargetsRelative,
Expand All @@ -1080,7 +1070,6 @@ function computeMorphedAttributes( object ) {

_calculateMorphedAttributeData(
object,
material,
normalAttribute,
morphNormal,
morphTargetsRelative,
Expand Down

0 comments on commit 4d27be1

Please sign in to comment.