Class GameObject<TEventMap>

This class extends THREE.Object3D

See

https://threejs.org/docs/#api/en/core/Object3D

Type Parameters

  • TEventMap extends Object3DEventMap = Object3DEventMap

Hierarchy

Constructors

  • Type Parameters

    • TEventMap extends Object3DEventMap = Object3DEventMap

    Parameters

    • Optional parent: Object3D<Object3DEventMap> | Scene
    • Optional entity: ExtendedEntity

    Returns GameObject<TEventMap>

Properties

isGameObject: boolean = true

Accessors

Methods

  • Destroy this GameObject

    Parameters

    • forceImmediate: boolean = false

    Returns void

  • Get an object containing all the GameComponent on this entity, where the object keys are the component types.

    Returns {
        [componentName: string]: Component<any>;
    }

    • [componentName: string]: Component<any>
  • Get an object containing all the GameComponent that are slated to be removed from this entity, where the object keys are the component types.

    Returns {
        [componentName: string]: Component<any>;
    }

    • [componentName: string]: Component<any>
  • Boolean value indicating whether the entity has all GameComponent in a list.

    Parameters

    • GameComponents: GameComponentConstructor<any>[]

    Returns boolean

  • Boolean value indicating whether the entity has any GameComponent in a list.

    Parameters

    • GameComponents: GameComponentConstructor<any>[]

    Returns boolean

  • Boolean value indicating whether the entity has the given GameComponent.

    Parameters

    • GameComponent: GameComponentConstructor<any>

    Returns boolean

  • Remove a GameComponent from the entity.

    Parameters

    • GameComponent: GameComponentConstructor<any>
    • forceImmediate: boolean

    Returns void