Easy particle systems with fine grained control.
Table of Contents
What
Flare is a library designed to allow quick and precise particle effect creations. It does not concern itself with displaying and only with the management and movement of particles. As such, it can easily be integrated into any existing or future application.
So What's Different? Why Should I Use This?
Usually in particle systems the way you control things is by describing various states on the emitter. Flare instead takes a much more fine-grained approach by allowing you to control individual particles and describe their movement and change over time.
How To
As Flare does not do any graphics on its own, you will first have to create something that can render graphics of some kind. Once you have that, you should subclass particle
to create your own particle types. You should also implement methods on paint
so that the particle can be drawn. The last thing that's needed is a method on call-with-translation
that should perform a translation on your drawing target. That should settle everything in terms of hooking Flare up to your graphics system.
Next you will need to keep a scene
instance into which your particles will be spawned and your animations will be played. You should then call paint
on the scene object in your drawing loop and call start
on the scene object when your application is initialised.
Finally, the exciting part: defining animation progressions. This happens through define-progression
, which creates a globally named progression-definition
. The body of a definition is made up of a series of intervals and animations. Each animation is composed of a selector and a bunch of changes. The selector decides to which units in the scene the changes should apply, and the changes decide what happens while the animation runs.
So let's look at a simple example. We'll create a particle that spins on a circle.
(define-progression spinner
0 0 (T (enter ring :size 100 :children (sphere :size 10)))
0 T (> (increase angle :by 360 :for 1)))
This defines a progression named spinner
with two animations
- The first animation takes place from the 0th second to the 0th second, so it will only ever happen exactly once. It applies to the scene object itself and causes only a single change. This change
enter
s a ring of size 100 with a single sphere child of size 10 into the scene. - The second animation takes place from the 0th second to infinity, so it'll go on as long as we keep the scene running. It applies to the children of the scene object (in this case the ring) and has a single change that will increase the angle by 360 every second.
Here sphere
is the name of a simple particle. If you named your particle class something else, replace that with your own. In order to make the progression have an effect on our scene, we need to instantiate it and add it to the scene. You can instantiate a progression with progression-instance
and add it to the scene by enter
. Finally, we'll want to start it to see it in action.
(start (enter (progression-instance 'spinner) scene-instance))
We can change the example to be a bit more exciting by making it be a pendulum instead of a mere spinner. To do this we substitute a calc
cahnge for the increase
change:
(calc angle :to (+ 90 (* (sin (* clock 4)) 40)))
You can redefine the progression on the fly while it is still running and it should gracefully update on your screen. This should allow you to easily hack out rather complex animations. If you want to start again from the beginning, call reset
on the progression instance.
An example implementation of all this including some nifty show progressions can be found in the flare-viewer
system. You can also use this system yourself to play around with progressions for a bit.
Internals
Flare must handle two parts-- one the animation itself, and two the objects in the scene.
Scene Graph
The scene graph is made up of unit
s and container
s. Each unit must have a symbol for a name and each container has some data structure that can hold other objects. You can add and remove objects from a container using enter
and leave
respectively. If you need to iterate over the entirety of the scene graph referenced by a container, use map-container-tree
or do-container-tree
. Since containers should only hold units, you can use container-unit
for further nesting levels. At the bottom of the entire thing should be a scene-graph
, which allows you to retrieve any unit within it by its name using the unit
function.
Building up on this are the scene
and entity
classes. The scene furthermore is paintable
, animatable
, and a clock
, so that it can be drawn, animated, and can keep the time. An entity can always contain further entities, and aside from being paintable and animatable as well, it also always has a location
vector so that we can move it around. All entities are always relative to their parent in their location. The transformation of this is achieved by a call-with-translation
around each paint
call.
Any animatable
can keep a set of progression
instances that will be automatically updated when the animatable is, and thus carry out their transformations for as long as they should be active.
Animation
The animation process is divided up into progression-definition
s, progression
s, animation
s, and change
s. Progression-definitions merely exist as containers to instantiate and update progressions from. When their animations
slot is set, they automatically update all instances.
A progression is more complicated however as it has to actually manage all the various animations, ensure they're run in the proper order and for just long enough, and it has to make it possible to rewind everything and reset the state of the scene to how things were before. Thus, progressions each have three vectors of present-animations
, past-animations
, and future-animations
. Since they must also know whom to act upon, they keep a back-link to the animatable
that they should modify.
Each update
then the progression checks if any new animations now have their time to shine and if so, move them onto the present set. All the present animations then get tick
ed with their appropriate time-step and the animatable passed along. Finally, all animations that are past their prime and have exceeded their duration are moved off onto the past set. If there are no more future or present animations available, the progression knows it's done and stops itself.
Now, when a progression is reset
, it shuffles all the past animations into the present set, reorders everything in reverse, and then resets each animation in sequence. Each animation then causes each change to be reset, hopefully one by one back-tracking all the changes that were made to the scene.
Thus by coupling a reset with an explicit clock-set and an update, a progression can be explicitly fast-forwarded or rewound to any particular point in its life-cycle and all the updates should stay consistent throughout.
When an animation is ticked, the actual entity selection process starts to happen. When the progression is defined, each animation must be supplied with a selector, which is compiled down to a chain of function calls that either expand or limit the set of applicable objects. For a list of the possible selector constraints, see compile-constraint
. Each change of the animation is then ticked with each object that passed the constraint functions.
Finally, changes. Changes are divided into operation
s and tween
s. Operations change the scene in some way by adding, removing, or moving entities around. They should not affect any internal state of entities and only affect the object tree. Tweens on the other hand do the opposite and should only modify the internal state of whatever object they are passed in their tick
call, but should never change the object tree in any way.
Flare supplies several default changes, some of which have parsers (define-change-parser
) so that they can actually be used from a progression definition. On the operations side, we have enter-operation
and leave-operation
used to add or remove objects respectively. The enter-operation is significant in the sense that it uses a creator
function that can potentially instantiate arbitrarily many or arbitrarily deep structures. On the tween side we have several mixins to make the definition of your own tweens easier (range-tween
constant-tween
slot-tween
accessor-tween
), from which two usable tweens arise, range-accessor-tween
(set
) and increase-accessor-tween
(increase
). There's one more notable tween to mention: call-accessor-tween
(calc
), which sets the slot according to a user-definable function.
Each change must know by itself how to reset the objects it acted upon to their initial state. The slot-tween
and accessor-tween
know how to do this by saving the original value of each object they act upon. Similarly, the enter and leave operations keep track of where they added or removed which objects.
Videos
Here are some demo videos made during various points in the development of Flare.
System Information
Definition Index
-
FLARE-INDEXED-SET
- ORG.SHIRAKUMO.FLARE.INDEXED-SET
No documentation provided.-
EXTERNAL CLASS INDEXED-SET
A set in which each element also has an index. Aside from MAP-SET and DO-SET you can also use ITERATE to go through the set by FOR .. ON-SET or FOR .. IN-SET. See QUEUE See SET See MAKE-INDEXED-SET See MAP-SET See DO-SET See SET-ADD See SET-REMOVE See SET-SIZE See SET-FIRST See SET-LAST See SET-VALUE-AT See SET-INDEX-OF See CLEAR-SET See IN-SET-P See COERCE-SET
-
EXTERNAL FUNCTION CLEAR-SET
- QUEUE
- &REST
Removes all values from the set. See INDEXED-SET
-
EXTERNAL FUNCTION COERCE-SET
- SET
- TYPE
- &REST
Allows coercing the set to: indexed-set, hash-table, queue, list, vector, or sequence. See INDEXED-SET See COERCE-QUEUE
-
EXTERNAL FUNCTION IN-SET-P
- VALUE
- SET
- &REST
Returns T if the value is contained in the set. See INDEXED-SET
-
EXTERNAL FUNCTION MAKE-INDEXED-SET
Creates a new indexed set. See INDEXED-SET
-
EXTERNAL FUNCTION MAP-SET
- FUNCTION
- QUEUE
- &REST
Maps the function over all elements of the set in order. See INDEXED-SET
-
EXTERNAL FUNCTION SET-ADD
- VALUE
- SET
- &REST
Add a new value to the set. Returns two values, the value that was added, and whether it was added as a new element to the set. If it already existed, the second value is NIL. See INDEXED-SET
-
EXTERNAL FUNCTION SET-ADD-AFTER
- BEFORE
- VALUE
- SET
- &REST
No documentation provided. -
EXTERNAL FUNCTION SET-ADD-BEFORE
- AFTER
- VALUE
- SET
- &REST
No documentation provided. -
EXTERNAL FUNCTION SET-FIRST
- QUEUE
- &REST
Returns the first item in the set. See INDEXED-SET
-
EXTERNAL FUNCTION SET-INDEX-OF
- VALUE
- QUEUE
- &REST
Returns the index of the value in the set. See INDEXED-SET
-
EXTERNAL FUNCTION SET-LAST
- QUEUE
- &REST
Returns the last item in the set. See INDEXED-SET
-
EXTERNAL FUNCTION SET-REMOVE
- VALUE
- SET
- &REST
Remove a value from the set. Returns two values, the set that was modified, and whether the value existed in the set to begin with. If it did not, the second value is NIL. See INDEXED-SET
-
EXTERNAL FUNCTION SET-SIZE
- QUEUE
- &REST
Returns the number of items in the set. See INDEXED-SET
-
EXTERNAL FUNCTION SET-VALUE-AT
- N
- QUEUE
- &REST
Returns the value at the given index in the set. See INDEXED-SET
-
EXTERNAL FUNCTION (SETF SET-VALUE-AT)
- VALUE
- N
- QUEUE
- &REST
No documentation provided. -
EXTERNAL MACRO DO-SET
- VALUE
- QUEUE
- &OPTIONAL
- RESULT
- &REST
- &BODY
- BODY
- &REST
Iterates over all elements of the set in order. See INDEXED-SET
-
FLARE-QUEUE
- ORG.SHIRAKUMO.FLARE.QUEUE
No documentation provided.-
EXTERNAL CLASS QUEUE
Implements an ordered queue. Aside from MAP-QUEUE and DO-QUEUE you can also use ITERATE to go through the set by FOR .. ON-QUEUE or FOR .. IN-QUEUE. See HEAD See TAIL See SIZE See MAP-QUEUE See DO-QUEUE See ENQUEUE See DEQUEUE See QUEUE-REMOVE See QUEUE-SIZE See QUEUE-FIRST See QUEUE-LAST See QUEUE-VALUE-AT See QUEUE-INDEX-OF See CLEAR-QUEUE See IN-QUEUE-P See COERCE-QUEUE
-
EXTERNAL STRUCTURE CELL
-
EXTERNAL BINDING IN-QUEUE
No documentation provided. -
EXTERNAL BINDING OF-QUEUE
No documentation provided. -
EXTERNAL FUNCTION CELL-INSERT-AFTER
- CELL
- NEIGHBOR
- &REST
Inserts the cell after its neighbour, making sure to keep all links updated. See CELL
-
EXTERNAL FUNCTION CELL-INSERT-BEFORE
- CELL
- NEIGHBOR
- &REST
Inserts the cell before its neighbour, making sure to keep all links updated. See CELL
-
EXTERNAL FUNCTION CELL-REMOVE
- CELL
- &REST
Removes the cell out of the link chain, making sure to keep all links updated. Unless the cell is the only item in the link chain, its left/right slots are not modified. See CELL
-
EXTERNAL FUNCTION CELL-TIE
- LEFT
- RIGHT
- &REST
Tie the two cells together so that they become adjacent. See CELL
-
EXTERNAL FUNCTION CLEAR-QUEUE
- QUEUE
- &REST
Removes all elements from the queue. See QUEUE
-
EXTERNAL FUNCTION COERCE-QUEUE
- QUEUE
- TYPE
- &REST
Allows coercing the queue to: queue, list, vector, or sequence. See QUEUE
-
EXTERNAL FUNCTION DEQUEUE
- QUEUE
- &REST
Pops the next value off the front of the queue. The second value indicates whether there was any element in the queue at all. See QUEUE
-
EXTERNAL FUNCTION ENQUEUE
- VALUE
- QUEUE
- &REST
Inserts the given value at the end of the queue. See QUEUE
-
EXTERNAL FUNCTION IN-QUEUE-P
- VALUE
- QUEUE
- &REST
Returns T if the given value is found in the queue. See QUEUE
-
EXTERNAL FUNCTION LEFT
- INSTANCE
- &REST
Accesses the cell left to the current cell. See CELL
-
EXTERNAL FUNCTION (SETF LEFT)
- VALUE
- INSTANCE
- &REST
No documentation provided. -
EXTERNAL FUNCTION MAKE-CELL
- VALUE
- LEFT
- RIGHT
- &REST
Constructs a new queue cell. See CELL
-
EXTERNAL FUNCTION MAKE-QUEUE
- &REST
- ITEMS
- &REST
Creates a new queue instance. See QUEUE
-
EXTERNAL FUNCTION MAP-QUEUE
- FUNCTION
- QUEUE
- &REST
Maps the function over all values in the queue in order. See QUEUE
-
EXTERNAL FUNCTION QUEUE-FIRST
- QUEUE
- &REST
Returns the first (front) value in the queue if there is any. The second value indicates whether there was any element in the queue at all. See QUEUE
-
EXTERNAL FUNCTION QUEUE-INDEX-OF
- VALUE
- QUEUE
- &REST
Returns the index of the value in the queue. If the value could not be found, NIL is returned instead. This is potentially very costly as it might have to scan the entire queue. See QUEUE
-
EXTERNAL FUNCTION QUEUE-LAST
- QUEUE
- &REST
Returns the last (end) value in the queue if there is any. The second value indicates whether there was any element in the queue at all. See QUEUE
-
EXTERNAL FUNCTION QUEUE-REMOVE
- VALUE
- QUEUE
- &REST
Removes the given value from the queue. This is potentially very costly as it might have to scan the entire queue. See QUEUE
-
EXTERNAL FUNCTION QUEUE-SIZE
- QUEUE
- &REST
Returns the number of elements in the queue. See QUEUE
-
EXTERNAL FUNCTION QUEUE-VALUE-AT
- N
- QUEUE
- &REST
Returns the value at the given position in the queue. The second value is NIL if the position is out of range. This is potentially very costly as it might have to scan the entire queue. See QUEUE
-
EXTERNAL FUNCTION (SETF QUEUE-VALUE-AT)
- VALUE
- N
- QUEUE
- &REST
No documentation provided. -
EXTERNAL FUNCTION REMOVE-CELLS
- LEFT
- RIGHT
- &REST
Removes all cells between and including the given left and right cells. Note that the consequences are undefined if the given left cell is actually to the right of the right cell, or if they are from different queues entirely. See CELL
-
EXTERNAL FUNCTION RIGHT
- INSTANCE
- &REST
Accesses the cell right to the current cell. See CELL
-
EXTERNAL FUNCTION (SETF RIGHT)
- VALUE
- INSTANCE
- &REST
No documentation provided. -
EXTERNAL FUNCTION VALUE
- INSTANCE
- &REST
Accesses the value contained in a queue cell. See CELL
-
EXTERNAL FUNCTION (SETF VALUE)
- VALUE
- INSTANCE
- &REST
No documentation provided. -
EXTERNAL MACRO DO-QUEUE
- VALUE
- QUEUE
- &OPTIONAL
- RESULT
- &REST
- &BODY
- BODY
- &REST
Iterates over each value in the queue in order. See QUEUE
-
FLARE
- ORG.SHIRAKUMO.FLARE
No documentation provided.-
EXTERNAL CLASS ANIMATABLE
Superclass container for anything that is animatable through progressions. See PROGRESSIONS
-
EXTERNAL CLASS ANIMATION
A representation for a single set of changes in a progression. When an animation is ticked, the following happens: 1. The selector is called with the given animatable and a function 2. Once the selector calls its function with a matching object, each change in the animation is ticked with the matching object as argument. When an animation is reset, each change in the animation is also reset. This should cause whatever effect it might have had to be restored on the scene. This is particularly tricky for operations as they need to ensure the scene stays consistent. See START See DURATION See SELECTOR See CHANGES
-
EXTERNAL CLASS ARC
Formation to represent an equidistant distribution of entities along an arc. See FORMATION See ORIENTED-ENTITY See SIZED-ENTITY See UP See TANGENT See ANGLE See SPACING
-
EXTERNAL CLASS CALL-ACCESSOR-TWEEN
Combination of a call-change and an accessor-tween. Creation: (calc accessor :to form) The FORM may use the implicit variables OBJECT, CLOCK, and STEP. Implements TWEEN-VALUE. See CALL-CHANGE See SLOT-TWEEN See TWEEN-VALUE
-
EXTERNAL CLASS CALL-CHANGE
-
EXTERNAL CLASS CALL-SLOT-TWEEN
Combination of a call-change and a slot-tween. Implements TWEEN-VALUE. See CALL-CHANGE See SLOT-TWEEN See TWEEN-VALUE
-
EXTERNAL CLASS CHANGE
Container for a single change or tween within an animation.
-
EXTERNAL CLASS CLOCK
-
EXTERNAL CLASS CONSTANT-TWEEN
-
EXTERNAL CLASS CONTAINER
A simple class that can hold a set of objects. See CLEAR See OBJECTS See ENTER See LEAVE See MAP-CONTAINER-TREE See DO-CONTAINER-TREE See PRINT-CONTAINER-TREE
-
EXTERNAL CLASS CONTAINER-UNIT
-
EXTERNAL CLASS ENTER-OPERATION
Represents an operation that introduces new objects into the scene graph. Creation: (enter class :n number-of-copies :children child-forms :parent parent init-args..) Child-forms being a list of enter forms, excluding the ENTER symbol at the start. init-args being further initialisation arguments to be passed to the class that's being instantiated. Upon TICK, the CREATOR function is executed and each resulting object is ENTERed into the given target animatable. See OPERATION See OBJECTS See CREATOR
-
EXTERNAL CLASS ENTITY
A paintable and animatable entity within a scene. See CONTAINER-UNIT See PAINTABLE See ANIMATABLE See LOCATION
-
EXTERNAL CLASS FORMATION
Entity superclass for all formations. Formations only handle the positioning of child entities, but do not display by themselves. See ENTITY
-
EXTERNAL CLASS INCREASE-SLOT-TWEEN
Combination of a constant-tween and a slot-tween. See CONSTANT-TWEEN See SLOT-TWEEN
-
EXTERNAL CLASS LEAVE-OPERATION
-
EXTERNAL CLASS OPERATION
Superclass for changes that modify the scene graph by adding, removing, or moving elements within it. See CHANGE
-
EXTERNAL CLASS ORIENTED-ENTITY
An entity that can be oriented by a vector. See ENTITY See ORIENTATION
-
EXTERNAL CLASS PAINTABLE
-
EXTERNAL CLASS PARTICLE
Entity superclass for all particles. Particles should not move by themselves and only handle the displaying. See ENTITY
-
EXTERNAL CLASS PRINT-CHANGE
-
EXTERNAL CLASS PROGRESSION
The controller to animate an animatable with. Contains an entire sequence of animations and controls their behaviour and effects on the animatable. When animations on the progression are set, the following happens: 1. The current clock is saved. 2. The progression is reset. 3. The new animations are set to the future set and sorted, the other sets are cleared and reinitialised to match the appropriate length. 4. The clock is set to the previously saved time. 5. All applicable animations are put into effect in fast-forwarding by calling UPDATE on the progression. When a progression is reset, the following happens: 1. All past animations are pushed onto the present set. 2. The active animations are re-sorted to ensure consistency. 3. All the animations in the present set are reset in order. 4. All animations are pushed onto the future set. 5. The clock is fixed. When a progression is updated, the following happens: 1. New animations that are now active during the current clock are shifted from the future set to the present set. 2. When the progression has an animatable, each animation is ticked. For this, the tick step must be calculated. If the duration of the animation is infinite, the tick is T. If the animation exceeded its duration, it is 1.0. Otherwise it is the linear interpolation between the current clock time, the beginning of the animation, and its duration. 3. Animations that have exceeded their duration are shifted from the present set onto the past set. 4. If no present or future animations remain, the progression stops itself. See CLOCK See DEFINITION See ANIMATABLE See ACTIVE See ENDED See FUTURE
-
EXTERNAL CLASS PROGRESSION-DEFINITION
Container class to instantiate a progression from. The definition should at all time keep track of the existing instances and update them in case the definition gets updated with new animations. When the animations of the definition are set, the animations are also set for each of the known instances of the definition. See ANIMATIONS See INSTANCES
-
EXTERNAL CLASS RANGE-SLOT-TWEEN
Combination of a range-tween and a slot-tween. See RANGE-TWEEN See SLOT-TWEEN
-
EXTERNAL CLASS RANGE-TWEEN
-
EXTERNAL CLASS RING
Formation to represent an equidistant distribution of entities along a ring. See ARC
-
EXTERNAL CLASS SCENE
Container class to represent the top-level scene that should be drawn and managed. See SCENE-GRAPH See CLOCK See PAINTABLE See ANIMATABLE
-
EXTERNAL CLASS SCENE-GRAPH
A scene-graph is a container that also has a name-map to easily reach objects. This includes all objects in the container tree that have a non-NIL name. See CONTAINER
-
EXTERNAL CLASS SIZED-ENTITY
-
EXTERNAL CLASS SLOT-TWEEN
A tween mixin that modifies a slot on the object. Upon TICK the slot-value is set with the result of TWEEN-VALUE. See TWEEN See SLOT See ORIGINALS See TWEEN-VALUE
-
EXTERNAL CLASS TARGET
Superclass for a painting device onto which things can be drawn. See PAINT See CALL-WITH-TRANSLATION
-
EXTERNAL CLASS TWEEN
Superclass for changes that modify the given animatable, but do not change the scene graph. See CHANGE
-
EXTERNAL CLASS UNIT
A unit is an object with a name.
-
EXTERNAL EASING BACK-IN
Interpolates by a back-in curve. See http://easings.net/
-
EXTERNAL EASING BACK-IN-OUT
Interpolates by a back-in-out curve. See http://easings.net/
-
EXTERNAL EASING BACK-OUT
Interpolates by a back-out curve. See http://easings.net/
-
EXTERNAL EASING BOUNCE-IN
Interpolates by a bounce-in curve. See http://easings.net/
-
EXTERNAL EASING BOUNCE-IN-OUT
Interpolates by a bounce-in-out curve. See http://easings.net/
-
EXTERNAL EASING BOUNCE-OUT
Interpolates by a bounce-out curve. See http://easings.net/
-
EXTERNAL EASING CIRC-IN
Interpolates by a circ-in curve. See http://easings.net/
-
EXTERNAL EASING CIRC-IN-OUT
Interpolates by a circ-in-out curve. See http://easings.net/
-
EXTERNAL EASING CIRC-OUT
Interpolates by a circ-out curve. See http://easings.net/
-
EXTERNAL EASING CUBIC-IN
Interpolates by a cubic-in curve. See http://easings.net/
-
EXTERNAL EASING CUBIC-IN-OUT
Interpolates by a cubic-in-out curve. See http://easings.net/
-
EXTERNAL EASING CUBIC-OUT
Interpolates by a cubic-out curve. See http://easings.net/
-
EXTERNAL EASING ELASTIC-IN
Interpolates by a elastic-in curve. See http://easings.net/
-
EXTERNAL EASING ELASTIC-IN-OUT
Interpolates by a elastic-in-out curve. See http://easings.net/
-
EXTERNAL EASING ELASTIC-OUT
Interpolates by a elastic-out curve. See http://easings.net/
-
EXTERNAL EASING EXPO-IN
Interpolates by a expo-in curve. See http://easings.net/
-
EXTERNAL EASING EXPO-IN-OUT
Interpolates by a expo-in-out curve. See http://easings.net/
-
EXTERNAL EASING EXPO-OUT
Interpolates by a expo-out curve. See http://easings.net/
-
EXTERNAL EASING LINEAR
Interpolates by a linear curve. See http://easings.net/
-
EXTERNAL EASING QUAD-IN
Interpolates by a quad-in curve. See http://easings.net/
-
EXTERNAL EASING QUAD-OUT
Interpolates by a quad-out curve. See http://easings.net/
-
EXTERNAL EASING QUART-IN
Interpolates by a quart-in curve. See http://easings.net/
-
EXTERNAL EASING QUART-IN-OUT
Interpolates by a quart-in-out curve. See http://easings.net/
-
EXTERNAL EASING QUART-OUT
Interpolates by a quart-out curve. See http://easings.net/
-
EXTERNAL EASING QUINT-IN
Interpolates by a quint-in curve. See http://easings.net/
-
EXTERNAL EASING QUINT-OUT
Interpolates by a quint-out curve. See http://easings.net/
-
EXTERNAL EASING SINE-IN
Interpolates by a sine-in curve. See http://easings.net/
-
EXTERNAL EASING SINE-IN-OUT
Interpolates by a sine-in-out curve. See http://easings.net/
-
EXTERNAL EASING SINE-OUT
Interpolates by a sine-out curve. See http://easings.net/
-
EXTERNAL BINDING UPDATE
Iterates over a generic sequence using an ITERATOR, with var being symbol macro to the current item. You may SETF the var to update the item in the sequence, if the underlying iterator supports doing so. Potentially accepts arbitrary arguments, depending on which iterator is selected for the respective object. See FOR-ITERATOR:MAKE-ITERATOR
-
EXTERNAL EASING QUAD-IN-OUT
Interpolates by a quad-in-out curve. See http://easings.net/
-
EXTERNAL EASING QUINT-IN-OUT
Interpolates by a quint-in-out curve. See http://easings.net/
-
EXTERNAL FUNCTION EASE
- X
- BY
- &OPTIONAL
- FROM
- TO
- &REST
Shorthand function to perform an easing interpolation. X must be a float between 0 and 1 BY must name an easing function FROM and TO must be REALs specifying the boundaries of the easing.
-
EXTERNAL FUNCTION EASING
- NAME
- &REST
Accessor to the easing function associated with the given name, if any. See *EASINGS*
-
EXTERNAL FUNCTION (SETF EASING)
- FUNC
- NAME
- &REST
No documentation provided. -
EXTERNAL FUNCTION MAP-CONTAINER-TREE
- FUNCTION
- CONTAINER
- &REST
Recursively maps FUNCTION over all descendants of CONTAINER. See CONTAINER
-
EXTERNAL FUNCTION PRINT
- OBJECT
- &OPTIONAL
- STREAM
- &REST
Output a newline, the mostly READable printed representation of OBJECT, and space to the specified STREAM.
-
EXTERNAL FUNCTION PRINT-CONTAINER-TREE
- CONTAINER
- &OPTIONAL
- DEPTH
- &REST
Prints the entire CONTAINER tree hierarchy nicely to the given STREAM. See CONTAINER
-
EXTERNAL FUNCTION PROGRESSION-DEFINITION
- NAME
- &REST
Accessor to the global progression definition by name. See *PROGRESSIONS*
-
EXTERNAL FUNCTION (SETF PROGRESSION-DEFINITION)
- PROGRESSION
- NAME
- &REST
No documentation provided. -
EXTERNAL FUNCTION REMOVE-EASING
- NAME
- &REST
Removes the easing function associated with the given name. See *EASINGS*
-
EXTERNAL FUNCTION REMOVE-PROGRESSION-DEFINITION
- NAME
- &REST
Remove the global progression definition by name See *PROGRESSIONS*
-
EXTERNAL FUNCTION SET
- SYMBOL
- NEW-VALUE
- &REST
Set SYMBOL's value cell to NEW-VALUE.
-
EXTERNAL GENERIC-FUNCTION ADD-PROGRESSION
- PROGRESSION
- ANIMATABLE
- &REST
Attach a new progression onto the animatable. See PROGRESSION See ANIMATABLE
-
EXTERNAL GENERIC-FUNCTION ANGLE
- ARC
- &REST
Accessor to the angle. See ARC
-
EXTERNAL GENERIC-FUNCTION (SETF ANGLE)
- NEW-VALUE
- OBJECT
- &REST
No documentation provided. -
EXTERNAL GENERIC-FUNCTION ANIMATABLE
- OBJECT
- &REST
Accessor to the animatable the progression is acting upon. See PROGRESSION
-
EXTERNAL GENERIC-FUNCTION (SETF ANIMATABLE)
- NEW-VALUE
- OBJECT
- &REST
No documentation provided. -
EXTERNAL GENERIC-FUNCTION ANIMATIONS
- PROGRESSION-DEFINITION
- &REST
Accessor to the vector of animations that the progression holds.
-
EXTERNAL GENERIC-FUNCTION (SETF ANIMATIONS)
- NEW-VALUE
- OBJECT
- &REST
No documentation provided. -
EXTERNAL GENERIC-FUNCTION BEGINNING
- ANIMATION
- &REST
Accessor to the beginning (in seconds) at which the animation should start. See ANIMATION
-
EXTERNAL GENERIC-FUNCTION (SETF BEGINNING)
- NEW-VALUE
- OBJECT
- &REST
No documentation provided. -
EXTERNAL GENERIC-FUNCTION CALL-WITH-TRANSLATION
- FUNC
- TARGET
- VEC
- &REST
Call FUNC after having performed a translation on TARGET by VEC.
-
EXTERNAL GENERIC-FUNCTION CHANGES
- ANIMATION
- &REST
Accessor to the list of changes that the animation executes. See ANIMATION
-
EXTERNAL GENERIC-FUNCTION (SETF CHANGES)
- NEW-VALUE
- OBJECT
- &REST
No documentation provided. -
EXTERNAL GENERIC-FUNCTION CLEAR
- CONTAINER
- &REST
Removes all objects from the CONTAINER. Returns the object given. See CONTAINER
-
EXTERNAL GENERIC-FUNCTION CLOCK
- CLOCK
- &REST
Accessor to the current time in the clock. Note that the current time in the clock must not necessarily be 100% accurate. In order to get perfectly accurate current time of the clock, you must call UPDATE on it before retrieving its current time value with CLOCK. See CLOCK
-
EXTERNAL GENERIC-FUNCTION (SETF CLOCK)
- NEW-VALUE
- OBJECT
- &REST
No documentation provided. -
EXTERNAL GENERIC-FUNCTION CREATOR
- OBJECT
- &REST
Accessor to the function that upon calling instantiates one or more objects. See ENTER-OPERATION
-
EXTERNAL GENERIC-FUNCTION (SETF CREATOR)
- NEW-VALUE
- OBJECT
- &REST
No documentation provided. -
EXTERNAL GENERIC-FUNCTION DEREGISTER
- UNIT
- SCENE-GRAPH
- &REST
Deregisters the unit with the scene-graph, making it accessible by its name. Any unit that leaves from any part of the scene-graph must be deregistered by this function. This should happen automatically provided you use the CONTAINER-UNIT class for containers inside the scene-graph. Thus you need not call this function unless you implement your own container. See UNIT See SCENE-GRAPH
-
EXTERNAL GENERIC-FUNCTION DURATION
- ANIMATION
- &REST
Accessor to the duration (in seconds) that the animation should be active for. Can also be T, in which case the animation should go on forever. See ANIMATION
-
EXTERNAL GENERIC-FUNCTION (SETF DURATION)
- NEW-VALUE
- OBJECT
- &REST
No documentation provided. -
EXTERNAL GENERIC-FUNCTION EASE-OBJECT
- FROM
- TO
- X
- BY
- &REST
Shorthand function to ease a range. FROM and TO must be matching objects By default works on REALs and VECs. See EASE
-
EXTERNAL GENERIC-FUNCTION ENTER
- UNIT
- SCENE-GRAPH
- &REST
-
EXTERNAL GENERIC-FUNCTION FUTURE-ANIMATIONS
- PROGRESSION
- &REST
Accessor to the vector of animations that have yet to become activated after the current clock time. See PROGRESSION
-
EXTERNAL GENERIC-FUNCTION (SETF FUTURE-ANIMATIONS)
- NEW-VALUE
- OBJECT
- &REST
No documentation provided. -
EXTERNAL GENERIC-FUNCTION INSTANCES
- PROGRESSION-DEFINITION
- &REST
Accessor to all progression instances that were created from this definition. See PROGRESSION-DEFINITION
-
EXTERNAL GENERIC-FUNCTION (SETF INSTANCES)
- NEW-VALUE
- OBJECT
- &REST
No documentation provided. -
EXTERNAL GENERIC-FUNCTION LEAVE
- UNIT
- SCENE-GRAPH
- &REST
-
EXTERNAL GENERIC-FUNCTION LOCATION
- ENTITY
- &REST
Accessor to the location of the entity. See ENTITY
-
EXTERNAL GENERIC-FUNCTION (SETF LOCATION)
- NEW-VALUE
- OBJECT
- &REST
No documentation provided. -
EXTERNAL GENERIC-FUNCTION NAME
- UNIT
- &REST
Reader to the name of the unit. The name may be NIL. See UNIT
-
EXTERNAL GENERIC-FUNCTION NAME-MAP
- SCENE-GRAPH
- &REST
Accessor to the name table of the scene-graph. See SCENE-GRAPH
-
EXTERNAL GENERIC-FUNCTION (SETF NAME-MAP)
- NEW-VALUE
- OBJECT
- &REST
No documentation provided. -
EXTERNAL GENERIC-FUNCTION OBJECTS
- CONTAINER
- &REST
Accessor to a value that stores which objects are being managed.
-
EXTERNAL GENERIC-FUNCTION (SETF OBJECTS)
- NEW-VALUE
- OBJECT
- &REST
No documentation provided. -
EXTERNAL GENERIC-FUNCTION ORIENTATION
- ENTITY
- &REST
Accessor to the vector that defines the orientation of the entity. See ORIENTED-ENTITY
-
EXTERNAL GENERIC-FUNCTION (SETF ORIENTATION)
- NEW-VALUE
- OBJECT
- &REST
No documentation provided. -
EXTERNAL GENERIC-FUNCTION ORIGINAL-VALUE
- OBJECT
- TWEEN
- &REST
Returns the original value this object might have had before the given tween changed anything. See TWEEN
-
EXTERNAL GENERIC-FUNCTION ORIGINALS
- OBJECT
- &REST
A hash table to store the original values of objects before they were changed.
-
EXTERNAL GENERIC-FUNCTION (SETF ORIGINALS)
- NEW-VALUE
- OBJECT
- &REST
No documentation provided. -
EXTERNAL GENERIC-FUNCTION PAINT
- PAINTABLE
- TARGET
- &REST
-
EXTERNAL GENERIC-FUNCTION PAST-ANIMATIONS
- PROGRESSION
- &REST
Accessor to the vector of animations that have ended before the current clock time. See PROGRESSION
-
EXTERNAL GENERIC-FUNCTION (SETF PAST-ANIMATIONS)
- NEW-VALUE
- OBJECT
- &REST
No documentation provided. -
EXTERNAL GENERIC-FUNCTION PRESENT-ANIMATIONS
- PROGRESSION
- &REST
Accessor to the vector of currently active animations within the clock time. See PROGRESSION
-
EXTERNAL GENERIC-FUNCTION (SETF PRESENT-ANIMATIONS)
- NEW-VALUE
- OBJECT
- &REST
No documentation provided. -
EXTERNAL GENERIC-FUNCTION PROGRESSION
- DENOMINATOR
- ANIMATABLE
- &REST
Return the first progression instance that matches the denominator within the container.
-
EXTERNAL GENERIC-FUNCTION PROGRESSION-INSTANCE
- PROGRESSION-DEFINITION
- &REST
Constructs a new progression instance using the given definition. See PROGRESSION See PROGRESSION-DEFINITION
-
EXTERNAL GENERIC-FUNCTION PROGRESSIONS
- ANIMATABLE
- &REST
Accessor to the list of progressions that act upon this. See ANIMATABLE
-
EXTERNAL GENERIC-FUNCTION (SETF PROGRESSIONS)
- NEW-VALUE
- OBJECT
- &REST
No documentation provided. -
EXTERNAL GENERIC-FUNCTION REGISTER
- UNIT
- SCENE-GRAPH
- &REST
Registers the unit with the scene-graph, making it accessible by its name. Any unit that is entered into any part of the scene-graph must be registered by this function. This should happen automatically provided you use the CONTAINER-UNIT class for containers inside the scene-graph. Thus you need not call this function unless you implement your own container. See UNIT See SCENE-GRAPH
-
EXTERNAL GENERIC-FUNCTION REMOVE-PROGRESSION
- PROGRESSION
- ANIMATABLE
- &REST
Remove an existing progression from animatable. See PROGRESSION See ANIMATABLE
-
EXTERNAL GENERIC-FUNCTION RESET
- CLOCK
- &REST
Resets the given clock to its initial state. Returns the object given. See CLOCK
-
EXTERNAL GENERIC-FUNCTION RUNNING
- CLOCK
- &REST
Accessor to whether the clock is currently running or not. See CLOCK
-
EXTERNAL GENERIC-FUNCTION (SETF RUNNING)
- NEW-VALUE
- OBJECT
- &REST
No documentation provided. -
EXTERNAL GENERIC-FUNCTION SCENE-GRAPH
- CONTAINER-UNIT
- &REST
Accessor to the scene-graph the container-unit is in. See CONTAINER-UNIT
-
EXTERNAL GENERIC-FUNCTION (SETF SCENE-GRAPH)
- NEW-VALUE
- OBJECT
- &REST
No documentation provided. -
EXTERNAL GENERIC-FUNCTION SELECTOR
- ANIMATION
- &REST
Accessor to the selector that describes which elements to affect. See ANIMATION See COMPILE-SELECTOR
-
EXTERNAL GENERIC-FUNCTION (SETF SELECTOR)
- NEW-VALUE
- OBJECT
- &REST
No documentation provided. -
EXTERNAL GENERIC-FUNCTION SIZE
- ENTITY
- &REST
Accessor to the size of the entity. See SIZED-ENTITY
-
EXTERNAL GENERIC-FUNCTION (SETF SIZE)
- NEW-VALUE
- OBJECT
- &REST
No documentation provided. -
EXTERNAL GENERIC-FUNCTION SLOT
- OBJECT
- &REST
Accessor to the slot that should be modified.
-
EXTERNAL GENERIC-FUNCTION (SETF SLOT)
- NEW-VALUE
- OBJECT
- &REST
No documentation provided. -
EXTERNAL GENERIC-FUNCTION SPACING
- ARC
- &REST
Accessor to the spacing between items. See ARC
-
EXTERNAL GENERIC-FUNCTION (SETF SPACING)
- NEW-VALUE
- OBJECT
- &REST
No documentation provided. -
EXTERNAL GENERIC-FUNCTION START
- CLOCK
- &REST
Starts the given clock. Returns the object given. See CLOCK
-
EXTERNAL GENERIC-FUNCTION (SETF START)
- NEW-VALUE
- OBJECT
- &REST
No documentation provided. -
EXTERNAL GENERIC-FUNCTION STOP
- CLOCK
- &REST
Stops the given clock. Returns the object given. See CLOCK
-
EXTERNAL GENERIC-FUNCTION SYNCHRONIZE
- CLOCK
- NEW
- &REST
Synchronize the clock to the new time. Time should be another clock or seconds. Returns the object given. See CLOCK
-
EXTERNAL GENERIC-FUNCTION TICK
- ANIMATION
- ANIMATABLE
- CLOCK
- STEP
- &REST
Performs a single update tick, moving along the animation on the animatable at the given clock for the given step amount of time. See ANIMATION See ANIMATABLE See CLOCK
-
EXTERNAL GENERIC-FUNCTION TIMESCALE
- CLOCK
- &REST
Accessor to the timescale of the clock to allow slowing or speeding up the progression of time. See CLOCK
-
EXTERNAL GENERIC-FUNCTION UNIT
- NAME
- SCENE-GRAPH
- &REST
Accessor to a given, named unit in the scene-graph. See UNIT See SCENE-GRAPH
-
EXTERNAL GENERIC-FUNCTION (SETF UNIT)
- VALUE
- N
- CONTAINER
- &REST
No documentation provided. -
EXTERNAL GENERIC-FUNCTION UNITS
- SCENE-GRAPH
- &REST
Returns a fresh list of all units in the scene-graph tree. See UNIT See SCENE-GRAPH
-
EXTERNAL GENERIC-FUNCTION UP
- ARC
- &REST
Accessor to the UP vector. See ARC
-
EXTERNAL GENERIC-FUNCTION (SETF UP)
- NEW-VALUE
- OBJECT
- &REST
No documentation provided. -
EXTERNAL GENERIC-FUNCTION UPDATE
- OBJECT
- DT
- &REST
Updates the given object, causing its internal representation to be adapted for the current time. Returns the object given.
-
EXTERNAL GENERIC-FUNCTION VISIBILITY
- PAINTABLE
- &REST
Accessor to how opaque the paintable is. Has to be a float between 0 and 1. See PAINTABLE
-
EXTERNAL GENERIC-FUNCTION (SETF VISIBILITY)
- NEW-VALUE
- OBJECT
- &REST
No documentation provided. -
EXTERNAL MACRO DEFINE-CHANGE-PARSER
- TYPE
- ARGS
- &BODY
- BODY
- &REST
Define a parser for the given type of change.
-
EXTERNAL MACRO DEFINE-EASING
- NAME
- X
- &REST
- &BODY
- BODY
- &REST
Shorthand macro to define an easing function. See EASING
-
EXTERNAL MACRO DEFINE-PROGRESSION
- NAME
- &BODY
- INTERVALS
- &REST
Convenience macro to define a global progression. Returns the progression name. The formal specification of the body intervals is as follows: body ::= interval* interval ::= start [end] animation* animation ::= (selector change*) change ::= (change-type argument*) start --- A real (in seconds) that represents the starting time of the animations end --- A leal (or T, indicating infinity) that represents the ending time of the animations selector --- A valid selector as per COMPILE-SELECTOR change --- A valid change as per COMPILE-CHANGE If the END is not specified for a given interval, then the next START is taken as the end. If no next start exists, then the end is T. In order to allow brevity, multiple animations can be specified between two time codes. This is then normalised into the strict form of (START DURATION ANIMATION) as per PARSE-INTERVALS. An example definition follows: (define-progression foo 0 (T (enter ring :name :ring :contents (bullet :size 2 :count 20))) 0 8 (:ring (increase size :by 2)) 0 20 (:ring (set angle :to 1000 :ease 'quad-in-out)) ((:ring >) (set size :to 50)) 20 (:ring (leave))) At time 0, a ring is created with name :ring and 20 bullets of size 2 as its children. It is entered into the scene-graph. Then from time 0 to 8, the ring's size is increased by 2 every second. Simultaneously from time 0 to 20 the ring's angle is increased to 1000, eased by the quad-in-out interpolation and the ring's children (the 20 bullets) increase in size to 50. At time 20, the ring is removed from the scene-graph again. See PROGRESSION-DEFINITION See COMPILE-ANIMATIONS
-
EXTERNAL MACRO DO-CONTAINER-TREE
- ITEM
- CONTAINER
- &OPTIONAL
- RETURN
- &REST
- &BODY
- BODY
- &REST
Iterates over all descendants of CONTAINER See MAP-CONTAINER-TREE
-
EXTERNAL MACRO WITH-TRANSLATION
- VEC
- TARGET
- &REST
- &BODY
- BODY
- &REST
Shorthand macro for translation. See CALL-WITH-TRANSLATION
-
EXTERNAL OPTIMIZER PRINT
No documentation provided. -
EXTERNAL OPTIMIZER SET
No documentation provided. -
EXTERNAL TRANSFORM SET
No documentation provided.