Skip to main content

BodyComponentOptions

Index

Properties

optionalconfig

config?: { canSleepByDefault?: boolean; defaultMass?: number; sleepBias?: number; sleepEpsilon?: number; wakeThreshold?: number }

Type declaration

  • optionalcanSleepByDefault?: boolean

    By default bodies do not sleep, this can be turned on to improve perf if you have a lot of bodies.

    Default false

  • optionaldefaultMass?: number

    Configure default mass that bodies have

    Default 10 mass units

  • optionalsleepBias?: number

    Sleep bias

    Default 0.9

  • optionalsleepEpsilon?: number

    Sleep epsilon

    Default 0.07

  • optionalwakeThreshold?: number

    Wake Threshold, the amount of "motion" need to wake a body from sleep

    Default 0.07 * 3;

optionalgroup

optionaltype

optionaluseGravity

useGravity?: boolean