Merge remote-tracking branch 'origin/feature/#313'
This commit is contained in:
commit
765d0986bf
@ -120,11 +120,13 @@ const applyEffects = (effectValues: any) => {
|
|||||||
effects.light.value.clear().fillStyle(0x000000, darkness).fillRect(0, 0, window.innerWidth, window.innerHeight)
|
effects.light.value.clear().fillStyle(0x000000, darkness).fillRect(0, 0, window.innerWidth, window.innerHeight)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (effects.rain)
|
if (effects.rain.value) {
|
||||||
effects.rain.value.start().setQuantity(effectValues.rain / 10)
|
if (effectValues.rain.value)
|
||||||
else effects.rain.value.stop()
|
effects.rain.value.start().setQuantity(effectValues.rain / 10)
|
||||||
|
else effects.rain.value.stop()
|
||||||
|
}
|
||||||
|
|
||||||
effects.fog.value.setAlpha(effectValues.fog/100)
|
if (effectValues.fog.value && effects.fog.value) effects.fog.value.setAlpha(effectValues.fog/100);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Linear Interpolation
|
// Linear Interpolation
|
||||||
@ -132,7 +134,7 @@ const applyEffects = (effectValues: any) => {
|
|||||||
// a = 0 return x
|
// a = 0 return x
|
||||||
// a = 0.5 return (x+y)/2
|
// a = 0.5 return (x+y)/2
|
||||||
// a = 1 return y
|
// a = 1 return y
|
||||||
const lerp = (x,y,a) => x * (1-a) + y * a
|
const lerp = (x:number,y:number,a:number) => x * (1-a) + y * a
|
||||||
|
|
||||||
const calculateLightStrength = (time: Date): number => {
|
const calculateLightStrength = (time: Date): number => {
|
||||||
const hour = time.getHours()
|
const hour = time.getHours()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user