From 28755a431f92a9534e70e50b6c4660a6ff9f949d Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Fri, 17 Nov 2017 14:51:10 +0100 Subject: [PATCH] Update: CC - Before Render - Moorcow (080g209iov.js) 414 bytes modified --- 080g209iov.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/080g209iov.js b/080g209iov.js index c6684d8..8ecbec2 100644 --- a/080g209iov.js +++ b/080g209iov.js @@ -15,7 +15,8 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) { this.renderer = this.entityLoaded.renderer; this.raycaster = this.entityLoaded.raycaster; this.scene = this.entityLoaded.scene; - this.smokeParticleEngine = this.entityLoaded.smokeParticleEngine; + this.throwerLight = this.entityLoaded.throwerLight; + this.smokeParticleEngine = this.entityLoaded.smokeParticleEngine; this.fireParticleEngine = this.entityLoaded.fireParticleEngine; this.burningTreeParticleEngine = this.entityLoaded.burningTreeParticleEngine; this.explodeParticleEngine = this.entityLoaded.explodeParticleEngine; @@ -377,6 +378,12 @@ if (this.mouseIsDown) { } this.renderer.updateInstance('clearColor'); + this.throwerLight.intensity += 0.01; + if (this.throwerLight.instensity > 2) { + this.throwerLight.instensity = 2; + } + this.throwerLight.updateInstance('instensity'); + var intersects = this.raycaster.getIntersectedObjects(this.scene.meshes); intersects.map( function(intersect) { @@ -462,6 +469,12 @@ if (this.mouseIsDown) { this.fog.color.r = 0.32; } // this.fog.updateInstance('color'); + + this.throwerLight.intensity -= 0.01; + if (this.throwerLight.instensity < 0) { + this.throwerLight.instensity = 0; + } + this.throwerLight.updateInstance('instensity'); } if (this.spawnTime > this.nextSpawnTime) {