• Public
  • Public/Protected
  • All

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


  • RuntimeGamePixiRenderer



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


    • canvasCoords: FloatPoint

      The point in the canvas coordinates.

    • result: FloatPoint

      The point to return.

    Returns FloatPoint

    The point in the dom element container coordinates.

  • createStandardCanvas(parentElement: HTMLElement): void
  • getCanvas(): null | 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
  • getThreeRenderer(): null | WebGLRenderer
  • 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


Generated using TypeDoc