Abstract This creates a new Object3D object.
Abstract transformAbstract worldAbstract worldAbstract worldAbstract worldAbstract worldAbstract worldAbstract worldAbstract addAbstract addAbstract destroyAbstract getAbstract getAbstract getAbstract getAbstract getAbstract getAbstract getAbstract removeStatic addStatic addAdd 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
Optional init: Partial<NoInternalNeedleEngineState<FilterStartingWith<FilterTypes<T, Function>, "_">>>optional init object to initialize the component with
Optional opts: { Static addStatic destroyStatic destroyStatic findStatic findStatic findStatic foreachRun 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
Static getStatic getStatic getStatic getStatic getStatic getStatic getStatic getStatic instantiateCreates 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.)
Static instantiateCreates a new instance of the provided object. The new instance will be created on all connected clients
object to instantiate
options for the instantiation
Static invokeInvokes 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: anyStatic invokeInvokes a method on all components including children (if a method with that name exists)
Rest ...args: anyStatic isIf 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
Static isIf the object is active (same as go.visible)
Static isStatic isStatic iterateStatic markStatic moveStatic removeRemoves the object from its parent and deactivates all of its components
Static removeStatic setGenerated using TypeDoc
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: