friz
An animation control system for JUCE
|
An Animation class that can hold multiple Animation objects and execute them in sequence. More...
#include <sequence.h>
Public Member Functions | |
Sequence (int id=0) | |
void | addAnimation (std::unique_ptr< Animation< ValueCount > > effect) |
Add an animation with the correct number of values to our sequence of effects. | |
Public Member Functions inherited from friz::Chain | |
Chain (int id=0) | |
bool | isFinished () override |
bool | isReady () const override |
AnimationType::Status | gotoTime (juce::int64 timeInMs) override |
Advance all active animations to this point in time. | |
void | cancel (bool moveToEndPosition) override |
Cancel an in-progress animation, optionally moving directly to its end value. | |
void | addAnimation (std::unique_ptr< AnimationType > effect) |
AnimatedValue * | getValue (size_t index) override |
Retrieve a pointer to one of this animation's value objects. | |
Public Member Functions inherited from friz::AnimationType | |
AnimationType (int id) | |
int | getId () const |
void | setDelay (int delay) |
virtual bool | setValue (size_t, std::unique_ptr< AnimatedValue >) |
virtual Status | gotoTime (juce::int64 timeInMs)=0 |
Advance all active animations to this point in time. | |
virtual void | cancel (bool moveToEndPosition)=0 |
Cancel an in-progress animation, optionally moving directly to its end value. | |
virtual bool | isFinished ()=0 |
virtual bool | isReady () const =0 |
virtual AnimatedValue * | getValue (size_t index)=0 |
Retrieve a pointer to one of this animation's value objects. | |
void | onCompletion (CompletionFn complete) |
Public Member Functions inherited from friz::UpdateSource< ValueCount > | |
void | onUpdate (UpdateFn update) |
Additional Inherited Members | |
Public Types inherited from friz::AnimationType | |
enum class | Status { processing , finished } |
using | CompletionFn = std::function< void(int, bool)> |
callback on completion of this effect | |
Public Types inherited from friz::UpdateSource< ValueCount > | |
using | ValueList = std::array< float, ValueCount > |
using | UpdateFn = std::function< void(int, const ValueList &)> |
Public Attributes inherited from friz::AnimationType | |
CompletionFn | completionFn |
function to call when the animation is completed or canceled. | |
Public Attributes inherited from friz::UpdateSource< ValueCount > | |
UpdateFn | updateFn |
Protected Attributes inherited from friz::Chain | |
std::vector< std::unique_ptr< AnimationType > > | sequence |
the vector that owns our chain of effects. | |
int | currentEffect { 0 } |
index (into the sequence vector) of the effect that we are currently processing. | |
Protected Attributes inherited from friz::AnimationType | |
int | animationId { 0 } |
optional ID value for this animation. | |
int | preDelay { 0 } |
an optional pre-delay before beginning to execute the effect. | |
An Animation class that can hold multiple Animation objects and execute them in sequence.
An easy way to create complex effects from primitive movements. This differs from the Chain class in that all the animations in a Sequence must have the same ValueCount template parameter, because a single update callback is used for all of the sub-animations' updates.
|
inline |
Add an animation with the correct number of values to our sequence of effects.
effect | The animation to add. |