activator?: Record<string, string>

Use this to optimize activation/deactivation behavior for entities in a world.


"level": "game/camera/CameraRectActivator",
"menu": "default",

It's possible to overwrite activator that meet the specific needs of a world.


Example 1: Imagine having a world that represents a auto-runner-level that only scrolls from left to right. In that case one could have a list of objects, sorted by their x-axis.


Example 2: Imagine a top-down-RPG where you like to only have objects active around the camera. Other objects (like NPCs far away) shall be deactive. You could implement an Activator which handles this using a QuadTree and quickly checks bounding boxes against the camera.


defaultActivator for format details

canvasSelector?: string

depends on canvas Type

canvasType?: CanvasType

"create" => a new canvas is created and attached to the canvas selector object "selector" => it is expected that the canvas selector points to a canvas

defaultActivator?: string

Set the path to the activator-path for all worlds.

Example: path to a local class


Example: package class (node)


Set it to default (or not at all) to set it to TypeSprite's ManualActivator.


activator overwrites this value

fixedMainloopFps?: number

Only valid if mainloopType is MainLoopType.Fixed.

flags?: string[]

[OPTIONAL] Define any flags that helps to run your game.

Suggestions: "ios", "nativ", "desktop", or "demo" :-)

mainloopType?: MainLoopType

It's possible to have different mainloop behavior and controlls how update() is called.

maxBlurredFps?: number

when > 0 it will cap the FPS to the given value if the window has lost the fosus. This is useful during development when your laptop starts to scream at you while working on a game.

maxFps?: number

when > 0 it will cap the FPS to the given value.

noAutostart?: boolean

Means the mainloop won't start automatically. This has to be done by hand.

noEngineContext?: boolean
noStandardPropertyParser?: boolean

Means built-in property-parser won't be set automatically. You can add them by yourself



noStandardResourceLoader?: boolean

Means built-in resourceloader won't be set automatically.



resourceLoader?: string[]
resourcePathPrefix?: string

A global path-prefix used for all resources loaded using the ResourceManager.

This is useful when deploying the game into a environment where the paths of the executed javascript code does not match the dev-environment.

startWorlds: string | string[] | string[][]

Name or list of names the start world.

For a very simple case one can simply set a string.

However, for certain patterns it's useful to start more than one world and in a controlled order.

Example 1: start two worlds at the same time

startWorlds: ["world1", "world2"]

Example 2: start 3 worlds in a controlled order

startWorlds: [["world1"], ["world2", "world3"]]

when world1 is active, world2 and world3 get activated.

Generated using TypeDoc