- 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
Particle
A point body that is controlled by the Physics Engine. A particle has position and velocity states that are updated by the Physics Engine. Ultimately, a particle is a special type of modifier, and can be added to the Famo.us Scene Graph like any other modifier.
Overview
Options
Methods
Particle(options)
Constructor Parameters
options
Options
An object of configurable options.
Methods
isBody()Static
isActive()
Determines if particle is active
Returns
sleep()
Stops the particle from updating
wake()
Starts the particle update
setPosition(position)
Basic setter for position
Parameters
setPosition1D(x)
1-dimensional setter for position
Parameters
getPosition()
Basic getter function for position
Returns
getPosition1D()
1-dimensional getter for position
Returns
()
Basic setter function for velocity Vector
setVelocity1D(x)
1-dimensional setter for velocity
Parameters
getVelocity()
Basic getter function for velocity Vector
Returns
setForce()
Basic setter function for force Vector
Returns
getVelocity1D()
1-dimensional getter for velocity
Returns
setMass(mass)
Basic setter function for mass quantity
Parameters
getMass()
Basic getter function for mass quantity
Returns
reset(position, velocity)
Reset position and velocity
Parameters
applyForce(force)
Add force vector to existing internal force Vector
Parameters
applyImpulse(impulse)
Add impulse (change in velocity) Vector to this Vector's velocity.
Parameters
integrateVelocity(dt)
Update a particle's velocity from its force accumulator
Parameters
integratePosition(dt)
Update a particle's position from its velocity
Parameters
_integrate(dt)Protected
Update the position and velocity of the particle
Parameters
()
Get kinetic energy of the particle.
getTransform()
Generate transform from the current position state
Returns
modify(target)
The modify interface of a Modifier