From 8d8ca77760031019d0a9ae5e788aa9fd3e6bde9d Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Fri, 16 Feb 2018 12:58:04 +0100 Subject: [PATCH] Update: CC - Demo New - Entity Loaded (tuby5lj4di.js) 13 bytes modified --- tuby5lj4di.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tuby5lj4di.js b/tuby5lj4di.js index 898e20d..5a7906d 100644 --- a/tuby5lj4di.js +++ b/tuby5lj4di.js @@ -224,26 +224,24 @@ GameLib.CustomCode.prototype.updateAttributeArrays = function(alpha) { var offsets = []; var scales = []; - var v = new THREE.Vector3(); - for (i = 0; i < this.updateInformation.length; i++) { offset = this.updateInformation[i].offset; scale = this.updateInformation[i].scale; - v = offset.current.lerp( + offset.current.lerp( offset.target, alpha ); - offsets.push(v.x, v.y, v.z); + offsets.push(offset.x, offset.y, offset.z); - v = scale.current.lerp( + scale.current.lerp( scale.target, alpha ); - scales.push(v.x, v.y, v.z); + scales.push(scale.x, scale.y, scale.z); } this.offsetAttribute.setArray(new Float32Array(offsets));