- core
- Context
- ElementAllocator
- ElementOutput
- Engine
- Entity
- EventEmitter
- EventHandler
- Group
- Modifier
- OptionsManager
- RenderNode
- Scene
- SpecParser
- Transform
- View
- ViewSequence
- events
- EventArbiter
- EventFilter
- EventMapper
- inputs
- Accumulator
- GenericSync
- MouseSync
- PinchSync
- RotateSync
- ScaleSync
- ScrollSync
- TouchSync
- TouchTracker
- TwoFingerSync
- math
- Matrix
- Quaternion
- Random
- Utilities
- Vector
- modifiers
- Draggable
- Fader
- ModifierChain
- StateModifier
- physics
- PhysicsEngine
- physics/bodies
- Body
- Circle
- Particle
- Rectangle
- physics/constraints
- Surface
- Collision
- Constraint
- Curve
- Distance
- Snap
- Wall
- Walls
- physics/forces
- Drag
- Force
- Repulsion
- RotationalDrag
- RotationalSpring
- Spring
- VectorField
- physics/integrators
- SymplecticEuler
- surfaces
- CanvasSurface
- ContainerSurface
- ImageSurface
- InputSurface
- TextareaSurface
- VideoSurface
- transitions
- CachedMap
- Easing
- MultipleTransition
- SnapTransition
- SpringTransition
- Transitionable
- TransitionableTransform
- TweenTransition
- WallTransition
- utilities
- KeyCodes
- Timer
- Utility
- views
- ContextualView
- Deck
- DrawerLayout
- EdgeSwapper
- FlexibleLayout
- Flipper
- GridLayout
- HeaderFooterLayout
- Lightbox
- RenderController
- ScrollContainer
- Scroller
- Scrollview
- SequentialLayout
- widgets
- NavigationBar
- TabBar
TweenTransition
A state maintainer for a smooth transition between numerically-specified states. Example numeric states include floats or Transfornm objects. An initial state is set with the constructor or set(startValue). A corresponding end state and transition are set with set(endValue, transition). Subsequent calls to set(endValue, transition) begin at the last state. Calls to get(timestamp) provide the _interpolated state along the way. Note that there is no event loop here - calls to get() are the only way to find out state projected to the current (or provided) time and are the only way to trigger callbacks. Usually this kind of object would be part of the render() path of a visible component.
Overview
Options
Methods
TweenTransition(options)
Constructor Parameters
options
Object
TODO beginning state
Methods
Curve()
Transition curves mapping independent variable t from domain [0,1] to a range within [0,1]. Includes functions 'linear', 'easeIn', 'easeOut', 'easeInOut', 'easeOutBounce', 'spring'.
registerCurve(curveName, curve)Static
Add "unit" curve to internal dictionary of registered curves.
Parameters
Returns
unregisterCurve(curveName)Static
Remove object with key "curveName" from internal dictionary of registered curves.
Parameters
Returns
getCurve(curveName)Static
Retrieve function with key "curveName" from internal dictionary of registered curves. Default curves are defined in the TweenTransition.Curves array, where the values represent unitCurve functions.
Parameters
Returns
getCurves()Static
Retrieve all available curves.
Returns
setOptions(options)
Set internal options, overriding any default options.
Parameters
set(endValue, transition, callback)
Add transition to end state to the queue of pending transitions. Special Use: calling without a transition resets the object to that state with no pending actions
Parameters
reset(startValue, startVelocity)
Cancel all transitions and reset to a stable state
Parameters
getVelocity()
Get current velocity
Returns
get(timestamp)
Get interpolated state of current action at provided time. If the last action has completed, invoke its callback.
Parameters
Returns
update(timestamp)
Update internal state to the provided timestamp. This may invoke the last callback and begin a new action.
Parameters
isActive()
Is there at least one action pending completion?
Returns
halt()
Halt transition at current state and erase all pending actions.