Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Properties

Private tmpEntity

tmpEntity: any

Methods

addComponent

  • Type parameters

    • T

    Parameters

    Returns void

addComponentData

  • addComponentData<T>(entity: Entity, cdata: T): void
  • Type parameters

    • T

    Parameters

    Returns void

addComponentRaw

addSharedComponent

  • Type parameters

    • T

    Parameters

    Returns void

allocChunkIterator

bufferDepth

  • bufferDepth(): number

createArchetype

  • createArchetype(...ctypes: any[]): Archetype
  • Parameters

    • Rest ...ctypes: any[]

    Returns Archetype

createEntities

  • Parameters

    Returns Entity[]

createEntity

debugCheckEntities

  • debugCheckEntities(): void

destroyEntities

  • destroyEntities(entities: Entity[]): void
  • Parameters

    Returns void

destroyEntity

  • destroyEntity(entity: Entity): void
  • Destroy {@link entity}. If the entity has any State Components, all non-System State Components are removed, but the entity is not destroyed until all System State Component are deleted by the systems they belong to.

    Parameters

    Returns void

emptyArchetype

exists

  • exists(entity: Entity): boolean
  • Returns true if {@link entity} refers to a valid, live entity.

    Parameters

    Returns boolean

forEach

  • forEach<A>(components: [CSA<A>], fn: function): void
  • forEach<A>(components: [CSA<A>], specs: ComponentSpec[], fn: function): void
  • forEach<A, B>(components: [CSA<A>, CSA<B>], fn: function): void
  • forEach<A, B>(components: [CSA<A>, CSA<B>], specs: ComponentSpec[], fn: function): void
  • forEach<A, B, C>(components: [CSA<A>, CSA<B>, CSA<C>], fn: function): void
  • forEach<A, B, C>(components: [CSA<A>, CSA<B>, CSA<C>], specs: ComponentSpec[], fn: function): void
  • forEach<A, B, C, D>(components: [CSA<A>, CSA<B>, CSA<C>, CSA<D>], fn: function): void
  • forEach<A, B, C, D>(components: [CSA<A>, CSA<B>, CSA<C>, CSA<D>], specs: ComponentSpec[], fn: function): void
  • forEach<A, B, C, D, E>(components: [CSA<A>, CSA<B>, CSA<C>, CSA<D>, CSA<E>], fn: function): void
  • forEach<A, B, C, D, E>(components: [CSA<A>, CSA<B>, CSA<C>, CSA<D>, CSA<E>], specs: ComponentSpec[], fn: function): void
  • forEach<A, B, C, D, E, F>(components: [CSA<A>, CSA<B>, CSA<C>, CSA<D>, CSA<E>, CSA<F>], fn: function): void
  • forEach<A, B, C, D, E, F>(components: [CSA<A>, CSA<B>, CSA<C>, CSA<D>, CSA<E>, CSA<F>], specs: ComponentSpec[], fn: function): void
  • forEach<A, B, C, D, E, F, G>(components: [CSA<A>, CSA<B>, CSA<C>, CSA<D>, CSA<E>, CSA<F>, CSA<G>], fn: function): void
  • forEach<A, B, C, D, E, F, G>(components: [CSA<A>, CSA<B>, CSA<C>, CSA<D>, CSA<E>, CSA<F>, CSA<G>], specs: ComponentSpec[], fn: function): void
  • forEach<A, B, C, D, E, F, G, H>(components: [CSA<A>, CSA<B>, CSA<C>, CSA<D>, CSA<E>, CSA<F>, CSA<G>, CSA<H>], fn: function): void
  • forEach<A, B, C, D, E, F, G, H>(components: [CSA<A>, CSA<B>, CSA<C>, CSA<D>, CSA<E>, CSA<F>, CSA<G>, CSA<H>], specs: ComponentSpec[], fn: function): void
  • forEach(components: CSABase[], fn: function): void
  • forEach(components: CSABase[], specs: ComponentSpec[], fn: function): void
  • Type parameters

    • A

    Parameters

    • components: [CSA<A>]
    • fn: function
        • (a: A): void
        • Parameters

          • a: A

          Returns void

    Returns void

  • Type parameters

    • A

    Parameters

    • components: [CSA<A>]
    • specs: ComponentSpec[]
    • fn: function
        • (a: A): void
        • Parameters

          • a: A

          Returns void

    Returns void

  • Type parameters

    • A

    • B

    Parameters

    • components: [CSA<A>, CSA<B>]
    • fn: function
        • (a: A, b: B): void
        • Parameters

          • a: A
          • b: B

          Returns void

    Returns void

  • Type parameters

    • A

    • B

    Parameters

    • components: [CSA<A>, CSA<B>]
    • specs: ComponentSpec[]
    • fn: function
        • (a: A, b: B): void
        • Parameters

          • a: A
          • b: B

          Returns void

    Returns void

  • Type parameters

    • A

    • B

    • C

    Parameters

    • components: [CSA<A>, CSA<B>, CSA<C>]
    • fn: function
        • (a: A, b: B, c: C): void
        • Parameters

          • a: A
          • b: B
          • c: C

          Returns void

    Returns void

  • Type parameters

    • A

    • B

    • C

    Parameters

    • components: [CSA<A>, CSA<B>, CSA<C>]
    • specs: ComponentSpec[]
    • fn: function
        • (a: A, b: B, c: C): void
        • Parameters

          • a: A
          • b: B
          • c: C

          Returns void

    Returns void

  • Type parameters

    • A

    • B

    • C

    • D

    Parameters

    • components: [CSA<A>, CSA<B>, CSA<C>, CSA<D>]
    • fn: function
        • (a: A, b: B, c: C, d: D): void
        • Parameters

          • a: A
          • b: B
          • c: C
          • d: D

          Returns void

    Returns void

  • Type parameters

    • A

    • B

    • C

    • D

    Parameters

    • components: [CSA<A>, CSA<B>, CSA<C>, CSA<D>]
    • specs: ComponentSpec[]
    • fn: function
        • (a: A, b: B, c: C, d: D): void
        • Parameters

          • a: A
          • b: B
          • c: C
          • d: D

          Returns void

    Returns void

  • Type parameters

    • A

    • B

    • C

    • D

    • E

    Parameters

    • components: [CSA<A>, CSA<B>, CSA<C>, CSA<D>, CSA<E>]
    • fn: function
        • (a: A, b: B, c: C, d: D, e: E): void
        • Parameters

          • a: A
          • b: B
          • c: C
          • d: D
          • e: E

          Returns void

    Returns void

  • Type parameters

    • A

    • B

    • C

    • D

    • E

    Parameters

    • components: [CSA<A>, CSA<B>, CSA<C>, CSA<D>, CSA<E>]
    • specs: ComponentSpec[]
    • fn: function
        • (a: A, b: B, c: C, d: D, e: E): void
        • Parameters

          • a: A
          • b: B
          • c: C
          • d: D
          • e: E

          Returns void

    Returns void

  • Type parameters

    • A

    • B

    • C

    • D

    • E

    • F

    Parameters

    • components: [CSA<A>, CSA<B>, CSA<C>, CSA<D>, CSA<E>, CSA<F>]
    • fn: function
        • (a: A, b: B, c: C, d: D, e: E, f: F): void
        • Parameters

          • a: A
          • b: B
          • c: C
          • d: D
          • e: E
          • f: F

          Returns void

    Returns void

  • Type parameters

    • A

    • B

    • C

    • D

    • E

    • F

    Parameters

    • components: [CSA<A>, CSA<B>, CSA<C>, CSA<D>, CSA<E>, CSA<F>]
    • specs: ComponentSpec[]
    • fn: function
        • (a: A, b: B, c: C, d: D, e: E, f: F): void
        • Parameters

          • a: A
          • b: B
          • c: C
          • d: D
          • e: E
          • f: F

          Returns void

    Returns void

  • Type parameters

    • A

    • B

    • C

    • D

    • E

    • F

    • G

    Parameters

    • components: [CSA<A>, CSA<B>, CSA<C>, CSA<D>, CSA<E>, CSA<F>, CSA<G>]
    • fn: function
        • (a: A, b: B, c: C, d: D, e: E, f: F, g: G): void
        • Parameters

          • a: A
          • b: B
          • c: C
          • d: D
          • e: E
          • f: F
          • g: G

          Returns void

    Returns void

  • Type parameters

    • A

    • B

    • C

    • D

    • E

    • F

    • G

    Parameters

    • components: [CSA<A>, CSA<B>, CSA<C>, CSA<D>, CSA<E>, CSA<F>, CSA<G>]
    • specs: ComponentSpec[]
    • fn: function
        • (a: A, b: B, c: C, d: D, e: E, f: F, g: G): void
        • Parameters

          • a: A
          • b: B
          • c: C
          • d: D
          • e: E
          • f: F
          • g: G

          Returns void

    Returns void

  • Type parameters

    • A

    • B

    • C

    • D

    • E

    • F

    • G

    • H

    Parameters

    • components: [CSA<A>, CSA<B>, CSA<C>, CSA<D>, CSA<E>, CSA<F>, CSA<G>, CSA<H>]
    • fn: function
        • (a: A, b: B, c: C, d: D, e: E, f: F, g: G, h: H): void
        • Parameters

          • a: A
          • b: B
          • c: C
          • d: D
          • e: E
          • f: F
          • g: G
          • h: H

          Returns void

    Returns void

  • Type parameters

    • A

    • B

    • C

    • D

    • E

    • F

    • G

    • H

    Parameters

    • components: [CSA<A>, CSA<B>, CSA<C>, CSA<D>, CSA<E>, CSA<F>, CSA<G>, CSA<H>]
    • specs: ComponentSpec[]
    • fn: function
        • (a: A, b: B, c: C, d: D, e: E, f: F, g: G, h: H): void
        • Parameters

          • a: A
          • b: B
          • c: C
          • d: D
          • e: E
          • f: F
          • g: G
          • h: H

          Returns void

    Returns void

  • Parameters

    • components: CSABase[]
    • fn: function
        • (...comps: any[]): void
        • Parameters

          • Rest ...comps: any[]

          Returns void

    Returns void

  • Parameters

    • components: CSABase[]
    • specs: ComponentSpec[]
    • fn: function
        • (...comps: any[]): void
        • Parameters

          • Rest ...comps: any[]

          Returns void

    Returns void

