Clouds are affected by (underlying) lightmap
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
module Dodge.Creature.ShadowBox
|
||||
where
|
||||
import Dodge.Data
|
||||
import Polyhedra
|
||||
import Geometry
|
||||
|
||||
import qualified Data.IntMap as IM
|
||||
crToBox :: Creature -> [[Point3]]
|
||||
crToBox cr = map (map f . polyToTris) $ boxXYZ 10 10 15
|
||||
where
|
||||
f = (+ V3 (x-5) (y-5) 1)
|
||||
V2 x y = _crPos cr
|
||||
youBox' :: World -> [[Point3]]
|
||||
youBox' w = crToBox' $ _creatures w IM.! 0
|
||||
|
||||
youBox :: World -> [Point3]
|
||||
youBox = concat . youBox'
|
||||
|
||||
crToBox' :: Creature -> [[Point3]]
|
||||
crToBox' cr = map (map f . polyToTris) $ boxXYZ 20 20 15
|
||||
where
|
||||
f = (+ V3 (x-10) (y-10) 1)
|
||||
V2 x y = _crPos cr
|
||||
|
||||
youSil :: World -> [Point3]
|
||||
youSil = constructEdgesList . youBox'
|
||||
Reference in New Issue
Block a user