Skip to content

Commit

Permalink
Merge pull request #19297 from c-morten/Additive_Animation
Browse files Browse the repository at this point in the history
PropertyMixer: Fixed IE11 support
  • Loading branch information
mrdoob committed May 4, 2020
2 parents b139f82 + ae86013 commit bc29345
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/animation/PropertyMixer.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,13 @@ Object.assign( PropertyMixer.prototype, {
_setAdditiveIdentityNumeric: function () {

var startIndex = this._addIndex * this.valueSize;
var endIndex = startIndex + this.valueSize;

this.buffer.fill( 0, startIndex, startIndex + this.valueSize );
for ( var i = startIndex; i < endIndex; i ++ ) {

this.buffer[ i ] = 0;

}

},

Expand All @@ -248,7 +253,11 @@ Object.assign( PropertyMixer.prototype, {
var startIndex = this._origIndex * this.valueSize;
var targetIndex = this._addIndex * this.valueSize;

this.buffer.copyWithin( targetIndex, startIndex, this.valueSize );
for ( var i = 0; i < this.valueSize; i ++ ) {

this.buffer[ targetIndex + i ] = this.buffer[ startIndex + i ];

}

},

Expand Down

0 comments on commit bc29345

Please sign in to comment.