Options
All
  • Public
  • Public/Protected
  • All
Menu

Class GameSystem

Core system of ecsy-babylon.

Hierarchy

  • System
    • GameSystem

Index

Properties

Private _activeScene

_activeScene: Scene

Private _assetManagers

_assetManagers: Map<String, AssetsManager> = new Map<String, BABYLON.AssetsManager>()

<Scene UID, BABYLON.AssetsManager>

Private _engine

_engine: Engine

enabled

enabled: boolean

Whether the system will execute during the world tick.

onSceneSwitched

onSceneSwitched: Observable<Scene> = new BABYLON.Observable<BABYLON.Scene>()

Observable event when active scene is switched.

Accessors

activeScene

  • get activeScene(): Scene

renderingCanvas

  • get renderingCanvas(): null | HTMLCanvasElement

scenes

  • get scenes(): Scene[]

Methods

Private _render

  • _render(): void

Private _updateColor

Private _updateScene

  • _updateScene(entity: Entity): void

getAssetManager

  • getAssetManager(scene?: Entity): AssetsManager
  • Get scene AssetManager or return AssetManager in active scene.

    Parameters

    • Optional scene: Entity

      Scene entity

    Returns AssetsManager

play

  • play(): void
  • Resume execution of this system.

    Returns void

start

  • start(canvas: HTMLCanvasElement, antialias?: undefined | false | true, options?: BABYLON.EngineOptions, adaptToDeviceRatio?: undefined | false | true): GameSystem

stop

  • stop(): void
  • Stop execution of this system.

    Returns void

switchScene

Generated using TypeDoc