ShapeComp
Defined in: packages/threeplay/src/plugins/shapes/types.ts:26
Contract: any component that gives an object a visible shape exposes
shape (its description) and mesh (the three.js object that holds the
geometry, a child of object3d).
Extends
Section titled “Extends”Extended by
Section titled “Extended by”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”isolateMaterials()?
Section titled “isolateMaterials()?”
optionalisolateMaterials():void
Defined in: packages/threeplay/src/plugins/shapes/types.ts:34
Optional. Makes the shape’s materials private to this object (clones them, once),
for shapes whose materials may be shared with other objects, like model().
color() and opacity() call it before writing to the materials.
Returns
Section titled “Returns”void
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”
optionalid?:string
Defined in: packages/threeplay/src/core/types.ts:57
Unique name. Two components with the same id replace each other.
Inherited from
Section titled “Inherited from”mesh:
Object3D
Defined in: packages/threeplay/src/plugins/shapes/types.ts:28
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.
Inherited from
Section titled “Inherited from”shape:
ShapeDesc
Defined in: packages/threeplay/src/plugins/shapes/types.ts:27