Clamp framebuffer textures to edges
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
module Dodge.Event.Test (
|
||||
testEvent,
|
||||
) where
|
||||
module Dodge.Event.Test (testEvent) where
|
||||
|
||||
--import Dodge.Creature.State
|
||||
import Dodge.Data.World
|
||||
--import Control.Lens
|
||||
import Linear
|
||||
import LensHelp
|
||||
import Data.Maybe
|
||||
|
||||
testEvent :: World -> World
|
||||
testEvent w = w
|
||||
|
||||
testEvent w = fromMaybe w $ do
|
||||
cpos <- w ^? cWorld . lWorld . creatures . ix 0 . crPos . _xy
|
||||
let distR = 50
|
||||
distortionBulge = RadialDistortion cpos (cpos + V2 distR 0) (cpos + V2 0 distR) 1.9
|
||||
return $ w & cWorld . lWorld . distortions .~ [distortionBulge]
|
||||
|
||||
Reference in New Issue
Block a user