Defines a core Engine. The scene is always maximized and centered on screen with preservation of its aspect ratio (Adds borders when needed)
Scene width
Scene height
Optional custom screen loader
Scene height
Scene width
Current background
Alternative background color if no image background is set
Background position
How background image should be displayed
Object cache
Main canvas
Main Canvas rendering context
If overflow is horizontal
If loader is initialised
Last render time
Loader screen
Check for modification of Sprites list in current frame
Next screen
Canvas used for off-screen rendering (double buffering)
off-screen Canvas rendering context
Screen overflow
Screen overflow center
Resources loader
Scene scale in user view
Current screen
Sprites defined in current screen
Default background color used when nothing is specified for a Screen
Zoom ratio used for mouse scroll wheel
Screen height
Screen width
Loads an image, adds it to the cache (If not already done)
Absolute or relative path to the image
An image or null if not found
Caches a new GameScreen instance
Key associated to the screen
New screen to reference
current engine core (to chain screen definitions)
Adds sprite to screen. A sprite is inserted only once in a Screen
Sprite to add
true if the Sprite is added (false if already present)
Forces update of sprites hierarchy. Should be used when index of sprites is updated.
Loads object from cache
id of the object to load
Loads an image. Equivalent to addImage
Absolute or relative path to the image
An image or null if not found
Removes instance of sprite
Sprite to remove
true if the sprite is really removed (false if not present)
Refreshes scene. Renders background and sprites on offest canvas
Resets screen settings. Internally used for screen switch
Adapts view to a new screen size
Resize event
Main loop
Delai d'appel
Defines current background image. The image is not distorted to fit the screen.
The new background image. May be either an image, its relative or absolute url or a canvas
How background should be displayed
Defines current background color. Has no effect if a background image is already defined for the current screen. See also setBackground.
The new background color
Centers scene. This setting has no effect if there's no overflow
New centered position. Use null to set center in the middle of the scene
Stores object to cache
id of the object to store
object to store
Changes overflow state
New overflow state
Changes displayed GameScreen. Use key when possible. See also addScreen.
Key of referenced screen or new instance of screen
Generated using TypeDoc
Defines the core engine used to render scenes (aka GameScreens). A project that use the zepr.ts framework must define exactly one instance of Core or derived classes