These docs are for Phaser 2.3.0 Phaser 3 docs can be found on GitHub pages.
Phaser CE docs can be found on the Phaser CE Documentation site.

Constructor

PIXI. PIXI

new PIXI()

Namespace-class for pixi.js.

Contains assorted static properties and enumerations.

Source code: pixi/Pixi.js (Line 11)

Public Properties

<internal, static> CANVAS_RENDERER : number

Internal:
  • This member is internal (protected) and may be modified or removed in the future.
Source code: pixi/Pixi.js (Line 28)

<static> defaultRenderOptions : Object

The default render options if none are supplied to {{#crossLink "WebGLRenderer"}}{{/crossLink}} or {{#crossLink "CanvasRenderer"}}{{/crossLink}}.

Source code: pixi/Pixi.js (Line 89)

<static> DEG_TO_RAD : number

Source code: pixi/Pixi.js (Line 76)

<static> PI_2 : number

Source code: pixi/Pixi.js (Line 64)

<static> RAD_TO_DEG : number

Source code: pixi/Pixi.js (Line 70)

<internal, static> RETINA_PREFIX : string

Internal:
  • This member is internal (protected) and may be modified or removed in the future.
Source code: pixi/Pixi.js (Line 82)

<static> VERSION : string

Version of pixi that is loaded.

Source code: pixi/Pixi.js (Line 35)

<internal, static> WEBGL_RENDERER : number

Internal:
  • This member is internal (protected) and may be modified or removed in the future.
Source code: pixi/Pixi.js (Line 21)

Public Methods

canUseNewCanvasBlendModes() → {Boolean}

Checks whether the Canvas BlendModes are supported by the current browser for drawImage

Returns
Boolean -

whether they are supported

Source code: pixi/utils/Utils.js (Line 25)

getNextPowerOfTwo(number) → {Number}

Given a number, this function returns the closest number that is a power of two this function is taken from Starling Framework as its pretty neat ;)

Parameters
Name Type Description
number Number

-

Returns
Number -

the closest number that is a power of two

Source code: pixi/utils/Utils.js (Line 57)

hex2rgb(hex)

Converts a hex color number to an [R, G, B] array

Parameters
Name Type Description
hex Number

-

Source code: pixi/utils/Utils.js (Line 5)

isPowerOfTwo(width, height) → {Boolean}

checks if the given width and height make a power of two texture

Parameters
Name Type Description
width Number

-

height Number

-

Returns
Boolean -
Source code: pixi/utils/Utils.js (Line 77)

rgb2hex(rgb)

Converts a color as an [R, G, B] array to a hex number

Parameters
Name Type Description
rgb Array

-

Source code: pixi/utils/Utils.js (Line 15)