Update: CC - Demo New - Before Render (wlw063ovw9.js) 965 bytes modified
parent
a4ce02e1ec
commit
a52c30d833
|
@ -1,29 +1,16 @@
|
|||
if (!this.entityLoaded) {
|
||||
return;
|
||||
return;
|
||||
}
|
||||
|
||||
//this.initialized = false;
|
||||
return;
|
||||
|
||||
if (!this.initialized) {
|
||||
this.camera = this.entityLoaded.camera;
|
||||
this.camera2d = this.entityLoaded.camera2d;
|
||||
this.particleEngine = this.entityLoaded.particleEngine;
|
||||
this.particle = this.entityLoaded.particle;
|
||||
this.audioDrone = this.entityLoaded.audioDrone;
|
||||
|
||||
this.particleEngine.pulse = true;
|
||||
this.particleEngine.particlesPerSecond = 22;
|
||||
this.particleEngine.updateInstance('particlesPerSecond');
|
||||
this.particle.fadeInFactor = 1;
|
||||
|
||||
this.time = 0;
|
||||
|
||||
this.camera2d.fov = 180;
|
||||
this.camera2d.updateInstance('fov');
|
||||
|
||||
this.camera2dAnimation = true;
|
||||
this.initialized = true;
|
||||
|
||||
this.animate = false;
|
||||
this.currentAttributeData = null;
|
||||
this.freshAttributeData = null;
|
||||
|
||||
this.camera = this.entityLoaded.camera;
|
||||
|
||||
this.initialized = true;
|
||||
}
|
||||
|
||||
this.time += 0.1 * data.delta;
|
||||
|
@ -38,27 +25,9 @@ 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;
|
||||
this.audioDrone.updateInstance('volume');
|
||||
}
|
||||
// if (this.audioDrone.volume < 0.1) {
|
||||
// this.audioDrone.volume += 0.001;
|
||||
// this.audioDrone.updateInstance('volume');
|
||||
// }
|
||||
|
||||
if (this.camera2dAnimation) {
|
||||
|
||||
this.camera2d.fov -= Math.abs(Math.cos(this.time * 5));
|
||||
//console.log(this.camera2d.fov);
|
||||
this.camera2d.updateInstance('fov');
|
||||
if (this.camera2d.fov < 75) {
|
||||
this.camera2d.fov = 75;
|
||||
this.camera2d.updateInstance('fov');
|
||||
this.camera2dAnimation = false;
|
||||
this.particleEngine.pulse = false;
|
||||
this.particleEngine.particlesPerSecond = 8;
|
||||
this.particleEngine.updateInstance('particlesPerSecond');
|
||||
this.particle.fadeInFactor = 0.002;
|
||||
}
|
||||
}
|
||||
|
||||
//console.log('camera x:' + this.camera.position.x + ',y: ' + this.camera.position.y + ',z: ' + this.camera.position.z);
|
||||
|
||||
//@ sourceURL=SpoonLibBeforeRender.js
|
||||
//@ sourceURL=beforeRender.js
|
Loading…
Reference in New Issue