Skip to content

body-options overview


Table of contents


utils

BodyOptions (interface)

Signature

export interface BodyOptions {
  dynamic: boolean
  mass: number
  restitution: number
  friction: number
  ownCollisionGroups: ReadonlyArray<CollisionGroup> | 'all'
  interactWithCollisionGroups: ReadonlyArray<CollisionGroup> | 'all'
}

CollisionGroup (type alias)

Signature

export type CollisionGroup = number

DebugBodySettings (class)

Signature

export declare class DebugBodySettings<S> {
  protected constructor(
    private _type: DebugBodyType,
    private _shape: S,
    private _ignoreTransform: boolean = false,
    private _color: number | undefined = undefined
  )
}

DebugBodyType (type alias)

Signature

export type DebugBodyType =
  | { type: 'RIGID_STATIC' }
  | { type: 'TRIGGER'; activated: () => boolean }
  | { type: 'RIGID_DYNAMIC'; sleeping: () => boolean }