Section scripty2 fx
Description
The scripty2 effects framework provides for time-based transformations of DOM elements and arbitrary JavaScript objects. This is at the core of scripty2 and presents a refinement of the visual effects framework of script.aculo.us 1.X.
In practice s2.fx.Morph is most often used, which allows transitions from one
set of CSS style rules to another.
Features
- CSS morphing engine: morph from one set of style properties to an other, including support for all CSS length types (px, em, %, cm, pt, etc.)
- Extensive transition system for animation easing and special effects (e.g. bouncing)
- Auto-adjusts to differences in computing and rendering speed (drops frames as necessary)
- Limits the number of attempted frame renders to conserve CPU in fast computers
- Flexible OOP-based implementation allows for easy extension and hacks
- Effect queuing to run an effect after other effects have finished
- Chaining and default options: easy-to-use syntax for most use cases
- Reusable effect instances can be used with more than one DOM element
- User-definable callback functions at any point in the effect lifecycle
- Effects are abortable (either as-is or abort-to-end)
Namespaces
-
Element
A collection of shortcut methods that are added to all DOM elements.
-
s2.fx.Operators
Effect operators are reusable interpolation functions. Operators are used by
s2.fx.Elementand it's subclasses. -
s2.fx.Transitions
Transitions can fine-tune how an effect evolves over time. All effects, without the use of transitions, normally evolve linearily.
-
s2.fx
This is the main effects namespace.
Classes
-
s2.fx.Attribute
This effect can change an object property or call a method with a numerical interpolation.
-
s2.fx.Base
-
s2.fx.Operators.Base
This is skeleton base class which must be extended to be useful.
-
s2.fx.Element
Base class for effects that change DOM elements. This is the base class for the most important effects implementation
s2.fx.Morph, but can be used as a base class for non-CSS based effects too. -
s2.fx.Heartbeat
The heartbeat class provides for effects timing. An instance of this class is automatically created when the first effect on a page is instantiated.
-
s2.fx.Morph
"Morph" DOM elements to a new set of CSS style rules, while optionally providing a new set of contents.
-
s2.fx.Parallel
Effect to execute several other effects in parallel.
-
s2.fx.Queue
Effect queues manage the execution of effects in parallel or end-to-end over time.
-
s2.fx.Scroll
Effect for scrolling an elements' contents.
-
s2.fx.Operators.Scroll
Operator for scrolling the contents of an Element.
-
s2.fx.Operators.Style
Operator for interpolatung the CSS styles of an Element.
-
s2.fx.Style
This effect is similiar to
s2.fx.Morphbut doesn't provide any of the more advanced functionality, like content morphing.