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