| Package | flare.physics |
| Class | public class GravityForce |
| Implements | IForce |
| Property | Defined by | ||
|---|---|---|---|
| gravityX : Number The gravitational acceleration in the horizontal dimension.
| GravityForce | ||
| gravityY : Number The gravitational acceleration in the vertical dimension.
| GravityForce | ||
| Method | Defined by | ||
|---|---|---|---|
|
GravityForce(gx:Number = 0, gy:Number = 0)
Creates a new gravity force with given acceleration values.
| GravityForce | ||
|
apply(sim:Simulation):void
Applies this force to a simulation.
| GravityForce | ||
| gravityX | property |
gravityX:Number [read-write]The gravitational acceleration in the horizontal dimension.
Implementation public function get gravityX():Number
public function set gravityX(value:Number):void
| gravityY | property |
gravityY:Number [read-write]The gravitational acceleration in the vertical dimension.
Implementation public function get gravityY():Number
public function set gravityY(value:Number):void
| GravityForce | () | constructor |
public function GravityForce(gx:Number = 0, gy:Number = 0)Creates a new gravity force with given acceleration values.
Parametersgx:Number (default = 0) — the gravitational acceleration in the horizontal dimension
|
|
gy:Number (default = 0) — the gravitational acceleration in the vertical dimension
|
| apply | () | method |
public function apply(sim:Simulation):voidApplies this force to a simulation.
Parameterssim:Simulation — the Simulation to apply the force to
|