Safe Haskell | None |
---|---|
Language | Haskell2010 |
Effects represent modifications applied to frames of the Animation
.
Effects can (and usually do) depend on time.
One or more effects can be applied over the entire duration of animation, or modified to affect
only a specific portion at the beginning / middle / end of the animation.
Synopsis
- type Effect = Duration -> Time -> Tree -> Tree
- fadeInE :: Effect
- fadeOutE :: Effect
- fadeLineInE :: Double -> Effect
- fadeLineOutE :: Double -> Effect
- fillInE :: Effect
- drawInE :: Effect
- drawOutE :: Effect
- translateE :: Double -> Double -> Effect
- scaleE :: Double -> Effect
- constE :: (Tree -> Tree) -> Effect
- overBeginning :: Duration -> Effect -> Effect
- overEnding :: Duration -> Effect -> Effect
- overInterval :: Time -> Time -> Effect -> Effect
- reverseE :: Effect -> Effect
- delayE :: Duration -> Effect -> Effect
- aroundCenterE :: Effect -> Effect
- applyE :: Effect -> Animation -> Animation
Primitive Effects
= Duration | Duration of the effect (in seconds) |
-> Time | Time elapsed from when the effect started (in seconds) |
-> Tree | Image to be modified |
-> Tree | Image after modification |
An Effect represents a modification of a SVG Tree
that can vary with time.
fadeLineInE :: Double -> Effect Source #
Change stroke width from 0 to given value.
fadeLineOutE :: Double -> Effect Source #
Change stroke width from given value to 0. Reverse of fadeLineInE
.
Effect of progressively drawing the image. Note that this will only affect primitive shapes (see pathify
).
translateE :: Double -> Double -> Effect Source #
Move the image from its current position to the target x y coordinates.
constE :: (Tree -> Tree) -> Effect Source #
Build an effect from an image-modifying function. This effect does not change as time passes.
Modifying Effects
:: Duration | Duration of the initial segment of the animation over which the Effect should be applied |
-> Effect | The Effect to modify |
-> Effect | Effect which will only affect the initial segment of the animation |
Modify the effect so that it only applies to the initial part of the animation.
:: Duration | Duration of the ending segment of the animation over which the Effect should be applied |
-> Effect | The Effect to modify |
-> Effect | Effect which will only affect the ending segment of the animation |
Modify the effect so that it only applies to the ending part of the animation.
:: Time | time after start of animation when the effect should start |
-> Time | time after start of the animation when the effect should finish |
-> Effect | The Effect to modify |
-> Effect | Effect which will only affect the specified interval within the animation |
Modify the effect so that it only applies within given interval of animation's running time.
delayE :: Duration -> Effect -> Effect Source #
Delay the effect so that it only starts after specified duration and then runs till the end of animation.
aroundCenterE :: Effect -> Effect Source #
Transform the effect so that the image passed to the effect's image-modifying
function has coordinates (0, 0) shifted to the center of its bounding box.
Also see aroundCenter
.