Update: CC - Before Render - Moorcow (qemp4een6t.js) 4592 bytes modified

beta.r3js.org
Theunis Johannes Botha 2018-03-07 07:43:09 +01:00
parent 27f462e096
commit 445a1c66bd
1 changed files with 756 additions and 795 deletions

View File

@ -1,5 +1,3 @@
if (!this.entityLoaded) {
return;
}
@ -38,7 +36,6 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) {
}.bind(this)
);
this.fog = this.entityLoaded.fog;
this.bull = this.entityLoaded.bull;
this.star = this.entityLoaded.star;
this.santa = this.entityLoaded.santa;
@ -47,11 +44,10 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) {
this.burger = this.entityLoaded.burger;
this.parcel = this.entityLoaded.parcel;
this.meshes = this.entityLoaded.meshes;
this.renderer = this.entityLoaded.renderer;
this.raycaster = this.entityLoaded.raycaster;
this.kanister = this.entityLoaded.kanister;
this.leftLight = this.entityLoaded.leftLight;
this.rightLight = this.entityLoaded.rightLight;
this.lightDirectional = this.entityLoaded.lightDirectional;
this.lightAmbient = this.entityLoaded.lightAmbient;
this.scoreCanvas = this.entityLoaded.scoreCanvas;
this.scoreTexture = this.entityLoaded.scoreTexture;
this.scoreMesh = this.entityLoaded.scoreMesh;
@ -166,20 +162,11 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) {
this.enemiesSpawned = 0;
this.fog.density = 0.01;
this.fog.updateInstance('density');
this.leftLight.intensity = 0.3;
this.leftLight.updateInstance('intensity');
this.rightLight.intensity = 0.3;
this.rightLight.updateInstance('intensity');
this.lightDirectional.intensity = 0;
this.lightDirectional.updateInstance('intensity');
GameLib.Event.Emit(
GameLib.Event.GET_GRAPHICS_IMPLEMENTATION,
null,
function (graphics) {
this.graphics = graphics
}.bind(this)
);
this.lightAmbient.intensity = 0;
this.lightAmbient.updateInstance('intensity');
this.setLevelProperties = function () {
@ -291,8 +278,8 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) {
mesh.burnLife = burnLife;
mesh.explodeLife = explodeLife;
mesh.instance.material.color.setRGB(1, 1, 1);
mesh.instance.material.opacity = 1;
mesh.instance.material[0].color.setRGB(1, 1, 1);
mesh.instance.material[0].opacity = 1;
mesh.visible = true;
mesh.updateInstance('visible');
@ -630,31 +617,17 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) {
this.minimumRendererRed += 0.01;
this.fog.density -= 0.00025;
if (this.fog.density < 0.0055) {
this.fog.density = 0.0055;
this.lightDirectional.intensity += 0.1;
if (this.lightDirectional.intensity >= 1.2) {
this.lightDirectional.intensity = 1.2;
}
this.fog.updateInstance('density');
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.lightDirectional.updateInstance('intensity');
this.lightAmbient.intensity += 0.1;
if (this.lightAmbient.intensity >= 1) {
this.lightAmbient.intensity = 1;
}
this.lightAmbient.updateInstance('intensity');
mesh.burningTreeParticleEngine.enabled = true;
@ -696,19 +669,13 @@ if (this.mouseIsDown) {
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;
if (this.throwerLight.intensity > 2) {
this.throwerLight.intensity = 2;
if (this.throwerLight.intensity > 2.5) {
this.throwerLight.intensity = 2.5;
}
this.throwerLight.updateInstance('intensity');
var intersects = this.raycaster.getIntersectedObjects(this.scene.meshes);
var intersects = this.raycaster.getIntersectedObjects(this.scene.clones);
intersects.map(
function (intersect) {
@ -737,7 +704,7 @@ if (this.mouseIsDown) {
this.burn(mesh);
}
mesh.instance.material.color.setRGB(
mesh.instance.material[0].color.setRGB(
mesh.burnLife,
mesh.burnLife,
mesh.burnLife
@ -798,12 +765,6 @@ if (this.mouseIsDown) {
else {
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;
if (this.throwerLight.intensity < 0) {
this.throwerLight.intensity = 0;