Graphics.d overview
Table of contents
- utils
- Graphics (class)
- initialize (static method)
- setTickHandler (static method)
- startGameLoop (static method)
- stopGameLoop (static method)
- setStage (static method)
- startLoading (static method)
- endLoading (static method)
- printError (static method)
- showRetryButton (static method)
- eraseError (static method)
- pageToCanvasX (static method)
- pageToCanvasY (static method)
- isInsideCanvas (static method)
- showScreen (static method)
- hideScreen (static method)
- resize (static method)
- _createAllElements (static method)
- _updateAllElements (static method)
- _onTick (static method)
- _canRender (static method)
- _updateRealScale (static method)
- _stretchWidth (static method)
- _stretchHeight (static method)
- _makeErrorHtml (static method)
- _defaultStretchMode (static method)
- _createErrorPrinter (static method)
- _updateErrorPrinter (static method)
- _createCanvas (static method)
- _updateCanvas (static method)
- _updateVideo (static method)
- _createLoadingSpinner (static method)
- _createFPSCounter (static method)
- _centerElement (static method)
- _disableContextMenu (static method)
- _applyCanvasFilter (static method)
- _clearCanvasFilter (static method)
- _setupEventHandlers (static method)
- _onWindowResize (static method)
- _onKeyDown (static method)
- _switchFPSCounter (static method)
- _switchStretchMode (static method)
- _switchFullScreen (static method)
- _isFullScreen (static method)
- _requestFullScreen (static method)
- _cancelFullScreen (static method)
- _createPixiApp (static method)
- _setupPixi (static method)
- _createEffekseerContext (static method)
- Graphics (class)
utils
Graphics (class)
The static class that carries out graphics processing.
Signature
export declare class Graphics {
constructor()
}
initialize (static method)
Initializes the graphics system.
Signature
static initialize(): boolean
setTickHandler (static method)
Register a handler for tick events.
Signature
static setTickHandler(handler: (deltaTime: number) => void): void
startGameLoop (static method)
Starts the game loop.
Signature
static startGameLoop(): void
stopGameLoop (static method)
Stops the game loop.
Signature
static stopGameLoop(): void
setStage (static method)
Sets the stage to be rendered.
Signature
static setStage(stage: Stage | null): void
startLoading (static method)
Shows the loading spinner.
Signature
static startLoading(): void
endLoading (static method)
Erases the loading spinner.
Signature
static endLoading(): boolean
printError (static method)
Displays the error text to the screen.
Signature
static printError(name: string, message: string, error?: Error | ErrorEvent): void
showRetryButton (static method)
Displays a button to try to reload resources.
Signature
static showRetryButton(retry: () => void): void
eraseError (static method)
Erases the loading error text.
Signature
static eraseError(): void
pageToCanvasX (static method)
Converts an x coordinate on the page to the corresponding x coordinate on the canvas area.
Signature
static pageToCanvasX(x: number): number
pageToCanvasY (static method)
Converts a y coordinate on the page to the corresponding y coordinate on the canvas area.
Signature
static pageToCanvasY(y: number): number
isInsideCanvas (static method)
Checks whether the specified point is inside the game canvas area.
Signature
static isInsideCanvas(x: number, y: number): boolean
showScreen (static method)
Shows the game screen.
Signature
static showScreen(): void
hideScreen (static method)
Hides the game screen.
Signature
static hideScreen(): void
resize (static method)
Changes the size of the game screen.
Signature
static resize(width: number, height: number): void
_createAllElements (static method)
Signature
static _createAllElements(): void
_updateAllElements (static method)
Signature
static _updateAllElements(): void
_onTick (static method)
Signature
static _onTick(deltaTime: number): void
_canRender (static method)
Signature
static _canRender(): boolean
_updateRealScale (static method)
Signature
static _updateRealScale(): void
_stretchWidth (static method)
Signature
static _stretchWidth(): number
_stretchHeight (static method)
Signature
static _stretchHeight(): number
_makeErrorHtml (static method)
Signature
static _makeErrorHtml(name?: string, message?: string, _error?: Error | ErrorEvent): string
_defaultStretchMode (static method)
Signature
static _defaultStretchMode(): boolean
_createErrorPrinter (static method)
Signature
static _createErrorPrinter(): void
_updateErrorPrinter (static method)
Signature
static _updateErrorPrinter(): void
_createCanvas (static method)
Signature
static _createCanvas(): void
_updateCanvas (static method)
Signature
static _updateCanvas(): void
_updateVideo (static method)
Signature
static _updateVideo(): void
_createLoadingSpinner (static method)
Signature
static _createLoadingSpinner(): void
_createFPSCounter (static method)
Signature
static _createFPSCounter(): void
_centerElement (static method)
Signature
static _centerElement(element: HTMLCanvasElement): void
_disableContextMenu (static method)
Signature
static _disableContextMenu(): void
_applyCanvasFilter (static method)
Signature
static _applyCanvasFilter(): void
_clearCanvasFilter (static method)
Signature
static _clearCanvasFilter(): void
_setupEventHandlers (static method)
Signature
static _setupEventHandlers(): void
_onWindowResize (static method)
Signature
static _onWindowResize(): void
_onKeyDown (static method)
Signature
static _onKeyDown(event: KeyboardEvent): void
_switchFPSCounter (static method)
Signature
static _switchFPSCounter(): void
_switchStretchMode (static method)
Signature
static _switchStretchMode(): void
_switchFullScreen (static method)
Signature
static _switchFullScreen(): void
_isFullScreen (static method)
Signature
static _isFullScreen(): boolean
_requestFullScreen (static method)
Signature
static _requestFullScreen(): void
_cancelFullScreen (static method)
Signature
static _cancelFullScreen(): void
_createPixiApp (static method)
Signature
static _createPixiApp(): void
_setupPixi (static method)
Signature
static _setupPixi(): void
_createEffekseerContext (static method)
Signature
static _createEffekseerContext(): void