Namespace: Graphics

Graphics

The static class that carries out graphics processing.

Members

Graphics.appPIXI.Applicationstaticreadonly

The PIXI.Application object

Graphics.boxHeightnumberstatic

The height of the window display area

Graphics.boxWidthnumberstatic

The width of the window display area

Graphics.defaultScalenumberstatic

The default zoom scale of the game screen

Graphics.effekseerEffekseerContextstaticreadonly

The context object of Effekseer

Graphics.frameCountnumberstatic

The total frame count of the game screen

Graphics.heightnumberstatic

The height of the game screen

Graphics.widthnumberstatic

The width of the game screen

Methods

Graphics.endLoading()booleanstatic

Erases the loading spinner
Returns:
TypeDescription
booleanTrue if the loading spinner was active

Graphics.eraseError()static

Erases the loading error text

Graphics.hideScreen()static

Hides the game screen

Graphics.initialize()booleanstatic

Initializes the graphics system
Returns:
TypeDescription
booleanTrue if the graphics system is available

Graphics.isInsideCanvas(x, y)booleanstatic

Checks whether the given coordinates are inside the game canvas area
NameTypeDescription
xnumberThe x coordinate on the canvas area
ynumberThe y coordinate on the canvas area
Returns:
TypeDescription
booleanTrue if the given coordinates are inside the game canvas area

Graphics.pageToCanvasX(x)numberstatic

Converts an x coordinate on the page to the corresponding x coordinate on the canvas area
NameTypeDescription
xnumberThe x coordinate on the page to be converted
Returns:
TypeDescription
numberThe x coordinate on the canvas area

Graphics.pageToCanvasY(y)numberstatic

Converts a y coordinate on the page to the corresponding y coordinate on the canvas area
NameTypeDescription
ynumberThe y coordinate on the page to be converted
Returns:
TypeDescription
numberThe y coordinate on the canvas area

Graphics.printError(name, message, error)static

Displays the error text to the screen
NameTypeDescription
namestringThe name of the error
messagestringThe message of the error
errorErroroptionalThe error object

Graphics.resize(width, height)static

Changes the size of the game screen
NameTypeDescription
widthnumberThe new width of the game screen
heightnumberThe new height of the game screen

Graphics.setStage(stage)static

Sets the stage to be rendered
NameTypeDescription
stageStageThe stage object to be rendered

Graphics.setTickHandler(handler)static

Register a handler for tick events
NameTypeDescription
handlerfunctionThe listener function to be added for updates.

Graphics.showRetryButton(retry)static

Displays a button to try to reload resources
NameTypeDescription
retryfunctionThe callback function to be called when the button is pressed

Graphics.showScreen()static

Shows the game screen

Graphics.startGameLoop()static

Starts the game loop

Graphics.startLoading()static

Shows the loading spinner

Graphics.stopGameLoop()static

Stops the game loop