Initial Commit: CC - SpoonLib - Before Render (a4hb4ubk5z.js)

beta.r3js.org
-=yb4f310 2018-01-15 18:02:17 +01:00
parent 1e65816b31
commit 593a13df76
1 changed files with 27 additions and 0 deletions

27
a4hb4ubk5z.js Normal file
View File

@ -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.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 / 2) * 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