Update: CC - Demo New - Before Render (wlw063ovw9.js) 155 bytes modified
parent
348aaab458
commit
7ffda44b05
|
@ -4,12 +4,16 @@ if (!this.entityLoaded) {
|
||||||
|
|
||||||
if (!this.initialized) {
|
if (!this.initialized) {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* attributeData hols the new attribute data we want to animate to
|
||||||
|
*/
|
||||||
this.animate = false;
|
this.animate = false;
|
||||||
this.currentAttributeData = null;
|
this.attributeData = null;
|
||||||
this.freshAttributeData = null;
|
|
||||||
|
|
||||||
this.camera = this.entityLoaded.camera;
|
this.camera = this.entityLoaded.camera;
|
||||||
|
|
||||||
|
this.update = [];
|
||||||
|
|
||||||
this.time = 0;
|
this.time = 0;
|
||||||
|
|
||||||
this.initialized = true;
|
this.initialized = true;
|
||||||
|
@ -17,15 +21,22 @@ if (!this.initialized) {
|
||||||
|
|
||||||
this.time += 0.1 * data.delta;
|
this.time += 0.1 * data.delta;
|
||||||
|
|
||||||
this.camera.position.x = Math.sin(this.time) * 40;// * (window.innerWidth - (window.innerWidth / 2));
|
if (this.animate) {
|
||||||
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.time = 0;
|
||||||
this.camera.lookAt.y = 0;
|
|
||||||
this.camera.lookAt.z = 0;
|
this.generateAnimationVectors();
|
||||||
this.camera.updateInstance('lookAt');
|
}
|
||||||
|
|
||||||
|
//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) {
|
// if (this.audioDrone.volume < 0.1) {
|
||||||
// this.audioDrone.volume += 0.001;
|
// this.audioDrone.volume += 0.001;
|
||||||
|
|
Loading…
Reference in New Issue