The renderer for a gdjs.RuntimeGame using Pixi.js.
Add the standard events handler.
Center the window on screen.
Convert a point from the canvas coordinates to the dom element container coordinates.
The point in the canvas coordinates.
The point to return.
The point in the dom element container coordinates.
Create a standard canvas inside canvasArea.
Get the canvas DOM element.
Return the scale factor between the renderer height and the actual canvas height, which is also the height of the container for DOM elements to be superimposed on top of it.
Useful to scale font sizes of DOM elements so that they follow the size of the game.
Get the DOM element used as a container for HTML elements to display on top of the game.
Get the electron module, if running as a electron renderer process.
Helper to get the electron remote module, if running on Electron. Note that is not guaranteed to be supported in the future - avoid if possible.
Get the Three.js renderer for the game - if any.
Checks if the game is in full screen.
Check if the device supports WebGL.
true if WebGL is supported
Set if the aspect ratio must be kept when the game canvas is resized to fill the page.
Open the given URL in the system browser (or a new tab)
De/activate fullscreen for the game.
Change the margin that must be preserved around the game canvas.
Update the window size, if possible.
The new width, in pixels.
The new height, in pixels.
Close the game, if applicable
Update the game renderer size according to the "game resolution". Called when game resolution changes.
Note that if the canvas is fullscreen, it won't be resized, but when going back to non fullscreen mode, the requested size will be used.
Generated using TypeDoc