Options
All
  • Public
  • Public/Protected
  • All
Menu

The renderer for a gdjs.RuntimeGame using Pixi.js.

Hierarchy

  • RuntimeGamePixiRenderer

Index

Methods

  • bindStandardEvents(manager: InputManager, window: Window, document: Document): void
  • centerWindow(): void
  • convertCanvasToDomElementContainerCoords(canvasCoords: FloatPoint): FloatPoint
  • Convert a point from the canvas coordinates to the dom element container coordinates.

    Parameters

    • canvasCoords: FloatPoint

      The point in the canvas coordinates.

    Returns FloatPoint

    The point in the dom element container coordinates.

  • createStandardCanvas(parentElement: HTMLElement): void
  • getCanvas(): HTMLCanvasElement
  • getCanvasToDomElementContainerHeightScale(): number
  • 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.

    Returns number

  • getDomElementContainer(): null | HTMLDivElement
  • getElectron(): any
  • getElectronRemote(): any
  • getPIXIRenderer(): null | Renderer
  • getWindowInnerHeight(): number
  • getWindowInnerWidth(): number
  • getWindowTitle(): string
  • isFullScreen(): boolean
  • isWebGLSupported(): boolean
  • keepAspectRatio(enable: any): void
  • openURL(url: string): void
  • setFullScreen(enable: any): void
  • setMargins(top: any, right: any, bottom: any, left: any): void
  • setWindowSize(width: number, height: number): void
  • setWindowTitle(title: any): void
  • startGameLoop(fn: any): void
  • stopGame(): void
  • updateRendererSize(): void
  • 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.

    Returns void

Constructors

Generated using TypeDoc