| Package | flare.physics |
| Class | public class Spring |
| Property | Defined by | ||
|---|---|---|---|
| damping : Number The damping (friction) co-efficient of the spring.
| Spring | ||
| die : Boolean Flag indicating that the spring is scheduled for removal.
| Spring | ||
| p1 : Particle
The first particle attached to the spring.
| Spring | ||
| p2 : Particle
The second particle attached to the spring.
| Spring | ||
| restLength : Number The rest length of the spring.
| Spring | ||
| tag : uint Tag property for storing an arbitrary value.
| Spring | ||
| tension : Number The tension of the spring.
| Spring | ||
| Method | Defined by | ||
|---|---|---|---|
|
Spring(p1:Particle, p2:Particle, restLength:Number = 10, tension:Number = 0.1, damping:Number = 0.1)
Creates a new Spring with given parameters.
| Spring | ||
|
init(p1:Particle, p2:Particle, restLength:Number = 10, tension:Number = 0.1, damping:Number = 0.1):void
Initializes an existing spring instance.
| Spring | ||
|
kill():void
"Kills" this spring, scheduling it for removal in the next
simulation cycle.
| Spring | ||
| damping | property |
public var damping:NumberThe damping (friction) co-efficient of the spring.
| die | property |
public var die:BooleanFlag indicating that the spring is scheduled for removal.
| p1 | property |
public var p1:ParticleThe first particle attached to the spring.
| p2 | property |
public var p2:ParticleThe second particle attached to the spring.
| restLength | property |
public var restLength:NumberThe rest length of the spring.
| tag | property |
public var tag:uintTag property for storing an arbitrary value.
| tension | property |
public var tension:NumberThe tension of the spring.
| Spring | () | constructor |
public function Spring(p1:Particle, p2:Particle, restLength:Number = 10, tension:Number = 0.1, damping:Number = 0.1)Creates a new Spring with given parameters.
Parametersp1:Particle — the first particle attached to the spring
|
|
p2:Particle — the second particle attached to the spring
|
|
restLength:Number (default = 10) — the rest length of the spring
|
|
tension:Number (default = 0.1) — the tension of the spring
|
|
damping:Number (default = 0.1) — the damping (friction) co-efficient of the spring
|
| init | () | method |
public function init(p1:Particle, p2:Particle, restLength:Number = 10, tension:Number = 0.1, damping:Number = 0.1):voidInitializes an existing spring instance.
Parametersp1:Particle — the first particle attached to the spring
|
|
p2:Particle — the second particle attached to the spring
|
|
restLength:Number (default = 10) — the rest length of the spring
|
|
tension:Number (default = 0.1) — the tension of the spring
|
|
damping:Number (default = 0.1) — the damping (friction) co-efficient of the spring
|
| kill | () | method |
public function kill():void"Kills" this spring, scheduling it for removal in the next simulation cycle.