Update: CC - Before Render - Moorcow (qemp4een6t.js) 4592 bytes modified
parent
27f462e096
commit
445a1c66bd
|
@ -1,5 +1,3 @@
|
||||||
|
|
||||||
|
|
||||||
if (!this.entityLoaded) {
|
if (!this.entityLoaded) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -38,7 +36,6 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) {
|
||||||
}.bind(this)
|
}.bind(this)
|
||||||
);
|
);
|
||||||
|
|
||||||
this.fog = this.entityLoaded.fog;
|
|
||||||
this.bull = this.entityLoaded.bull;
|
this.bull = this.entityLoaded.bull;
|
||||||
this.star = this.entityLoaded.star;
|
this.star = this.entityLoaded.star;
|
||||||
this.santa = this.entityLoaded.santa;
|
this.santa = this.entityLoaded.santa;
|
||||||
|
@ -47,11 +44,10 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) {
|
||||||
this.burger = this.entityLoaded.burger;
|
this.burger = this.entityLoaded.burger;
|
||||||
this.parcel = this.entityLoaded.parcel;
|
this.parcel = this.entityLoaded.parcel;
|
||||||
this.meshes = this.entityLoaded.meshes;
|
this.meshes = this.entityLoaded.meshes;
|
||||||
this.renderer = this.entityLoaded.renderer;
|
|
||||||
this.raycaster = this.entityLoaded.raycaster;
|
this.raycaster = this.entityLoaded.raycaster;
|
||||||
this.kanister = this.entityLoaded.kanister;
|
this.kanister = this.entityLoaded.kanister;
|
||||||
this.leftLight = this.entityLoaded.leftLight;
|
this.lightDirectional = this.entityLoaded.lightDirectional;
|
||||||
this.rightLight = this.entityLoaded.rightLight;
|
this.lightAmbient = this.entityLoaded.lightAmbient;
|
||||||
this.scoreCanvas = this.entityLoaded.scoreCanvas;
|
this.scoreCanvas = this.entityLoaded.scoreCanvas;
|
||||||
this.scoreTexture = this.entityLoaded.scoreTexture;
|
this.scoreTexture = this.entityLoaded.scoreTexture;
|
||||||
this.scoreMesh = this.entityLoaded.scoreMesh;
|
this.scoreMesh = this.entityLoaded.scoreMesh;
|
||||||
|
@ -166,20 +162,11 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) {
|
||||||
|
|
||||||
this.enemiesSpawned = 0;
|
this.enemiesSpawned = 0;
|
||||||
|
|
||||||
this.fog.density = 0.01;
|
this.lightDirectional.intensity = 0;
|
||||||
this.fog.updateInstance('density');
|
this.lightDirectional.updateInstance('intensity');
|
||||||
this.leftLight.intensity = 0.3;
|
|
||||||
this.leftLight.updateInstance('intensity');
|
|
||||||
this.rightLight.intensity = 0.3;
|
|
||||||
this.rightLight.updateInstance('intensity');
|
|
||||||
|
|
||||||
GameLib.Event.Emit(
|
this.lightAmbient.intensity = 0;
|
||||||
GameLib.Event.GET_GRAPHICS_IMPLEMENTATION,
|
this.lightAmbient.updateInstance('intensity');
|
||||||
null,
|
|
||||||
function (graphics) {
|
|
||||||
this.graphics = graphics
|
|
||||||
}.bind(this)
|
|
||||||
);
|
|
||||||
|
|
||||||
this.setLevelProperties = function () {
|
this.setLevelProperties = function () {
|
||||||
|
|
||||||
|
@ -291,8 +278,8 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) {
|
||||||
|
|
||||||
mesh.burnLife = burnLife;
|
mesh.burnLife = burnLife;
|
||||||
mesh.explodeLife = explodeLife;
|
mesh.explodeLife = explodeLife;
|
||||||
mesh.instance.material.color.setRGB(1, 1, 1);
|
mesh.instance.material[0].color.setRGB(1, 1, 1);
|
||||||
mesh.instance.material.opacity = 1;
|
mesh.instance.material[0].opacity = 1;
|
||||||
mesh.visible = true;
|
mesh.visible = true;
|
||||||
mesh.updateInstance('visible');
|
mesh.updateInstance('visible');
|
||||||
|
|
||||||
|
@ -630,31 +617,17 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) {
|
||||||
|
|
||||||
this.minimumRendererRed += 0.01;
|
this.minimumRendererRed += 0.01;
|
||||||
|
|
||||||
this.fog.density -= 0.00025;
|
this.lightDirectional.intensity += 0.1;
|
||||||
if (this.fog.density < 0.0055) {
|
if (this.lightDirectional.intensity >= 1.2) {
|
||||||
this.fog.density = 0.0055;
|
this.lightDirectional.intensity = 1.2;
|
||||||
}
|
}
|
||||||
this.fog.updateInstance('density');
|
this.lightDirectional.updateInstance('intensity');
|
||||||
|
|
||||||
if (mesh.position.x < 0) {
|
|
||||||
this.leftLight.intensity += data.delta * 2.5;
|
|
||||||
|
|
||||||
if (this.leftLight.intensity >= 1) {
|
|
||||||
this.leftLight.intensity = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.leftLight.updateInstance('intensity');
|
|
||||||
|
|
||||||
} else {
|
|
||||||
this.rightLight.intensity += data.delta * 2.5;
|
|
||||||
|
|
||||||
if (this.rightLight.intensity >= 1) {
|
|
||||||
this.rightLight.intensity = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.rightLight.updateInstance('intensity');
|
|
||||||
|
|
||||||
|
this.lightAmbient.intensity += 0.1;
|
||||||
|
if (this.lightAmbient.intensity >= 1) {
|
||||||
|
this.lightAmbient.intensity = 1;
|
||||||
}
|
}
|
||||||
|
this.lightAmbient.updateInstance('intensity');
|
||||||
|
|
||||||
mesh.burningTreeParticleEngine.enabled = true;
|
mesh.burningTreeParticleEngine.enabled = true;
|
||||||
|
|
||||||
|
@ -696,19 +669,13 @@ if (this.mouseIsDown) {
|
||||||
|
|
||||||
this.kanisterTime += data.delta * 1.125;
|
this.kanisterTime += data.delta * 1.125;
|
||||||
|
|
||||||
this.renderer.clearColor.r += 0.01;
|
|
||||||
if (this.renderer.clearColor.r > 0.45) {
|
|
||||||
this.renderer.clearColor.r = 0.45;
|
|
||||||
}
|
|
||||||
this.renderer.updateInstance('clearColor');
|
|
||||||
|
|
||||||
this.throwerLight.intensity += 0.05;
|
this.throwerLight.intensity += 0.05;
|
||||||
if (this.throwerLight.intensity > 2) {
|
if (this.throwerLight.intensity > 2.5) {
|
||||||
this.throwerLight.intensity = 2;
|
this.throwerLight.intensity = 2.5;
|
||||||
}
|
}
|
||||||
this.throwerLight.updateInstance('intensity');
|
this.throwerLight.updateInstance('intensity');
|
||||||
|
|
||||||
var intersects = this.raycaster.getIntersectedObjects(this.scene.meshes);
|
var intersects = this.raycaster.getIntersectedObjects(this.scene.clones);
|
||||||
intersects.map(
|
intersects.map(
|
||||||
function (intersect) {
|
function (intersect) {
|
||||||
|
|
||||||
|
@ -737,7 +704,7 @@ if (this.mouseIsDown) {
|
||||||
this.burn(mesh);
|
this.burn(mesh);
|
||||||
}
|
}
|
||||||
|
|
||||||
mesh.instance.material.color.setRGB(
|
mesh.instance.material[0].color.setRGB(
|
||||||
mesh.burnLife,
|
mesh.burnLife,
|
||||||
mesh.burnLife,
|
mesh.burnLife,
|
||||||
mesh.burnLife
|
mesh.burnLife
|
||||||
|
@ -798,12 +765,6 @@ if (this.mouseIsDown) {
|
||||||
else {
|
else {
|
||||||
this.kanisterTime += (data.delta * this.kanisterLeakTime);
|
this.kanisterTime += (data.delta * this.kanisterLeakTime);
|
||||||
|
|
||||||
this.renderer.clearColor.r -= data.delta;
|
|
||||||
if (this.renderer.clearColor.r < this.minimumRendererRed) {
|
|
||||||
this.renderer.clearColor.r = this.minimumRendererRed;
|
|
||||||
}
|
|
||||||
this.renderer.updateInstance('clearColor');
|
|
||||||
|
|
||||||
this.throwerLight.intensity -= data.delta * 3;
|
this.throwerLight.intensity -= data.delta * 3;
|
||||||
if (this.throwerLight.intensity < 0) {
|
if (this.throwerLight.intensity < 0) {
|
||||||
this.throwerLight.intensity = 0;
|
this.throwerLight.intensity = 0;
|
||||||
|
|
Loading…
Reference in New Issue