From cdc9828d01e57e44b3dff71b056bf546ac823eac Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Tue, 16 Jan 2018 09:37:15 +0100 Subject: [PATCH] Initial Commit: CC - SpoonLib - Before Render (uou2i9be9r.js) --- uou2i9be9r.js | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 uou2i9be9r.js diff --git a/uou2i9be9r.js b/uou2i9be9r.js new file mode 100644 index 0000000..9a19cb9 --- /dev/null +++ b/uou2i9be9r.js @@ -0,0 +1,27 @@ +if (!this.entityLoaded) { + return; +} + + +if (!this.initialized) { + this.camera = this.entityLoaded.camera; + this.time = 0; + + this.initialized = true; +} + +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'); + +this.camera.lookAt.x = 0; +this.camera.lookAt.y = 0; +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