Class Spring

Controls spring parameters for a physics joint limits. If a limit is soft (body bounces back due to restition when the limit is reached) the spring will pull the body back towards the limit using the specified parameters.

Constructors

Properties

Accessors

Methods

Constructors

  • Parameters

    • Optionalstiffness: number
    • Optionaldamping: number

    Returns Spring

Properties

_damping: number
_stiffness: number

Accessors

  • get damping(): number
  • Damping strength. Force propertional to the velocity error.

    Returns number

  • set damping(value): void
  • Parameters

    • value: number

    Returns void

  • get stiffness(): number
  • Spring strength. Force proportional to the position error.

    Returns number

  • set stiffness(value): void
  • Parameters

    • value: number

    Returns void

Methods

  • Copies all properties defined by the prototype of Spring from other to this instance.

    Parameters

    Returns Spring

  • Clones this instance and returns a new Spring with identical values.

    Returns Spring

  • Determines if this Spring instance is equal to the other instance.

    Parameters

    Returns boolean