Function: addLinearDamperComponent()
addLinearDamperComponent(
world,entity,options):LinearDamperEcsComponent
Defined in: physics/components/linear-damper-component.ts:79
Attaches a LinearDamperEcsComponent to entity.
Parameters
world
The ECS world entity belongs to.
entity
number
The entity to attach the component to.
options
Options for configuring the damper. Neither bodyA,
bodyB, nor dampingCoefficient has a sensible default and all three
must always be provided.
Returns
The attached component, for further tuning or runtime changes.
Throws
An error if dampingCoefficient is negative.