Constructor
new PositionPivotConstraint(pos, c1, len, stiffness, breakForce)
Instantiates new PositionPivotConstraint
Parameters:
Name | Type | Description |
---|---|---|
pos | Vector2D | position of pivot |
c1 | Particle | constrained particle |
len | Number | constrained length |
stiffness | Number | a relaxation parameter that is stable between [0,1] (higher is more stiff) |
breakForce | Number | force at which the constraint breaks |
Extends
Methods
applyCorrection(timeStep)
Applies positional correction on particle.
Parameters:
Name | Type | Description |
---|---|---|
timeStep | Number |
- Overrides
particles() → {Array.<Particle>}
Calculates the list of particles that is involved with the constraint
- Overrides
Returns:
- Type:
- Array.<Particle>
update(timeStep)
Updates the constraint.
Parameters:
Name | Type | Description |
---|---|---|
timeStep | Number |
- Overrides
vertices() → {Array.<Vector2D>}
Calculates the list of vertices that will be used in the rendering process
- Overrides
Returns:
- Type:
- Array.<Vector2D>