From 869f0c5c9050bbdba240c38c864ac0282b12aa74 Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Mon, 15 Jan 2018 09:24:30 +0100 Subject: [PATCH] Initial Commit: CC - SpoonLib - Before Render (r8z71ver1l.js) --- r8z71ver1l.js | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 r8z71ver1l.js diff --git a/r8z71ver1l.js b/r8z71ver1l.js new file mode 100644 index 0000000..ff65342 --- /dev/null +++ b/r8z71ver1l.js @@ -0,0 +1,26 @@ +if (!this.entityLoaded) { + return; +} + + +if (!this.initialized) { + this.camera = this.entityLoaded.camera; + + this.initialized = true; +} + +this.time += 0.01; + +this.camera.position.x = 32 + Math.sin(this.time) * 20;// * (window.innerWidth - (window.innerWidth / 2)); +this.camera.position.y = 32 + Math.sin(this.time) * 20;//Math.cos(this.time) * (window.innerHeight - (window.innerHeight / 2)); +this.camera.position.z = 100 + Math.sin(this.time) * 15;//Math.sin(this.camera.position.y) * Math.cos(this.camera.position.x); +this.camera.updateInstance('position'); + +this.camera.lookAt.x = 32; +this.camera.lookAt.y = 32; +this.camera.lookAt.z = 0; +this.camera.updateInstance('lookAt'); + +console.log('camera x:' + this.camera.position.x + ',y: ' + this.camera.position.y + ',z: ' + this.camera.position.z); + +//@ sourceURL=mouseMove.js \ No newline at end of file