Sfoglia il codice sorgente

Merge pull request #19297 from c-morten/Additive_Animation

PropertyMixer: Fixed IE11 support
Mr.doob 5 anni fa
parent
commit
bc293451d7
1 ha cambiato i file con 11 aggiunte e 2 eliminazioni
  1. 11 2
      src/animation/PropertyMixer.js

+ 11 - 2
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 ];
+
+		}
 
 	},