φ Famo.us University Famo.us/Angular Docs Help Blog Download
  • core
  • Context
  • ElementAllocator
  • ElementOutput
  • Engine
  • Entity
  • EventEmitter
  • EventHandler
  • Group
  • Modifier
  • OptionsManager
  • RenderNode
  • Scene
  • SpecParser
  • Surface
  • 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
  • Collision
  • Constraint
  • Curve
  • Distance
  • Snap
  • Surface
  • 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

Surface

A constraint that keeps a physics body on a given implicit surface regardless of other physical forces are applied to it.

Overview

Options
equation
period
dampingRatio
Methods
applyConstraint

Surface(options)

Constructor Parameters

options

Options

An object of configurable options.

equation
Function
An implicitly defined surface f(x,y,z) = 0 that body is constrained to e.g. function(x,y,z) { x*x + y*y + z*z - r*r } corresponds to a sphere of radius r pixels.
period
Number
The spring-like reaction when the constraint is violated.
dampingRatio
Number
The damping-like reaction when the constraint is violated.
Methods

applyConstraint(targets, source, dt)

Adds a surface impulse to a physics body.

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