fromJSON

  • fromJSON(json: string): void
  • Parameters

    • json: string

    Returns void

getArchetype

getComponentData

  • Type parameters

    • T

    Parameters

    Returns T

getConfigData

  • Type parameters

    • T

    Parameters

    Returns T

getConfigEntity

getEntityByName

  • getEntityByName(name: string): Entity
  • Finds an entity by its name. If multiple entities have the same name, this function returns only one of them. Which one it returns may change from one GetEntityByName call to the next.

    This operation is slow. If you need direct access to entities, you can save ut.Entity references to them ahead of time and use the references directly.

    Parameters

    • name: string

    Returns Entity

getEntityName

  • getEntityName(entity: Entity): string

getOrAddComponentData

  • Gets the component data if it's already present on the given entity, or adds it, and returns it. For performance, if you expect the component to be present on the entity you should call getComponentData directly.

    Type parameters

    Parameters

    Returns T

getSharedComponentData

  • Type parameters

    • T

    Parameters

    Returns T

hasComponent

  • Type parameters

    • T

    Parameters

    Returns boolean

hasComponentRaw

instantiateEntities

  • instantiateEntities(proto: Entity, count: number): Entity[]
  • Parameters

    Returns Entity[]

instantiateEntity

  • Instantiate (clone) the source entity {@link proto}. This is a shallow copy of the source entity's components. Transform hierarchy children are ignored.

    Parameters

    Returns Entity

