Hierarchy

  • Scene
    • EnvironmentScene

Constructors

Properties

hideFlags: HideFlags

Allows to control e.g. if an object should be exported

worldPosition: Vector3

Get or set the world position of the Object3D.
Added by Needle Engine.

worldQuaternion: Quaternion

Get or set the world quaternion of the Object3D.
Added by Needle Engine.

worldRotation: Vector3

Get or set the world rotation of the Object3D.
Added by Needle Engine.

worldScale: Vector3

Get or set the world scale of the Object3D.
Added by Needle Engine.

Accessors

  • get guid(): undefined | string

    Returns undefined | string

  • set guid(value: undefined | string): void

    Parameters

    • value: undefined | string

    Returns void

  • get worldForward(): Vector3

    Get the world forward vector of the Object3D.
    Added by Needle Engine.

    Returns Vector3

  • get worldRight(): Vector3

    Get the world right vector of the Object3D.
    Added by Needle Engine.

    Returns Vector3

  • get worldUp(): Vector3

    Get the world up vector of the Object3D.
    Added by Needle Engine.

    Returns Vector3

Methods

  • Add a Needle Engine component to the Object3D.

    Type Parameters

    Parameters

    • comp: T | ConstructorConcrete<T>

      The component instance or constructor to add.

    • Optionalinit: Partial<
          NoInternalNeedleEngineState<
              FilterStartingWith<FilterTypes<T, undefined | null | Function>, "_">,
          >,
      >

      Optional initialization data for the component.

    Returns T

    The added component instance.

    const obj = new Object3D();
    obj.addComponent(MyComponent, { myProperty: 42 });
    const obj = new Object3D();
    const comp = new MyComponent();
    comp.myProperty = 42;
    obj.addComponent(comp);
  • Parameters

    • intensity: number

    Returns MeshBasicMaterial

  • Destroys the Object3D and all its Needle Engine components.

    Returns void

  • Get a Needle Engine component from the Object3D.

    Type Parameters

    Parameters

    • type: Constructor<T>

    Returns null | T

    The component instance or null if not found.

  • Get a Needle Engine component from the Object3D or its children. This will search on the current Object and all its children.

    Type Parameters

    Parameters

    • type: Constructor<T>

    Returns null | T

    The component instance or null if not found.

  • Get a Needle Engine component from the Object3D or its parents. This will search on the current Object and all its parents.

    Type Parameters

    Parameters

    • type: Constructor<T>

    Returns null | T

    The component instance or null if not found.

  • Get all components of a specific type from the Object3D.

    Type Parameters

    Parameters

    • type: Constructor<T>
    • Optionalarr: []

      Optional array to fill with the found components.

    Returns T[]

    An array of components.

  • Get all components of a specific type from the Object3D or its children. This will search on the current Object and all its children.

    Type Parameters

    Parameters

    • type: Constructor<T>
    • Optionalarr: []

      Optional array to fill with the found components.

    Returns T[]

    An array of components.

  • Get all Needle Engine components of a specific type from the Object3D or its parents. This will search on the current Object and all its parents.

    Type Parameters

    Parameters

    • type: Constructor<T>
    • Optionalarr: []

      Optional array to fill with the found components.

    Returns T[]

    An array of components.

  • Get 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.

    Type Parameters

    Parameters

    • typeName: ConstructorConcrete<T>

      The component constructor to get or add.

    • Optionalinit: Partial<
          NoInternalNeedleEngineState<
              FilterStartingWith<FilterTypes<T, undefined | null | Function>, "_">,
          >,
      >

      Optional initialization data for the component.

    Returns T

    The component instance.