Namespace: Graphics

Graphics

The static class that carries out graphics processing.

Members

Graphics.app PIXI.Application staticreadonly

The PIXI.Application object.

Graphics.boxHeight number static

The height of the window display area.

Graphics.boxWidth number static

The width of the window display area.

Graphics.defaultScale number static

The default zoom scale of the game screen.

Graphics.effekseer EffekseerContext staticreadonly

The context object of Effekseer.

Graphics.frameCount number static

The total frame count of the game screen.

Graphics.height number static

The height of the game screen.

Graphics.width number static

The width of the game screen.

Methods

Graphics.endLoading ()boolean static

Erases the loading spinner.

Returns:
Type Description
boolean True if the loading spinner was active.

Graphics.eraseError () static

Erases the loading error text.

Graphics.hideScreen () static

Hides the game screen.

Graphics.initialize ()boolean static

Initializes the graphics system.

Returns:
Type Description
boolean True if the graphics system is available.

Graphics.isInsideCanvas (x, y)boolean static

Checks whether the specified point is inside the game canvas area.

Name Type Description
x number

The x coordinate on the canvas area.

y number

The y coordinate on the canvas area.

Returns:
Type Description
boolean True if the specified point is inside the game canvas area.

Graphics.pageToCanvasX (x)number static

Converts an x coordinate on the page to the corresponding x coordinate on the canvas area.

Name Type Description
x number

The x coordinate on the page to be converted.

Returns:
Type Description
number The x coordinate on the canvas area.

Graphics.pageToCanvasY (y)number static

Converts a y coordinate on the page to the corresponding y coordinate on the canvas area.

Name Type Description
y number

The y coordinate on the page to be converted.

Returns:
Type Description
number The y coordinate on the canvas area.

Graphics.printError (name, message, error) static

Displays the error text to the screen.

Name Type Description
name string

The name of the error.

message string

The message of the error.

error Error optional

The error object.

Graphics.resize (width, height) static

Changes the size of the game screen.

Name Type Description
width number

The width of the game screen.

height number

The height of the game screen.

Graphics.setStage (stage) static

Sets the stage to be rendered.

Name Type Description
stage Stage

The stage object to be rendered.

Graphics.setTickHandler (handler) static

Register a handler for tick events.

Name Type Description
handler function

The listener function to be added for updates.

Graphics.showRetryButton (retry) static

Displays a button to try to reload resources.

Name Type Description
retry function

The 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.