Options
All
  • Public
  • Public/Protected
  • All
Menu

Class WorldBase

Hierarchy

Index

Methods

addComponentRaw

bufferDepth

  • bufferDepth(): number
  • Returns number

createEntity

  • Create an entity with ut.Archetype{@link archetype}.

    Parameters

    Returns Entity

debugCheckEntities

  • debugCheckEntities(): void
  • 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

  • Return the empty ut.Archetype, containing no components.

    Returns Archetype

exists

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

    Parameters

    Returns boolean

fromJSON

  • fromJSON(json: string): void
  • Parameters

    • json: string

    Returns void

getArchetype

getConfigEntity

  • Gets the ut.Entity that contains configuration components.

    Returns Entity

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
  • Parameters

    Returns string

hasComponentRaw

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

removeComponentRaw

run

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

    Returns void

scheduler

  • Obtains the default frame scheduler for this world.

    Returns SchedulerBase

setEntityName

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

    Returns void

startBuffering

  • startBuffering(): void
  • Returns void

stopBuffering

  • stopBuffering(): void
  • Returns void

toJSON

  • toJSON(): string
  • Returns string

Generated using TypeDoc