The Sphere v2 API level supported by the engine. When new APIs are standardized, this value is increased.
Name and version number of the build tool used to package the game.
Name and version number of the Sphere engine in use.
Information about the current game. All values are taken from the game's JSON manifest
(game.json
).
Sphere API version supported by the engine.
The current frame rate. The engine will try to maintain the FPS according to this value.
The maximum numer of consecutive frames the engine is allowed to skip.
true
if the engine is currently in fullscreen mode, otherwise false
. You can freely
change this value at any time.
If the main module exports a class, the engine automatically creates an instance of it on startup. Use this to access that object from anywhere.
Abort execution immediately with an error message. This error will not be catchable.
Get the number of frames elapsed since the engine started.
Restart the engine at the end of the current frame.
Set the current backbuffer resolution. The contents of the backbuffer may be lost.
Shut down the engine at the end of the current frame.
Get a promise that resolves after a given number of frames. Use with await
.
The number of frames to wait before resolving the promise.
Generated using TypeDoc
Provides facilities for controlling the Sphere engine.