AbstractThis creates a new Object3D object.
Abstractactiveif the object is enabled in the hierarchy (usually equivalent to visible)
Allows to control e.g. if an object should be exported
AbstractworldAbstractworldAbstractworldGet or set the world quaternion of the Object3D.
Added by Needle Engine.
Get or set the world quaternion of the Object3D.
Added by Needle Engine.
AbstractworldAbstractworldAbstractworldAbstractworldAbstractaddAbstractaddAbstractdestroyDestroys the Object3D and all its Needle Engine components.
AbstractgetAbstractgetAbstractgetAbstractgetAbstractgetAbstractgetAbstractgetAbstractremoveRemove a Needle Engine component from the Object3D.
StaticaddStaticaddAdd a new component (or move an existing component) to the provided object
object to add the component to
if an instance is provided it will be moved to the new object, if a type is provided a new instance will be created and moved to the new object
Optionalinit: Partial<optional init object to initialize the component with
Optionalopts: { callAwake: boolean }StaticaddStaticdestroyStaticdestroyStaticfindStaticfindStaticfindStaticforeachRun a callback for all components of the provided type on the provided object and its children (if recursive is true)
the last return value of the callback
StaticgetStaticgetGets a component on the provided object
StaticgetStaticgetStaticgetStaticgetStaticgetStaticgetStaticinstantiateCreates a new instance of the provided object (like cloning it including all components and children)
object to instantiate
Optionalopts: null | IInstantiateOptionsoptions for the instantiation (e.g. with what parent, position, etc.)
Creates a new instance of the provided object (like cloning it including all components and children)
object to instantiate
Optionalopts: null | IInstantiateOptionsoptions for the instantiation (e.g. with what parent, position, etc.)
StaticinstantiateCreates a new instance of the provided object. The new instance will be created on all connected clients
object to instantiate
options for the instantiation
StaticinvokeInvokes a method on all components that have a method matching the provided name
object to invoke the method on all components
name of the method to invoke
StaticinvokeInvokes a method on all components including children (if a method with that name exists)
StaticisIf the object is active in the hierarchy (e.g. if any parent is invisible or not in the scene it will be false)
object to check
StaticisStaticisStaticisStaticiterateStaticmarkStaticmoveMoves a component to a new object
component to move the component to
component to move to the GO
StaticremoveRemoves the object from its parent and deactivates all of its components
StaticremoveRemoves a component from its object
component to remove
Staticset
All {@type Object3D} types that are loaded in Needle Engine do automatically receive the GameObject extensions like
addComponentetc.Many of the GameObject methods can be imported directly via
@needle-tools/engineas well: