OffscreenComp
Defined in: packages/threeplay/src/plugins/gameplay/types.ts:89
Fields added by offscreen(). Emits the object events "exitScreen" and
"enterScreen". An object that starts offscreen emits "exitScreen" on its
first frame.
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”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”isOffScreen()
Section titled “isOffScreen()”isOffScreen():
boolean
Defined in: packages/threeplay/src/plugins/gameplay/types.ts:92
true while the object is offscreen (as of the last frame).
Returns
Section titled “Returns”boolean
onEnterScreen()
Section titled “onEnterScreen()”onEnterScreen(
fn):EventController
Defined in: packages/threeplay/src/plugins/gameplay/types.ts:96
Runs when the object comes back on screen.
Parameters
Section titled “Parameters”() => void
Returns
Section titled “Returns”onExitScreen()
Section titled “onExitScreen()”onExitScreen(
fn):EventController
Defined in: packages/threeplay/src/plugins/gameplay/types.ts:94
Runs when the object goes offscreen.
Parameters
Section titled “Parameters”() => 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”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:
"offscreen"
Defined in: packages/threeplay/src/plugins/gameplay/types.ts:90
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.