reanimate-1.1.2.1: Animation library based on SVGs.

Reanimate.Effect

Description

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

# Primitive Effects

type Effect Source #

Arguments

 = 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.

Change image opacity from 0 to 1.

Change image opacity from 1 to 0. Reverse of fadeInE.

Change stroke width from 0 to given value.

Change stroke width from given value to 0. Reverse of fadeLineInE.

Change fill opacity from 0 to 1.

Effect of progressively drawing the image. Note that this will only affect primitive shapes (see pathify).

Reverse of drawInE.

Move the image from its current position to the target x y coordinates.

Change scale from 1 to given value.

constE :: (Tree -> Tree) -> Effect Source #

Build an effect from an image-modifying function. This effect does not change as time passes.

# Modifying Effects

Arguments

 :: 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.

Arguments

 :: 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.

Arguments

 :: 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.

reverseE effect starts where the effect ends and vice versa.

Delay the effect so that it only starts after specified duration and then runs till the end of animation.

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.

# Applying Effects to Animations

Modify the animation by applying the effect. If desired, you can apply multiple effects to single animation by calling this function multiple times.