Engine
Engine
Kind: global class
- Engine
- new Engine(platform, [entityManager], [enableGraphics], [enableAudio], [debug])
- .staticKnowledge :
StaticKnowledgeDatabase - .plugins :
EnginePluginManager - .ticker :
Ticker - .executor :
ConcurrentExecutor - .platform :
EnginePlatform - .performance :
MetricCollection - .assetManager :
AssetManager.<Engine> - .options :
OptionGroup - .moduleRegistry :
ModuleRegistry - .binarySerializationRegistry :
BinarySerializationRegistry .services- .storage :
Storage - .graphics :
GraphicsEngine - .sound :
SoundEngine - .gui :
GUIEngine - .sceneManager :
SceneManager - .renderingEnabled :
boolean - .isEngine :
boolean - .loadAssetList(listURL)
- .start() ⇒
Promise - .stop()
- .requestExit() ⇒
Promise
new Engine(platform, [entityManager], [enableGraphics], [enableAudio], [debug])
| Param | Type |
|---|---|
| platform | EnginePlatform |
| [entityManager] | EntityManager |
| [enableGraphics] | boolean |
| [enableAudio] | boolean |
| [debug] | boolean |
engine.staticKnowledge : StaticKnowledgeDatabase
Static database Can contain tables of structured data that the application often works with. Engine startup will load all tables ensuring that data is ready once startup finishes Use sparingly, this is not suitable for very large amounts of data as all the data will be in memory and deserialization will stall engine startup Example: inventory item table, monster table
Kind: instance property of Engine
Read only: true
engine.plugins : EnginePluginManager
Kind: instance property of Engine
Read only: true
engine.ticker : Ticker
Main simulation ticker
Kind: instance property of Engine
Read only: true
engine.executor : ConcurrentExecutor
Default executor, enables time-sharing concurrency
Kind: instance property of Engine
Read only: true
engine.platform : EnginePlatform
Kind: instance property of Engine
engine.performance : MetricCollection
Kind: instance property of Engine
engine.assetManager : AssetManager.<Engine>
Kind: instance property of Engine
engine.options : OptionGroup
Kind: instance property of Engine
engine.moduleRegistry : ModuleRegistry
Kind: instance property of Engine
engine.binarySerializationRegistry : BinarySerializationRegistry
Kind: instance property of Engine
Read only: true
engine.services
use plugins instead
Kind: instance property of Engine
engine.storage : Storage
Kind: instance property of Engine
engine.graphics : GraphicsEngine
Kind: instance property of Engine
engine.sound : SoundEngine
Kind: instance property of Engine
engine.gui : GUIEngine
Graphical User Interface engine
Kind: instance property of Engine
engine.sceneManager : SceneManager
Kind: instance property of Engine
Read only: true
engine.renderingEnabled : boolean
Toggles GraphicsEngine rendering on and off
Kind: instance property of Engine
engine.isEngine : boolean
Kind: instance property of Engine
Read only: true
engine.loadAssetList(listURL)
Returns preloader object
Kind: instance method of Engine
| Param | Type |
|---|---|
| listURL | String |
engine.start() ⇒ Promise
Startup
Kind: instance method of Engine
engine.stop()
Shutdown the engine, disposing all relevant resources
Kind: instance method of Engine
engine.requestExit() ⇒ Promise
Kind: instance method of Engine