AreaComp
Defined in: packages/threeplay/src/plugins/physics/types.ts:43
Fields added by area().
Extends
Section titled “Extends”Methods
Section titled “Methods”add()?
Section titled “add()?”
optionaladd(this):void
Defined in: packages/threeplay/src/core/types.ts:63
Called when the object enters the scene (or when used on a live object).
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”destroy()?
Section titled “destroy()?”
optionaldestroy(this):void
Defined in: packages/threeplay/src/core/types.ts:69
Called when the object is destroyed or the component removed.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”fixedUpdate()?
Section titled “fixedUpdate()?”
optionalfixedUpdate(this):void
Defined in: packages/threeplay/src/core/types.ts:67
Called at the fixed physics rate (50 Hz by default).
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”getCollisions()
Section titled “getCollisions()”getCollisions():
GameObj[]
Defined in: packages/threeplay/src/plugins/physics/types.ts:58
Objects currently touching this one.
Returns
Section titled “Returns”GameObj[]
inspect()?
Section titled “inspect()?”
optionalinspect(this):string|null|undefined
Defined in: packages/threeplay/src/core/types.ts:71
Short status line shown by the debug inspector.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”string | null | undefined
Inherited from
Section titled “Inherited from”isColliding()
Section titled “isColliding()”isColliding(
other):boolean
Defined in: packages/threeplay/src/plugins/physics/types.ts:56
true while touching other (or any object with that tag).
Parameters
Section titled “Parameters”string | GameObj
Returns
Section titled “Returns”boolean
onCollide()
Section titled “onCollide()”Call Signature
Section titled “Call Signature”onCollide(
tag,fn):EventController
Defined in: packages/threeplay/src/plugins/physics/types.ts:47
When this object starts touching another (optionally with tag).
Parameters
Section titled “Parameters”string
(other, col) => void
Returns
Section titled “Returns”Call Signature
Section titled “Call Signature”onCollide(
fn):EventController
Defined in: packages/threeplay/src/plugins/physics/types.ts:48
Parameters
Section titled “Parameters”(other, col) => void
Returns
Section titled “Returns”onCollideEnd()
Section titled “onCollideEnd()”Call Signature
Section titled “Call Signature”onCollideEnd(
tag,fn):EventController
Defined in: packages/threeplay/src/plugins/physics/types.ts:53
When this object stops touching another.
Parameters
Section titled “Parameters”string
(other) => void
Returns
Section titled “Returns”Call Signature
Section titled “Call Signature”onCollideEnd(
fn):EventController
Defined in: packages/threeplay/src/plugins/physics/types.ts:54
Parameters
Section titled “Parameters”(other) => void
Returns
Section titled “Returns”onCollideUpdate()
Section titled “onCollideUpdate()”Call Signature
Section titled “Call Signature”onCollideUpdate(
tag,fn):EventController
Defined in: packages/threeplay/src/plugins/physics/types.ts:50
Every fixed step while touching.
Parameters
Section titled “Parameters”string
(other, col) => void
Returns
Section titled “Returns”Call Signature
Section titled “Call Signature”onCollideUpdate(
fn):EventController
Defined in: packages/threeplay/src/plugins/physics/types.ts:51
Parameters
Section titled “Parameters”(other, col) => void
Returns
Section titled “Returns”update()?
Section titled “update()?”
optionalupdate(this):void
Defined in: packages/threeplay/src/core/types.ts:65
Called once per frame.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Properties
Section titled “Properties”area:
object
Defined in: packages/threeplay/src/plugins/physics/types.ts:45
sensor
Section titled “sensor”sensor:
boolean
shape:
string
conflicts?
Section titled “conflicts?”
optionalconflicts?:string[]
Defined in: packages/threeplay/src/core/types.ts:61
Ids of components that can’t be on the same object (checked both ways).
Inherited from
Section titled “Inherited from”id:
"area"
Defined in: packages/threeplay/src/plugins/physics/types.ts:44
Unique name. Two components with the same id replace each other.
Overrides
Section titled “Overrides”require?
Section titled “require?”
optionalrequire?:string[]
Defined in: packages/threeplay/src/core/types.ts:59
Ids of components that must be present on the object.