From 71a2a5482959c3b0e4f498b721cfcd026ad07222 Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Fri, 16 Feb 2018 12:19:15 +0100 Subject: [PATCH] Update: CC - Demo New - Before Render (wlw063ovw9.js) 169 bytes modified --- wlw063ovw9.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/wlw063ovw9.js b/wlw063ovw9.js index 292ce4d..e2fdaaf 100644 --- a/wlw063ovw9.js +++ b/wlw063ovw9.js @@ -22,10 +22,18 @@ if (!this.initialized) { this.time += 0.1 * data.delta; if (this.animate) { - this.time = 0; - - this.generateAnimationVectors(); +} + +if (this.time < 1) { + //start interpolating + this.updateAttributeArrays(this.time); +} else { + if (this.animate) { + //perform the last update + this.updateAttributeArrays(1); + this.animate = false; + } } //this.camera.position.x = 10;Math.sin(this.time) * 4;// * (window.innerWidth - (window.innerWidth / 2));