Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface GraphicsStatic

The static class that carries out graphics processing.

class

Graphics

Hierarchy

  • GraphicsStatic

Index

Properties

BLEND_ADD

BLEND_ADD: number

The alias of PIXI.blendModes.ADD.

static
property

BLEND_ADD

type

Number

final

BLEND_MULTIPLY

BLEND_MULTIPLY: number

The alias of PIXI.blendModes.MULTIPLY.

static
property

BLEND_MULTIPLY

type

Number

final

BLEND_NORMAL

BLEND_NORMAL: number

The alias of PIXI.blendModes.NORMAL.

static
property

BLEND_NORMAL

type

Number

final

BLEND_SCREEN

BLEND_SCREEN: number

The alias of PIXI.blendModes.SCREEN.

static
property

BLEND_SCREEN

type

Number

final

_boxHeight

_boxHeight: number

_boxWidth

_boxWidth: number

_canUseDifferenceBlend

_canUseDifferenceBlend: boolean

_canUseSaturationBlend

_canUseSaturationBlend: boolean

_canvas

_canvas: HTMLCanvasElement

_errorPrinter

_errorPrinter: boolean

_fpsMeter

_fpsMeter: FPSMeter

_fpsMeterToggled

_fpsMeterToggled: boolean

_height

_height: number

_hiddenCanvas

_hiddenCanvas: HTMLCanvasElement

_loadingCount

_loadingCount: number

_loadingImage

_loadingImage: HTMLImageElement

_maxSkip

_maxSkip: number

_modeBox

_modeBox: HTMLDivElement

_realScale

_realScale: number

_rendered

_rendered: boolean

_renderer

_renderer: SystemRenderer

_rendererType

_rendererType: string

_scale

_scale: number

_skipCount

_skipCount: number

_stretchEnabled

_stretchEnabled: boolean

_upperCanvas

_upperCanvas: HTMLCanvasElement

_video

_video: HTMLVideoElement

_width

_width: number

boxHeight

boxHeight: number

The height of the window display area.

static
property

boxHeight

type

Number

boxWidth

boxWidth: number

The width of the window display area.

static
property

boxWidth

type

Number

frameCount

frameCount: number

The total frame count of the game screen.

static
property

frameCount

type

Number

height

height: number

The height of the game screen.

static
property

height

type

Number

scale

scale: number

The zoom scale of the game screen.

static
property

scale

type

Number

width

width: number

The width of the game screen.

static
property

width

type

Number

Methods

Private _applyCanvasFilter

  • _applyCanvasFilter(): void

Private _cancelFullScreen

  • _cancelFullScreen(): void

Private _centerElement

  • _centerElement(element: HTMLCanvasElement): void

Private _clearUpperCanvas

  • _clearUpperCanvas(): void

Private _createAllElements

  • _createAllElements(): void

Private _createCanvas

  • _createCanvas(): void

Private _createErrorPrinter

  • _createErrorPrinter(): void

Private _createFPSMeter

  • _createFPSMeter(): void

Private _createFontLoader

  • _createFontLoader(name: string): void

Private _createGameFontLoader

  • _createGameFontLoader(): void

Private _createModeBox

  • _createModeBox(): void

Private _createRenderer

  • _createRenderer(): void

Private _createUpperCanvas

  • _createUpperCanvas(): void

Private _createVideo

  • _createVideo(): void

Private _defaultStretchMode

  • _defaultStretchMode(): boolean

Private _disableContextMenu

  • _disableContextMenu(): void

Private _disableTextSelection

  • _disableTextSelection(): void

Private _isFullScreen

  • _isFullScreen(): boolean

Private _isVideoVisible

  • _isVideoVisible(): boolean

Private _makeErrorHtml

  • _makeErrorHtml(name: string, message: string): void

Private _modifyExistingElements

  • _modifyExistingElements(): void

Private _onKeyDown

  • _onKeyDown(event: KeyboardEvent): void

Private _onVideoEnd

  • _onVideoEnd(): void

Private _onVideoError

  • _onVideoError(): void

Private _onVideoLoad

  • _onVideoLoad(): void

Private _onWindowResize

  • _onWindowResize(): void

Private _paintUpperCanvas

  • _paintUpperCanvas(): void

Private _requestFullScreen

  • _requestFullScreen(): void

Private _setupEventHandlers

  • _setupEventHandlers(): void

