- 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
Timer
An internal library to reproduce javascript time-based scheduling. Using standard javascript setTimeout methods can have a negative performance impact when combined with the Famous rendering process, so instead require Timer and call Timer.setTimeout, Timer.setInterval, etc.
Overview
Methods
Methods
addTimerFunction(fn)
Add a function to be run on every prerender
Parameters
Returns
setTimeout(fn, duration)
Wraps a function to be invoked after a certain amount of time. After a set duration has passed, it executes the function and removes it as a listener to 'prerender'.
Parameters
Returns
setInterval(fn, duration)
Wraps a function to be invoked after a certain amount of time. After a set duration has passed, it executes the function and resets the execution time.
Parameters
Returns
after(fn, numTicks)
Wraps a function to be invoked after a certain amount of prerender ticks. Similar use to setTimeout but tied to the engine's run speed.
Parameters
Returns
every(fn, numTicks)
Wraps a function to be continually invoked after a certain amount of prerender ticks. Similar use to setInterval but tied to the engine's run speed.
Parameters
Returns
clear(fn)
Remove a function that gets called every prerender
Parameters
debounce(func, wait)
Executes a function after a certain amount of time. Makes sure the function is not run multiple times.