Skip to content

editorGlobalsCannonAddOn

Class: CannonAddOn

Hierarchy

CannonAddOn

Index

Constructors

Properties

Methods

Constructors

constructor

+ new CannonAddOn(modelSubnode: Object3D, renderContext: RenderContext): CannonAddOn

Overrides PhysicsAddOn.constructor

Defined in src/physics/addOns/CannonAddOn.ts:18

Parameters:

Name Type
modelSubnode Object3D
renderContext RenderContext

Returns: CannonAddOn

Properties

Protected compositeModel

compositeModel: CompositeModel

Inherited from PhysicsAddOn.compositeModel

Defined in src/physics/addOns/PhysicsAddOn.ts:15


Private debugRenderer

debugRenderer: any = null

Defined in src/physics/addOns/CannonAddOn.ts:18


Protected modelSubnode

modelSubnode: Object3D

Inherited from PhysicsAddOn.modelSubnode

Defined in src/physics/addOns/PhysicsAddOn.ts:11


Protected physicsContext

physicsContext: PhysicsContext

Inherited from PhysicsAddOn.physicsContext

Defined in src/physics/addOns/PhysicsAddOn.ts:14


Protected renderContext

renderContext: RenderContext

Inherited from PhysicsAddOn.renderContext

Defined in src/physics/addOns/PhysicsAddOn.ts:12


Protected threeNode

threeNode: Object3D = null

Inherited from PhysicsAddOn.threeNode

Defined in src/physics/addOns/PhysicsAddOn.ts:13


Private world

world: CANNON.World

Defined in src/physics/addOns/CannonAddOn.ts:16

Methods

Private _removeDebugInfo

_removeDebugInfo(): void

Defined in src/physics/addOns/CannonAddOn.ts:54

Returns: void


_renderDebugInfo

_renderDebugInfo(): void

Defined in src/physics/addOns/CannonAddOn.ts:43

Returns: void


Private _setUpDebugRenderer

_setUpDebugRenderer(): void

Defined in src/physics/addOns/CannonAddOn.ts:61

Returns: void


destroy

destroy(): void

Inherited from PhysicsAddOn.destroy

Defined in src/physics/addOns/PhysicsAddOn.ts:93

This is called after the AddOn was removed. Perform all cleanup here.

Returns: void


getName

getName(): string

Overrides PhysicsAddOn.getName

Defined in src/physics/addOns/CannonAddOn.ts:50

Returns: string


getPriority

getPriority(): number

Inherited from PhysicsAddOn.getPriority

Defined in src/physics/addOns/PhysicsAddOn.ts:32

enforce a certain rendering and physics-step order. AddOns with higher priority will be rendered & executed before AddOns with a lower priority

Returns: number


getThreeNode

getThreeNode(): Object3D

Inherited from PhysicsAddOn.getThreeNode

Defined in src/physics/addOns/PhysicsAddOn.ts:68

Returns: Object3D


getWorld

getWorld(): CANNON.World

Defined in src/physics/addOns/CannonAddOn.ts:39

Returns: CANNON.World


initializeCompositeModel

initializeCompositeModel(compositeModel: CompositeModel): void

Inherited from PhysicsAddOn.initializeCompositeModel

Defined in src/physics/addOns/PhysicsAddOn.ts:86

You should override this method to be notified when the compositeModel is set. This may be called multiple times during the lifecycle of an AddOn with different parameters.

Parameters:

Name Type Description
compositeModel CompositeModel the compositeModel, guaranteed to not be null or undefined

Returns: void


initializeThreeNode

initializeThreeNode(threeNode: Object3D): void

Inherited from PhysicsAddOn.initializeThreeNode

Defined in src/physics/addOns/PhysicsAddOn.ts:77

You should override this method to set up the scene. Create all the objects you need and add() them to threeNode.

Parameters:

Name Type Description
threeNode Object3D the parent node

Returns: void


render

render(): void

Overrides PhysicsAddOn.render

Defined in src/physics/addOns/CannonAddOn.ts:34

Returns: void


requiresContinuousRendering

requiresContinuousRendering(): boolean

Inherited from PhysicsAddOn.requiresContinuousRendering

Defined in src/physics/addOns/PhysicsAddOn.ts:104

Returns: boolean


setCompositeModel

setCompositeModel(compositeModel: CompositeModel): void

Inherited from PhysicsAddOn.setCompositeModel

Defined in src/physics/addOns/PhysicsAddOn.ts:63

Parameters:

Name Type
compositeModel CompositeModel

Returns: void


setPhysicsContext

setPhysicsContext(physicsContext: PhysicsContext): void

Inherited from PhysicsAddOn.setPhysicsContext

Defined in src/physics/addOns/PhysicsAddOn.ts:59

Parameters:

Name Type
physicsContext PhysicsContext

Returns: void


setThreeNode

setThreeNode(threeNode: Object3D): void

Inherited from PhysicsAddOn.setThreeNode

Defined in src/physics/addOns/PhysicsAddOn.ts:54

Parameters:

Name Type
threeNode Object3D

Returns: void


step

step(elapsedTime: number): void

Overrides PhysicsAddOn.step

Defined in src/physics/addOns/CannonAddOn.ts:30

Parameters:

Name Type
elapsedTime number

Returns: void


updateSiblings

updateSiblings(addOns: PhysicsAddOn[]): void

Inherited from PhysicsAddOn.updateSiblings

Defined in src/physics/addOns/PhysicsAddOn.ts:100

This is called when the physics addOns change to allow interaction between addOns.

Parameters:

Name Type
addOns PhysicsAddOn[]

Returns: void