Component3D class
Signature:
export declare class Component3D<Data extends Component3DData = Component3DData> extends AugmentedGroup
Extends: AugmentedGroup
Remarks
The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the Component3D
class.
Properties
Property |
Modifiers |
Type |
Description |
---|---|---|---|
() => void | |||
| |||
| |||
Collider |
Collider for this component, it encapsulates some convenience methods for physics And gives access to the underlying physics rigidbody and collider | ||
|
string |
Returns the unique id for this component | |
|
string |
Returns the name of this component (if set in data.name) | |
|
unknown |
Returns the type of this component (avatar, model, etc) | |
|
Data | ||
never |
geometry prop is not allowed on components | ||
|
string |
Returns the unique identifier for this component | |
|
boolean | ||
never |
material prop is not allowed on components | ||
|
ComponentOpts | ||
| |||
|
Vector3 |
the position in world space | |
|
Quaternion |
the quaternion in world space | |
Rigid body attached to this component, it encapsulates some convenience methods for physics And gives access to the underlying physics rigidbody and colliders you can find more info at RigidBodyWrapper | |||
|
Quaternion |
the rotation in world space | |
|
Vector3 |
the scale in world space | |
|
string |
Returns the group identifier for this component |
Methods
Method |
Modifiers |
Description |
---|---|---|
| ||
Destroy this component | ||
| ||
Duplicate this component Returns a promise that resolves with the duplicated component | ||
Returns the bounding box of this component | ||
Returns the dimensions of this component | ||
| ||
Returns true if this component is a dierct or indirect child of the provided component | ||
Event fired when this component starts colliding with another component | ||
Event fired when this component stops colliding with another component | ||
This event is fired each frame between the start and end of a collision | ||
Event fired when this component starts intersecting a sensor | ||
Event fired when this component stops intersecting a sensor | ||
This event is fired each frame between the start and end of a sensor intersection |