removeComponent

  • Type parameters

    • T

    Parameters

    Returns void

removeComponentRaw

run

  • run(): void
  • Runs the default scheduler.

    Returns void

scheduler

setComponentData

  • setComponentData<T>(entity: Entity, cdata: T): void
  • Type parameters

    • T

    Parameters

    Returns void

setConfigData

  • setConfigData<T>(cdata: T): void
  • Type parameters

    • T

    Parameters

    • cdata: T

    Returns void

setEntityName

  • setEntityName(entity: Entity, name: string): void

setOrAddComponentData

  • setOrAddComponentData<T>(entity: Entity, cdata: T): void
  • Sets the component data if it's already present on the given entity, or adds it. For performance, if you expect the component to be present on the entity you should call setComponentData directly.

    Type parameters

    Parameters

    Returns void

setSharedComponentData

  • setSharedComponentData<T>(entity: Entity, cdata: T): void
  • Type parameters

    • T

    Parameters

    Returns void

startBuffering

  • startBuffering(): void

stopBuffering

  • stopBuffering(): void

toJSON

  • toJSON(): string
  • Returns string

usingComponentData

  • usingComponentData<A>(entity: Entity, components: [CC<A>], fn: function): void
  • usingComponentData<A, B>(entity: Entity, components: [CC<A>, CC<B>], fn: function): void
  • usingComponentData<A, B, C>(entity: Entity, components: [CC<A>, CC<B>, CC<C>], fn: function): void
  • usingComponentData<A, B, C, D>(entity: Entity, components: [CC<A>, CC<B>, CC<C>, CC<D>], fn: function): void
  • usingComponentData<A, B, C, D, E>(entity: Entity, components: [CC<A>, CC<B>, CC<C>, CC<D>, CC<E>], fn: function): void
  • usingComponentData<A, B, C, D, E, F>(entity: Entity, components: [CC<A>, CC<B>, CC<C>, CC<D>, CC<E>, CC<F>], fn: function): void
  • usingComponentData<A, B, C, D, E, F, G>(entity: Entity, components: [CC<A>, CC<B>, CC<C>, CC<D>, CC<E>, CC<F>, CC<G>], fn: function): void
  • usingComponentData<A, B, C, D, E, F, G, H>(entity: Entity, components: [CC<A>, CC<B>, CC<C>, CC<D>, CC<E>, CC<F>, CC<G>, CC<H>], fn: function): void
  • Type parameters

    • A

    Parameters

    • entity: Entity
    • components: [CC<A>]
    • fn: function
        • (a: A): void
        • Parameters

          • a: A

          Returns void

    Returns void

  • Type parameters

    • A

    • B

    Parameters

    • entity: Entity
    • components: [CC<A>, CC<B>]
    • fn: function
        • (a: A, b: B): void
        • Parameters

          • a: A
          • b: B

          Returns void

    Returns void

  • Type parameters

    • A

    • B

    • C

    Parameters

    • entity: Entity
    • components: [CC<A>, CC<B>, CC<C>]
    • fn: function
        • (a: A, b: B, c: C): void
        • Parameters

          • a: A
          • b: B
          • c: C

          Returns void

    Returns void

  • Type parameters

    • A

    • B

    • C

    • D

    Parameters

    • entity: Entity
    • components: [CC<A>, CC<B>, CC<C>, CC<D>]
    • fn: function
        • (a: A, b: B, c: C, d: D): void
        • Parameters

          • a: A
          • b: B
          • c: C
          • d: D

          Returns void

    Returns void

  • Type parameters

    • A

    • B

    • C

    • D

    • E

    Parameters

    • entity: Entity
    • components: [CC<A>, CC<B>, CC<C>, CC<D>, CC<E>]
    • fn: function
        • (a: A, b: B, c: C, d: D, e: E): void
        • Parameters

          • a: A
          • b: B
          • c: C
          • d: D
          • e: E

          Returns void

    Returns void

  • Type parameters

    • A

    • B

    • C

    • D

    • E

    • F

    Parameters

    • entity: Entity
    • components: [CC<A>, CC<B>, CC<C>, CC<D>, CC<E>, CC<F>]
    • fn: function
        • (a: A, b: B, c: C, d: D, e: E, f: F): void
        • Parameters

          • a: A
          • b: B
          • c: C
          • d: D
          • e: E
          • f: F

          Returns void

    Returns void

  • Type parameters

    • A

    • B

    • C

    • D

    • E

    • F

    • G

    Parameters

    • entity: Entity
    • components: [CC<A>, CC<B>, CC<C>, CC<D>, CC<E>, CC<F>, CC<G>]
    • fn: function
        • (a: A, b: B, c: C, d: D, e: E, f: F, g: G): void
        • Parameters

          • a: A
          • b: B
          • c: C
          • d: D
          • e: E
          • f: F
          • g: G

          Returns void

    Returns void

  • Type parameters

    • A

    • B

    • C

    • D

    • E

    • F

    • G

    • H

    Parameters

    • entity: Entity
    • components: [CC<A>, CC<B>, CC<C>, CC<D>, CC<E>, CC<F>, CC<G>, CC<H>]
    • fn: function
        • (a: A, b: B, c: C, d: D, e: E, f: F, g: G, h: H): void
        • Parameters

          • a: A
          • b: B
          • c: C
          • d: D
          • e: E
          • f: F
          • g: G
          • h: H

          Returns void

    Returns void

world

  • Returns World

Generated using TypeDoc