AbstractThis creates a new Object3D object.
Abstractactiveif the object is enabled in the hierarchy (usually equivalent to visible)
the object's unique identifier
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.
AbstractgetAbstractgetAbstractgetAbstractgetAbstractgetAbstractgetAbstractgetGet or add a Needle Engine component to the Object3D. If the component already exists, it will be returned. Otherwise, a new component will be added.
The component constructor to get or add.
The component instance.
AbstractremoveStaticaddStaticaddAdd 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<NoInternalNeedleEngineState<FilterStartingWith<FilterTypes<T, undefined | null | Function>, "_">>>optional init object to initialize the component with
Optionalopts: { StaticaddStaticdestroyStaticdestroyStaticfindStaticfindStaticfindStaticforeachRun a callback for all components of the provided type on the provided object and its children (if recursive is true)
object to run the method on
callback to run on each component, "return undefined;" to continue and "return
if true, the method will be run on all children as well
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
options 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
Rest...args: anyStaticinvokeInvokes a method on all components including children (if a method with that name exists)
Rest...args: anyStaticisIf 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
StaticisIf the object is active (same as go.visible)
StaticisStaticisStaticiterateStaticmarkStaticmoveMoves 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: