- 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
SnapTransition
SnapTransition is a method of transitioning between two values (numbers, or arrays of numbers). It is similar to SpringTransition except the transition can be much faster and always has a damping effect.
Overview
Options
Methods
period
dampingRatio
velocity
reset
getVelocity
setVelocity
isActive
halt
get
set
SnapTransition(state)
Constructor Parameters
state
Number|Array
Initial state
Methods
SnapTransition.DEFAULT_OPTIONS()ProtectedStatic
period()
The amount of time in milliseconds taken for one complete oscillation when there is no damping Range : [0, Infinity]
dampingRatio()
The damping of the snap. Range : [0, 1]
velocity()
The initial velocity of the transition.
reset(state, velocity)
Resets the state and velocity
Parameters
state
Number|Array
State
velocity
Number|Array
Velocity
getVelocity()
Getter for velocity
Returns
Number|Array
velocity
setVelocity()
Setter for velocity
Returns
Number|Array
velocity
isActive()
Detects whether a transition is in progress
Returns
Boolean
halt()
Halt the transition
get()
Get the current position of the transition s *
Returns
Number|Array
state
set(state, definition, callback)
Set the end position and transition, with optional callback on completion.
Parameters
state
Number|Array
Final state
definition
Object
Transition definition
callback
Function
Callback