Private _switchFPSMeter

  • _switchFPSMeter(): void

Private _switchFullScreen

  • _switchFullScreen(): void

Private _switchStretchMode

  • _switchStretchMode(): void

Private _testCanvasBlendModes

  • _testCanvasBlendModes(): void

Private _updateAllElements

  • _updateAllElements(): void

Private _updateCanvas

  • _updateCanvas(): void

Private _updateErrorPrinter

  • _updateErrorPrinter(): void

Private _updateRealScale

  • _updateRealScale(): void

Private _updateRenderer

  • _updateRenderer(): void

Private _updateUpperCanvas

  • _updateUpperCanvas(): void

Private _updateVideo

  • _updateVideo(): void

Private _updateVisibility

  • _updateVisibility(videoVisible: boolean): void

callGC

  • callGC(): void

canPlayVideoType

  • canPlayVideoType(type: string): boolean
  • Checks whether the browser can play the specified video type.

    static
    method

    canPlayVideoType

    Parameters

    • type: string

      The video type to test support for

    Returns boolean

    True if the browser can play the specified video type

canUseDifferenceBlend

  • canUseDifferenceBlend(): boolean
  • Checks whether the canvas blend mode 'difference' is supported.

    static
    method

    canUseDifferenceBlend

    Returns boolean

    True if the canvas blend mode 'difference' is supported

canUseSaturationBlend

  • canUseSaturationBlend(): boolean
  • Checks whether the canvas blend mode 'saturation' is supported.

    static
    method

    canUseSaturationBlend

    Returns boolean

    True if the canvas blend mode 'saturation' is supported

endLoading

  • endLoading(): void

hasWebGL

  • hasWebGL(): boolean
  • Checks whether the current browser supports WebGL.

    static
    method

    hasWebGL

    Returns boolean

    True if the current browser supports WebGL.

hideFps

  • hideFps(): void

initialize

  • initialize(): void
  • initialize(width: number, height: number, type: string): void

isFontLoaded

  • isFontLoaded(name: string): boolean
  • Checks whether the font file is loaded.

    static
    method

    isFontLoaded

    Parameters

    • name: string

      The face name of the font

    Returns boolean

    True if the font file is loaded

isInsideCanvas

  • isInsideCanvas(x: number, y: number): boolean
  • Checks whether the specified point is inside the game canvas area.

    static
    method

    isInsideCanvas

    Parameters

    • x: number

      The x coordinate on the canvas area

    • y: number

      The y coordinate on the canvas area

    Returns boolean

    True if the specified point is inside the game canvas area

isVideoPlaying

  • isVideoPlaying(): boolean

isWebGL

  • isWebGL(): boolean
  • Checks whether the renderer type is WebGL.

    static
    method

    isWebGL

    Returns boolean

    True if the renderer type is WebGL

loadFont

  • loadFont(name: string, url: string): void
  • Loads a font file.

    static
    method

    loadFont

    Parameters

    • name: string

      The face name of the font

    • url: string

      The url of the font file

    Returns void

pageToCanvasX

  • pageToCanvasX(x: number): number
  • Converts an x coordinate on the page to the corresponding x coordinate on the canvas area.

    static
    method

    pageToCanvasX

    Parameters

    • x: number

      The x coordinate on the page to be converted

    Returns number

    The x coordinate on the canvas area

pageToCanvasY

  • pageToCanvasY(y: number): number
  • Converts a y coordinate on the page to the corresponding y coordinate on the canvas area.

    static
    method

    pageToCanvasY

    Parameters

    • y: number

      The y coordinate on the page to be converted

    Returns number

    The y coordinate on the canvas area

playVideo

  • playVideo(src: string): void

printError

  • printError(name: string, message: string): void
  • Displays the error text to the screen.

    static
    method

    printError

    Parameters

    • name: string

      The name of the error

    • message: string

      The message of the error

    Returns void

render

  • render(stage?: Stage): void

setLoadingImage

  • setLoadingImage(src: string): any

showFps

  • showFps(): void

startLoading

  • startLoading(): void

tickEnd

  • tickEnd(): void

tickStart

  • tickStart(): void

updateLoading

  • updateLoading(): void
  • Increments the loading counter and displays the "Now Loading" image if necessary.

    static
    method

    updateLoading

    Returns void

Generated using TypeDoc