Add "cap" shadow shader

This commit is contained in:
2021-08-29 18:13:55 +01:00
parent d23f36ea95
commit eba8ff121c
12 changed files with 66 additions and 8 deletions
+5 -2
View File
@@ -4,10 +4,11 @@ Explosions: creation of shockwave and particles at a given point.
module Dodge.WorldEvent.Explosion
where
import Dodge.Data
import Dodge.Default
import Dodge.Base.Zone
import Dodge.Base.Collide
import Dodge.WorldEvent.SpawnParticle
import Dodge.WorldEvent.Flash
--import Dodge.WorldEvent.Flash
import Dodge.RandomHelp
import Dodge.SoundLogic
import Dodge.SoundLogic.Synonyms
@@ -69,9 +70,11 @@ makeExplosionAt
makeExplosionAt p w
= soundOncePos grenadeBang p
. addFlames
. explosionFlashAt p
-- . explosionFlashAt p
. over tempLightSources (theTLS :)
$ makeShockwaveAt [] p 50 50 1 white w
where
theTLS = defaultTLS {_tlsPos = addZ 20 p, _tlsIntensity = V3 1 0.5 0, _tlsTime = 20, _tlsRad = 150}
fVs = replicateM 15 (randInCirc 1) & evalState $ _randGen w
fPs'' = replicateM 15 (fmap (15 *.*.*) randInHemisphere) & evalState $ _randGen w
(fPs',zs) = let (a,b,c) = unzip3 $ map fromV3 fPs''