φ Famo.us University Famo.us/Angular Docs Help Blog Download
  • 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

Wall

A wall describes an infinite two-dimensional plane that physics bodies can collide with. To define a wall, you must give it a distance (from the center of the physics engine's origin, and a normal defining the plane of the wall. (wall) | | (normal) (origin) | ---> * | | (distance) ................... (100px) e.g., Wall({normal : [1,0,0], distance : 100}) would be a wall 100 pixels to the left, whose normal points right

Overview

Options
restitution] The energy ratio lost in a collision (0
drift] Baumgarte stabilization parameter. Makes constraints "loosely" (0) or "tightly" (1) enforced. Range : [0, 1
slop
normal
distance
onContact
Methods
REFLECT
SILENT
applyConstraint

Wall(options)

Constructor Parameters

options

Options

An object of configurable options.

restitution] The energy ratio lost in a collision (0
Number
drift] Baumgarte stabilization parameter. Makes constraints "loosely" (0) or "tightly" (1) enforced. Range : [0, 1
Number
slop
Number
Amount of penetration in pixels to ignore before collision event triggers.
normal
Array
The normal direction to the wall.
distance
Number
The distance from the origin that the wall is placed.
onContact
OnContact
How to handle collision against the wall.
Methods

Wall.ON_CONTACT()ProtectedStatic

REFLECT()

Physical bodies bounce off the wall

SILENT()

Physical bodies are unaffected. Usecase is to fire events on contact.

applyConstraint(targets, source, dt)

Adds an impulse to a physics body's velocity due to the wall constraint

Parameters
targets
Array.Body
Array of bodies to apply the constraint to
source
Body
The source of the constraint
dt
Number
Delta time
Branding Terms Privacy Jobs © Famous Industries, Inc. 2015