Explorar o código

Merge pull request #7899 from takahirox/KeyframeTrackBugFix

Fix KeyframeTrack.trim() wrong stride calculation bug
Mr.doob %!s(int64=10) %!d(string=hai) anos
pai
achega
5d08cac75a
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      src/animation/KeyframeTrack.js

+ 2 - 1
src/animation/KeyframeTrack.js

@@ -207,10 +207,11 @@ THREE.KeyframeTrack.prototype = {
 			var from = firstKeysToRemove;
 			var to = nKeys - lastKeysToRemove - firstKeysToRemove;
 
+			var stride = this.getValueSize();
+
 			this.times = THREE.AnimationUtils.arraySlice( times, from, to );
 
 			var values = this.values;
-			var stride = this.getValueSize();
 			this.values = THREE.AnimationUtils.arraySlice( values, from * stride, to * stride );
 
 		}