From 7ffda44b05ef79b7ea750c2a0ca1dccdf0885e23 Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Fri, 16 Feb 2018 12:15:28 +0100 Subject: [PATCH] Update: CC - Demo New - Before Render (wlw063ovw9.js) 155 bytes modified --- wlw063ovw9.js | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/wlw063ovw9.js b/wlw063ovw9.js index 4dafea4..292ce4d 100644 --- a/wlw063ovw9.js +++ b/wlw063ovw9.js @@ -4,12 +4,16 @@ if (!this.entityLoaded) { if (!this.initialized) { + /** + * attributeData hols the new attribute data we want to animate to + */ this.animate = false; - this.currentAttributeData = null; - this.freshAttributeData = null; - + this.attributeData = null; + this.camera = this.entityLoaded.camera; + this.update = []; + this.time = 0; this.initialized = true; @@ -17,15 +21,22 @@ if (!this.initialized) { this.time += 0.1 * data.delta; -this.camera.position.x = Math.sin(this.time) * 40;// * (window.innerWidth - (window.innerWidth / 2)); -this.camera.position.y = Math.sin(this.time / 2) * 40;//Math.cos(this.time) * (window.innerHeight - (window.innerHeight / 2)); -this.camera.position.z = 150 + Math.sin(this.time) * 50;//Math.sin(this.camera.position.y) * Math.cos(this.camera.position.x); -this.camera.updateInstance('position'); +if (this.animate) { -this.camera.lookAt.x = 0; -this.camera.lookAt.y = 0; -this.camera.lookAt.z = 0; -this.camera.updateInstance('lookAt'); + this.time = 0; + + this.generateAnimationVectors(); +} + +//this.camera.position.x = 10;Math.sin(this.time) * 4;// * (window.innerWidth - (window.innerWidth / 2)); +//this.camera.position.y = 10;Math.sin(this.time / 2) * 4;//Math.cos(this.time) * (window.innerHeight - (window.innerHeight / 2)); +//this.camera.position.z = 10;-Math.sin(this.time) * 5;//Math.sin(this.camera.position.y) * Math.cos(this.camera.position.x); +//this.camera.updateInstance('position'); + +//this.camera.lookAt.x = 0; +//this.camera.lookAt.y = 0; +//this.camera.lookAt.z = 0; +//this.camera.updateInstance('lookAt'); // if (this.audioDrone.volume < 0.1) { // this.audioDrone.volume += 0.001;