Skip to content

Commit

Permalink
Fix for #19293
Browse files Browse the repository at this point in the history
- Replace calls to Array.prototype.fill and Array.prototype.copyWithin with for loops to set individual values
  • Loading branch information
Christine Morten committed May 4, 2020
1 parent 33ec7f7 commit ae86013
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 ae86013

Please sign in to comment.