Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Graphics

The static class that carries out graphics processing.

Hierarchy

  • Graphics

Index

Constructors

Protected constructor

Properties

Static BLEND_ADD

BLEND_ADD: number

The alias of PIXI.blendModes.ADD.

static
property

BLEND_ADD

final

Static BLEND_MULTIPLY

BLEND_MULTIPLY: number

The alias of PIXI.blendModes.MULTIPLY.

static
property

BLEND_MULTIPLY

final

Static BLEND_NORMAL

BLEND_NORMAL: number

The alias of PIXI.blendModes.NORMAL.

static
property

BLEND_NORMAL

final

Static BLEND_SCREEN

BLEND_SCREEN: number

The alias of PIXI.blendModes.SCREEN.

static
property

BLEND_SCREEN

final

Static _renderer

_renderer: AbstractRenderer

Static boxHeight

boxHeight: number

The height of the window display area.

static
property

boxHeight

Static boxWidth

boxWidth: number

The width of the window display area.

static
property

boxWidth

Static frameCount

frameCount: number

The total frame count of the game screen.

static
property

frameCount

Static height

height: number

The height of the game screen.

static
property

height

Static scale

scale: number

The zoom scale of the game screen.

static
property

scale

Static width

width: number

The width of the game screen.

static
property

width

Methods

Static callGC

  • callGC(): void

Static 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

Static 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

Static 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

Static endLoading

  • endLoading(): void

Static hasWebGL

  • hasWebGL(): boolean

Static hideFps

  • hideFps(): void

Static initialize

  • initialize(width?: number, height?: number, type?: string): void
  • Initializes the graphics system.

    static
    method

    initialize

    Parameters

    • Optional width: number

      The width of the game screen

    • Optional height: number

      The height of the game screen

    • Optional type: string

      The type of the renderer. 'canvas', 'webgl', or 'auto'.

    Returns void

Static 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

Static 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

Static isVideoPlaying

  • isVideoPlaying(): boolean

Static isWebGL

  • isWebGL(): boolean

Static loadFont

  • loadFont(name: string, url: string): void

Static 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

Static 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

Static playVideo

  • playVideo(src: string): void

Static 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

Static render

  • render(stage?: Stage): void

Static setLoadingImage

  • setLoadingImage(src: string): void

Static showFps

  • showFps(): void

Static startLoading

  • startLoading(): void

Static tickEnd

  • tickEnd(): void

Static tickStart

  • tickStart(): void

Static updateLoading

  • updateLoading(): void

Generated using TypeDoc