From ae860138722b81cc9f643a1b53491627642ac442 Mon Sep 17 00:00:00 2001 From: Christine Morten Date: Mon, 4 May 2020 14:31:40 -0700 Subject: [PATCH] Fix for https://github.com/mrdoob/three.js/issues/19293 - Replace calls to Array.prototype.fill and Array.prototype.copyWithin with for loops to set individual values --- src/animation/PropertyMixer.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/animation/PropertyMixer.js b/src/animation/PropertyMixer.js index 568529a641dfd..1458e836f16ed 100644 --- a/src/animation/PropertyMixer.js +++ b/src/animation/PropertyMixer.js @@ -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; + + } }, @@ -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 ]; + + } },