Skip to content

RapierPhysicsComposite

Extends

  • Container

Implements

Constructors

new RapierPhysicsComposite()

new RapierPhysicsComposite(): RapierPhysicsComposite

Returns

RapierPhysicsComposite

Overrides

Container.constructor

Source

src/physics/rapier/gameobjects/RapierPhysicsComposite.ts:26

Properties

bodies

bodies: RigidBody[] = []

Source

src/physics/rapier/gameobjects/RapierPhysicsComposite.ts:21


body

body: RigidBody

Implementation of

IPhysicsObject.body

Source

src/physics/rapier/gameobjects/RapierPhysicsComposite.ts:19


collider

collider: Collider

Source

src/physics/rapier/gameobjects/RapierPhysicsComposite.ts:22


colliderRef

colliderRef: object[] = []

Source

src/physics/rapier/gameobjects/RapierPhysicsComposite.ts:24


colliders

colliders: Collider[] = []

Source

src/physics/rapier/gameobjects/RapierPhysicsComposite.ts:23


visual

visual: Sprite

Implementation of

IPhysicsObject.visual

Source

src/physics/rapier/gameobjects/RapierPhysicsComposite.ts:17


visuals

visuals: Sprite[] = []

Implementation of

IPhysicsObject.visuals

Source

src/physics/rapier/gameobjects/RapierPhysicsComposite.ts:18


DEFAULT_DEBUG_COLOR

static readonly DEFAULT_DEBUG_COLOR: number = 0x29c5f6

Source

src/physics/rapier/gameobjects/RapierPhysicsComposite.ts:20

Accessors

activeCollisionTypes

get activeCollisionTypes(): ActiveCollisionTypes

Returns

ActiveCollisionTypes

Source

src/physics/rapier/gameobjects/RapierPhysicsComposite.ts:46


activeEvents

get activeEvents(): ActiveEvents

Returns

ActiveEvents

Source

src/physics/rapier/gameobjects/RapierPhysicsComposite.ts:51


activeHooks

get activeHooks(): ActiveHooks

Returns

ActiveHooks

Source

src/physics/rapier/gameobjects/RapierPhysicsComposite.ts:56


app

get app(): Application<any>

Returns

Application<any>

Source

src/physics/rapier/gameobjects/RapierPhysicsComposite.ts:38


debugColor

get debugColor(): number

Returns

number

Source

src/physics/rapier/gameobjects/RapierPhysicsComposite.ts:60


physics

get physics(): RapierPhysics

Returns

RapierPhysics

Source

src/physics/rapier/gameobjects/RapierPhysicsComposite.ts:34


world

get world(): World

Returns

World

Source

src/physics/rapier/gameobjects/RapierPhysicsComposite.ts:42

Methods

addVisual()

addVisual(color, size, position, type): Sprite

Parameters

color: number

size: [number, number]

position: [number, number]= undefined

type: PhysicsBodyType= PhysicsBodyType.RECTANGLE

Returns

Sprite

Source

src/physics/rapier/gameobjects/RapierPhysicsComposite.ts:64


createCollider()

createCollider(visual, body, type): Collider

Parameters

visual: Sprite

body: RigidBody

type: PhysicsBodyType= PhysicsBodyType.RECTANGLE

Returns

Collider

Source

src/physics/rapier/gameobjects/RapierPhysicsComposite.ts:85


createPiece()

createPiece(color, size, position, angle, type, data?): object

Parameters

color: number

size: [number, number]

position: [number, number]= undefined

angle: number= 0

type: PhysicsBodyType= PhysicsBodyType.RECTANGLE

data?: any

Returns

object

body

body: RigidBody

collider

collider: Collider

visual

visual: Sprite

Source

src/physics/rapier/gameobjects/RapierPhysicsComposite.ts:114


onAdded()

onAdded(): void

Returns

void

Source

src/physics/rapier/gameobjects/RapierPhysicsComposite.ts:77


onRemoved()

onRemoved(): void

Returns

void

Source

src/physics/rapier/gameobjects/RapierPhysicsComposite.ts:81


update()

update(): void

Returns

void

Source

src/physics/rapier/gameobjects/RapierPhysicsComposite.ts:142