mirror of
https://github.com/reanimate/reanimate.git
synced 2026-09-12 00:23:08 +00:00
Polish object interface (#138)
This commit is contained in:
parent
61fd6bc743
commit
83e4ecd987
7 changed files with 261 additions and 85 deletions
19
examples/doc_spriteScope.hs
Executable file
19
examples/doc_spriteScope.hs
Executable file
|
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/env stack
|
||||
-- stack runghc --package reanimate
|
||||
module Main(main) where
|
||||
|
||||
import Reanimate
|
||||
import Reanimate.Builtin.Documentation
|
||||
|
||||
main :: IO ()
|
||||
main = reanimate $ docEnv $ sceneAnimation $ do
|
||||
-- the rect lives through the entire 3s animation
|
||||
newSpriteSVG_ $ translate (-3) 0 $ mkRect 4 4
|
||||
wait 1
|
||||
spriteScope $ do
|
||||
-- the circle only lives for 1 second.
|
||||
local <- newSpriteSVG $ translate 3 0 $ mkCircle 2
|
||||
spriteE local $ overBeginning 0.3 fadeInE
|
||||
spriteE local $ overEnding 0.3 fadeOutE
|
||||
wait 1
|
||||
wait 1
|
||||
Loading…
Reference in a new issue